verbose-tests
authorAndreas Henriksson <andreas@fatal.se>
Wed, 30 Jul 2014 12:28:17 +0000 (14:28 +0200)
committerChris Hofstaedtler <zeha@debian.org>
Tue, 5 Dec 2023 03:22:29 +0000 (04:22 +0100)
Enable verbose tests and print content of failing tests output file.

Gbp-Pq: Topic debian
Gbp-Pq: Name verbose-tests.patch

tests/Makemodule.am
tests/functions.sh

index d5422bebf5cd7a3d4d49601854ca3c81d308344c..a3462fb4a37c88a6a8894ec4bdb2c0ad8c5b7ced 100644 (file)
@@ -13,7 +13,7 @@ clean-local-tests:
 
 CLEAN_LOCALS += clean-local-tests
 
-TESTS_OPTIONS = --nonroot --show-diff
+TESTS_OPTIONS = --nonroot --show-diff --verbose --parallel=1
 TESTS_PARALLEL = --parallel
 TESTS_COMMAND = $(top_srcdir)/tests/run.sh \
        --srcdir=$(abs_top_srcdir) \
index 5a562a39aad47fe8c275c69df6ef609e5bda276b..493c1d7aeb2fa5f135becdbccbfc67696e5e31e8 100644 (file)
@@ -183,6 +183,17 @@ function ts_failed_subtest {
                ts_report " $msg ($1)"
        fi
 
+       if [ "$TS_VERBOSE" = "yes" ]; then
+               echo ========= script: $TS_SCRIPT =================
+               echo ================= OUTPUT =====================
+               cat -n $TS_OUTPUT
+               echo ================= EXPECTED ===================
+               cat -n $TS_EXPECTED
+               echo ================= O/E diff ===================
+               diff -u $TS_OUTPUT $TS_EXPECTED
+               echo ==============================================
+       fi
+
        return $ret
 }