Commit 4b642caf1114f6a354c21444d1fdccba3cb894b9

Authored by Jay Berkenbilt
1 parent 4c7cfd5c

Update qtest-driver to log invalid tests

This is taken from an unrelased change to qtest.
Showing 2 changed files with 14 additions and 2 deletions
... ... @@ -4,6 +4,7 @@ Next
4 4  
5 5 * At next release, hide release-qpdf-10.6.3.0cmake* versions at readthedocs
6 6 * Stay on top of https://github.com/pikepdf/pikepdf/pull/315
  7 +* Release qtest with updates to qtest-driver and copy back into qpdf
7 8  
8 9 In order:
9 10 * json v2
... ...
qtest/bin/qtest-driver
... ... @@ -218,6 +218,7 @@ if (defined $tc_log)
218 218 print_xml(">\n");
219 219 print_junit("<?xml version=\"1.0\"?>\n" .
220 220 "<testsuites>\n");
  221 +my @invalid_test_suites = ();
221 222 foreach my $test (@tests)
222 223 {
223 224 print_and_log("\nRunning $test\n");
... ... @@ -226,7 +227,8 @@ foreach my $test (@tests)
226 227 my @results = run_test($test);
227 228 if (scalar(@results) != 5)
228 229 {
229   - error("test driver $test returned invalid results");
  230 + print_and_log("test driver $test returned invalid results\n");
  231 + push(@invalid_test_suites, $test);
230 232 }
231 233 else
232 234 {
... ... @@ -282,7 +284,7 @@ tc_do_final_checks();
282 284  
283 285 my $okay = ((($totpasses + $totxfails) == $tottests) &&
284 286 ($errors == 0) && ($totmissing == 0) && ($totextra == 0) &&
285   - ($coverage_okay));
  287 + ($coverage_okay) && (scalar(@invalid_test_suites) == 0));
286 288  
287 289 print "\n";
288 290 print_and_pad("Overall test suite");
... ... @@ -299,6 +301,15 @@ else
299 301 }
300 302  
301 303 my $summary = "\nTESTS COMPLETE. Summary:\n\n";
  304 +if (@invalid_test_suites)
  305 +{
  306 + $summary .= "INVALID TEST SUITES:\n";
  307 + foreach my $t (@invalid_test_suites)
  308 + {
  309 + $summary .= " $t\n";
  310 + }
  311 + $summary .= "\n";
  312 +}
302 313 $summary .=
303 314 sprintf("Total tests: %d\n" .
304 315 "Passes: %d\n" .
... ...