summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2020-01-14 17:20:36 +1000
committerteor <teor@torproject.org>2020-01-15 22:29:44 +1000
commiteb55d85e757c62a483e0e4ccb231ec33a1df84f3 (patch)
tree0bd45f3b6cb279a8e6eb7ed09ddae23b317922e4 /scripts
parentcda2ff196540f3b1fe8639e4e647285b58bb6752 (diff)
downloadtor-eb55d85e757c62a483e0e4ccb231ec33a1df84f3.tar.gz
tor-eb55d85e757c62a483e0e4ccb231ec33a1df84f3.zip
practracker: Fail tests if any process exits unexpectedly
Part of 32705.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/maint/practracker/test_practracker.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/maint/practracker/test_practracker.sh b/scripts/maint/practracker/test_practracker.sh
index 3c87bc31be..43e7b0a321 100755
--- a/scripts/maint/practracker/test_practracker.sh
+++ b/scripts/maint/practracker/test_practracker.sh
@@ -1,5 +1,8 @@
#!/bin/sh
+# Fail if any subprocess fails unexpectedly
+set -e
+
umask 077
TMPDIR=""
@@ -37,11 +40,11 @@ run_practracker() {
--max-h-include-count=0 \
--max-include-count=0 \
--terse \
- "${DATA}/" "$@";
+ "${DATA}/" "$@" || true
}
compare() {
# we can't use cmp because we need to use -b for windows
- diff -b -u "$@" > "${TMPDIR}/test-diff"
+ diff -b -u "$@" > "${TMPDIR}/test-diff" || true
if test -z "$(cat "${TMPDIR}"/test-diff)"; then
echo "OK"
else
@@ -53,7 +56,7 @@ compare() {
echo "unit tests:"
-"${PYTHON:-python}" "${PRACTRACKER_DIR}/practracker_tests.py" || exit 1
+"${PYTHON:-python}" "${PRACTRACKER_DIR}/practracker_tests.py"
echo "ex0:"