verbose-tests
authorAndreas Henriksson <andreas@fatal.se>
Wed, 30 Jul 2014 12:28:17 +0000 (14:28 +0200)
committerChris Hofstaedtler <zeha@debian.org>
Tue, 1 Oct 2024 18:13:03 +0000 (20:13 +0200)
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 3a66f271aa3e074c9a1f6fc4482cf8ebf6b3849a..9843c10aac11611516e70e5343e6564a32705aba 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_COMPONENTS =
 TESTS_COMMAND = $(top_srcdir)/tests/run.sh \
index 5fe5ba07fd90c59dae993e73b5fe7de24fec26c2..f8f18b93cc2b09ce04eb7b305abdffb028bdc65e 100644 (file)
@@ -195,6 +195,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
 }