Exit non-zero if the tests fail

Signed-off-by: Stefano Rivera <stefano@rivera.za.net>
pull/205/head
Stefano Rivera 3 years ago
parent 34b26f4026
commit 26e3f8c52e

@ -1,5 +1,7 @@
#!/bin/bash
set -eu
orig_dir=$(cd $(dirname $0) && pwd -P)
tmpdir=$(mktemp -d)
@ -17,7 +19,11 @@ EOF
export COVERAGE_PROCESS_START=$tmpdir/.coveragerc
export PYTHONPATH=$tmpdir:
# Produce a coverage report, even if the tests fail
set +e
$orig_dir/run_tests
exitcode=$?
set -e
cd $tmpdir
coverage3 combine
@ -25,3 +31,5 @@ coverage3 html -d $orig_dir/report
coverage3 report -m
cd $orig_dir
rm -rf $tmpdir
exit $exitcode

@ -1,4 +1,5 @@
#!/bin/bash
set -eu
cd $(dirname $0)
@ -7,4 +8,9 @@ cd $(dirname $0)
# for file/directory names when it should always be bytestrings.
export PRETEND_UNICODE_ARGS=1
ls t939*.sh | xargs -n 1 bash
failed=0
for test in t939*.sh; do
./$test || failed=1
done
exit $failed

Loading…
Cancel
Save