Skip to content

Commit 3e8a08e

Browse files
author
Ivan Lazarev
committed
[PBCKP-220] removed FULL tests, PGPROBACKUP=ON and other flags added on CI
1 parent 125c929 commit 3e8a08e

File tree

8 files changed

+22
-47
lines changed

8 files changed

+22
-47
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
/docker-compose.yml
5151
/Dockerfile
5252
/Dockerfile.in
53-
/run_tests.sh
5453
/make_dockerfile.sh
5554
/backup_restore.sh
5655

.travis.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ env:
3434
- PG_VERSION=10 PG_BRANCH=REL_10_STABLE
3535
- PG_VERSION=9.6 PG_BRANCH=REL9_6_STABLE
3636
- PG_VERSION=9.5 PG_BRANCH=REL9_5_STABLE
37-
- PG_VERSION=14 PG_BRANCH=REL_14_STABLE PTRACK_PATCH_PG_BRANCH=REL_14_STABLE MODE=TMP
37+
# - PG_VERSION=14 PG_BRANCH=REL_14_STABLE PTRACK_PATCH_PG_BRANCH=REL_14_STABLE MODE=FULL ENV_FLAGS=PGPROBACKUP_GDB=ON
38+
- PG_VERSION=14 PG_BRANCH=REL_14_STABLE PTRACK_PATCH_PG_BRANCH=REL_14_STABLE ENV_FLAGS=PGPROBACKUP_GDB=ON
3839
# - PG_VERSION=13 PG_BRANCH=REL_13_STABLE PTRACK_PATCH_PG_BRANCH=OFF MODE=archive
3940
# - PG_VERSION=13 PG_BRANCH=REL_13_STABLE PTRACK_PATCH_PG_BRANCH=REL_13_STABLE MODE=backup
4041
# - PG_VERSION=13 PG_BRANCH=REL_13_STABLE PTRACK_PATCH_PG_BRANCH=REL_13_STABLE MODE=catchup

tests/Readme.md

+7-19
Original file line numberDiff line numberDiff line change
@@ -51,31 +51,19 @@ Usage:
5151
python -m unittest [-v] tests[.specific_module][.class.test]
5252
```
5353

54-
### Troubleshooting FAQ
54+
# Troubleshooting FAQ
5555

56-
#### python test failures
57-
1. Test failure reason like
56+
## Python tests failure
57+
### 1. Could not open extension "..."
5858
```
59-
testgres.exceptions.QueryException ERROR: could not open extension control file "/home/avaness/postgres/postgres.build/share/extension/amcheck.control": No such file or directory
59+
testgres.exceptions.QueryException ERROR: could not open extension control file "<postgres_build_dir>/share/extension/amcheck.control": No such file or directory
6060
```
6161

62-
*Solution*: you have no `<postgres_src_root>/contrib/` extensions installed
62+
#### Solution:
6363

64-
```commandline
65-
cd <postgres_src_root>
66-
make world install
67-
```
68-
69-
2. Test failure
70-
71-
```
72-
FAIL: test_help_6 (tests.option.OptionTest)
73-
```
74-
75-
*Solution*: you didn't configure postgres build with `--enable-nls`
64+
You have no `<postgres_src_root>/contrib/...` extension installed, please do
7665

7766
```commandline
7867
cd <postgres_src_root>
79-
make distclean
80-
<your-./configure-cmdline> --enable-nls
68+
make install-world
8169
```

tests/checkdb.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -546,11 +546,8 @@ def test_checkdb_checkunique(self):
546546
# @unittest.skip("skip")
547547
def test_checkdb_sigint_handling(self):
548548
""""""
549-
if not self.gdb:
550-
self.skipTest(
551-
"Specify PGPROBACKUP_GDB and build without "
552-
"optimizations for run this test"
553-
)
549+
self._check_gdb_flag_or_skip_test()
550+
554551
fname = self.id().split('.')[3]
555552
backup_dir = os.path.join(self.tmp_path, module_name, fname, 'backup')
556553
node = self.make_simple_node(

tests/pgpro2068.py

-5
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ def test_minrecpoint_on_replica(self):
2020
"""
2121
self._check_gdb_flag_or_skip_test()
2222

23-
if not self.gdb:
24-
self.skipTest(
25-
"Specify PGPROBACKUP_GDB and build without "
26-
"optimizations for run this test"
27-
)
2823
fname = self.id().split('.')[3]
2924
node = self.make_simple_node(
3025
base_dir=os.path.join(module_name, fname, 'node'),

tests/replica.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -539,11 +539,8 @@ def test_replica_promote(self):
539539
start backup from replica, during backup promote replica
540540
check that backup is failed
541541
"""
542-
if not self.gdb:
543-
self.skipTest(
544-
"Specify PGPROBACKUP_GDB and build without "
545-
"optimizations for run this test"
546-
)
542+
self._check_gdb_flag_or_skip_test()
543+
547544
fname = self.id().split('.')[3]
548545
backup_dir = os.path.join(self.tmp_path, module_name, fname, 'backup')
549546
master = self.make_simple_node(

tests/validate.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -1089,11 +1089,8 @@ def test_validate_instance_with_several_corrupt_backups_interrupt(self):
10891089
"""
10901090
check that interrupt during validation is handled correctly
10911091
"""
1092-
if not self.gdb:
1093-
self.skipTest(
1094-
"Specify PGPROBACKUP_GDB and build without "
1095-
"optimizations for run this test"
1096-
)
1092+
self._check_gdb_flag_or_skip_test()
1093+
10971094
fname = self.id().split('.')[3]
10981095
node = self.make_simple_node(
10991096
base_dir=os.path.join(module_name, fname, 'node'),

travis/run_tests.sh

+7-6
Original file line numberDiff line numberDiff line change
@@ -107,17 +107,18 @@ echo PGPROBACKUPBIN=${PGPROBACKUPBIN}
107107
echo PGPROBACKUP_SSH_REMOTE=${PGPROBACKUP_SSH_REMOTE}
108108
echo PGPROBACKUP_GDB=${PGPROBACKUP_GDB}
109109
echo PG_PROBACKUP_PTRACK=${PG_PROBACKUP_PTRACK}
110+
echo ADDITIONAL_ENV_FLAGS=${ENV_FLAGS}
110111
if [ "$MODE" = "basic" ]; then
111112
export PG_PROBACKUP_TEST_BASIC=ON
112113
echo PG_PROBACKUP_TEST_BASIC=${PG_PROBACKUP_TEST_BASIC}
113-
python3 -m unittest -v tests
114-
python3 -m unittest -v tests.init
115-
elif [ "$MODE" = "TMP" ]; then
116-
echo MODE=TMP
117-
PGPROBACKUP_GDB=ON python3 -m unittest -v tests
114+
${ADDITIONAL_ENV_FLAGS} python3 -m unittest -v tests
115+
${ADDITIONAL_ENV_FLAGS} python3 -m unittest -v tests.init
116+
#elif [ "$MODE" = "FULL" ]; then
117+
# echo MODE=FULL
118+
# ${ADDITIONAL_ENV_FLAGS} python3 -m unittest -v tests
118119
else
119120
echo PG_PROBACKUP_TEST_BASIC=${PG_PROBACKUP_TEST_BASIC}
120-
python3 -m unittest -v tests.$MODE
121+
${ADDITIONAL_ENV_FLAGS} python3 -m unittest -v tests.$MODE
121122
fi
122123

123124
# Generate *.gcov files

0 commit comments

Comments
 (0)