From 4cd73d45745f2bf1b68c162275ed74a869158aed Mon Sep 17 00:00:00 2001 From: Sergey Cherkashin <4erkashin@list.ru> Date: Thu, 25 Oct 2018 19:31:10 +0300 Subject: [PATCH] Make python test able to throw an error in Travis tests --- run_tests.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/run_tests.sh b/run_tests.sh index 7235314..bb7b75c 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -142,10 +142,11 @@ make USE_PGXS=1 installcheck || status=$? if [ -f regression.diffs ]; then cat regression.diffs; fi # run python tests -set +x +set +x -e virtualenv /tmp/env && source /tmp/env/bin/activate && -pip install PyYAML && pip install psycopg2 && -python tests/pg_qs_test_runner.py --port $PGPORT #--database db --user zloj +pip install PyYAML && pip install psycopg2 +set -e #exit virtualenv with error code +python tests/pg_qs_test_runner.py --port $PGPORT deactivate set -x @@ -162,7 +163,7 @@ fi # something's wrong, exit now! if [ $status -ne 0 ]; then exit 1; fi - +set +e # generate *.gcov files gcov *.c *.h