File tree Expand file tree Collapse file tree 5 files changed +213
-93
lines changed Expand file tree Collapse file tree 5 files changed +213
-93
lines changed Original file line number Diff line number Diff line change 1212 PIP=pip3
1313fi
1414
15+
16+ # check that pg_config exists
17+ command -v pg_config
18+
19+
1520# prepare environment
1621VENV_PATH=/tmp/testgres_venv
1722rm -rf $VENV_PATH
@@ -29,12 +34,32 @@ $PIP install .
2934# test code quality
3035flake8 .
3136
32- # run tests
33- coverage run tests/test_simple.py
37+
38+ # remove existing coverage file
39+ export COVERAGE_FILE=.coverage
40+ rm -f $COVERAGE_FILE
41+
42+
43+ # run tests (PATH)
44+ time coverage run -a tests/test_simple.py
45+
46+
47+ # run tests (PG_BIN)
48+ export PG_BIN=$( dirname $( which pg_config) )
49+ time coverage run -a tests/test_simple.py
50+ unset PG_BIN
51+
52+
53+ # run tests (PG_CONFIG)
54+ export PG_CONFIG=$( which pg_config)
55+ time coverage run -a tests/test_simple.py
56+ unset PG_CONFIG
57+
3458
3559# show coverage
3660coverage report
3761
62+
3863# attempt to fix codecov
3964set +eux
4065
Original file line number Diff line number Diff line change 1212from .exceptions import BackupException
1313
1414from .utils import \
15+ get_bin_path , \
1516 default_username as _default_username , \
1617 execute_utility as _execute_utility , \
1718 explain_exception as _explain_exception
@@ -48,10 +49,11 @@ def __init__(self,
4849
4950 data_dir = os .path .join (self .base_dir , _DATA_DIR )
5051 _params = [
52+ get_bin_path ("pg_basebackup" ),
5153 "-D{}" .format (data_dir ), "-p{}" .format (node .port ),
5254 "-U{}" .format (username ), "-X{}" .format (xlog_method )
5355 ]
54- _execute_utility ("pg_basebackup" , _params , self .log_file )
56+ _execute_utility (_params , self .log_file )
5557
5658 def __enter__ (self ):
5759 return self
You can’t perform that action at this time.
0 commit comments