Skip to content

Commit 4cd73d4

Browse files
Make python test able to throw an error in Travis tests
1 parent f550b4e commit 4cd73d4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

run_tests.sh

+5-4
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,11 @@ make USE_PGXS=1 installcheck || status=$?
142142
if [ -f regression.diffs ]; then cat regression.diffs; fi
143143

144144
# run python tests
145-
set +x
145+
set +x -e
146146
virtualenv /tmp/env && source /tmp/env/bin/activate &&
147-
pip install PyYAML && pip install psycopg2 &&
148-
python tests/pg_qs_test_runner.py --port $PGPORT #--database db --user zloj
147+
pip install PyYAML && pip install psycopg2
148+
set -e #exit virtualenv with error code
149+
python tests/pg_qs_test_runner.py --port $PGPORT
149150
deactivate
150151
set -x
151152

@@ -162,7 +163,7 @@ fi
162163

163164
# something's wrong, exit now!
164165
if [ $status -ne 0 ]; then exit 1; fi
165-
166+
set +e
166167
# generate *.gcov files
167168
gcov *.c *.h
168169

0 commit comments

Comments
 (0)