From 4b642caf1114f6a354c21444d1fdccba3cb894b9 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sat, 14 May 2022 11:40:24 -0400 Subject: [PATCH] Update qtest-driver to log invalid tests This is taken from an unrelased change to qtest. --- TODO | 1 + qtest/bin/qtest-driver | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/TODO b/TODO index 6fc37cad..f265f26c 100644 --- a/TODO +++ b/TODO @@ -4,6 +4,7 @@ Next * At next release, hide release-qpdf-10.6.3.0cmake* versions at readthedocs * Stay on top of https://github.com/pikepdf/pikepdf/pull/315 +* Release qtest with updates to qtest-driver and copy back into qpdf In order: * json v2 diff --git a/qtest/bin/qtest-driver b/qtest/bin/qtest-driver index 7bd79d55..ce08f29f 100755 --- a/qtest/bin/qtest-driver +++ b/qtest/bin/qtest-driver @@ -218,6 +218,7 @@ if (defined $tc_log) print_xml(">\n"); print_junit("\n" . "\n"); +my @invalid_test_suites = (); foreach my $test (@tests) { print_and_log("\nRunning $test\n"); @@ -226,7 +227,8 @@ foreach my $test (@tests) my @results = run_test($test); if (scalar(@results) != 5) { - error("test driver $test returned invalid results"); + print_and_log("test driver $test returned invalid results\n"); + push(@invalid_test_suites, $test); } else { @@ -282,7 +284,7 @@ tc_do_final_checks(); my $okay = ((($totpasses + $totxfails) == $tottests) && ($errors == 0) && ($totmissing == 0) && ($totextra == 0) && - ($coverage_okay)); + ($coverage_okay) && (scalar(@invalid_test_suites) == 0)); print "\n"; print_and_pad("Overall test suite"); @@ -299,6 +301,15 @@ else } my $summary = "\nTESTS COMPLETE. Summary:\n\n"; +if (@invalid_test_suites) +{ + $summary .= "INVALID TEST SUITES:\n"; + foreach my $t (@invalid_test_suites) + { + $summary .= " $t\n"; + } + $summary .= "\n"; +} $summary .= sprintf("Total tests: %d\n" . "Passes: %d\n" .