summaryrefslogtreecommitdiff
path: root/debian/tests/diff_tmp_out
diff options
context:
space:
mode:
Diffstat (limited to 'debian/tests/diff_tmp_out')
-rwxr-xr-xdebian/tests/diff_tmp_out20
1 files changed, 20 insertions, 0 deletions
diff --git a/debian/tests/diff_tmp_out b/debian/tests/diff_tmp_out
new file mode 100755
index 0000000..167bea4
--- /dev/null
+++ b/debian/tests/diff_tmp_out
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+set -exu
+
+testname="$1"
+# the "while : ; do" loop around graph-difference is a temporary fix to work
+# around random segmentation faults. See http://bugs.python.org/issue24605
+for t in tmp out; do
+ for f in tests/$testname/$t/* $AUTOPKGTEST_TMP/$t/*; do basename "$f"; done | sort | uniq | while read f; do
+ echo checking $f;
+ case "$f" in
+ *.xml|*.dot)
+ echo "+ botch-graph-difference \"tests/$testname/$t/$f\" \"$AUTOPKGTEST_TMP/$t/$f\"";
+ while : ; do botch-graph-difference "tests/$testname/$t/$f" "$AUTOPKGTEST_TMP/$t/$f"; exit=$?; if [ $exit -eq 139 ]; then echo segfault; continue; fi; if [ $exit -ne 0 ]; then exit 1; else break; fi; done;;
+ *)
+ echo "+ diff -u \"tests/$testname/$t/$f\" \"$AUTOPKGTEST_TMP/$t/$f\"";
+ cmp --silent "tests/$testname/$t/$f" "$AUTOPKGTEST_TMP/$t/$f" || { diff -u "tests/$testname/$t/$f" "$AUTOPKGTEST_TMP/$t/$f" | head --lines 100 && exit 1; };;
+ esac;
+ done
+done