Collect submodule test failures into the parent

Instead of displaying the failures from each submodule at the end
of testing that submodule, RULES_TOP suppresses the output when
it detects a parent module, and RULES_MODULES adds the children's
failure lists into the parent's list so they all get shown at the
end of the tests/results.
This commit is contained in:
Andrew Johnson
2020-05-27 01:43:40 -05:00
parent a6f85ffd1a
commit d41b3979fb
4 changed files with 25 additions and 6 deletions
+7 -2
View File
@@ -22,12 +22,17 @@ use warnings;
die "Usage: testFailures.pl .tests-failed\n"
unless @ARGV == 1;
# No file means success.
open FAILURES, '<', shift or
exit 0;
my @failures = <FAILURES>;
chomp(my @failures = <FAILURES>);
close FAILURES;
# A file with just empty lines also mean success
my @dirs = grep {$_} @failures;
exit 0 unless @dirs;
print "\nTest failures were reported in:\n",
(map {" $_"} @failures), "\n";
(map {" $_\n"} @dirs), "\n\n";
exit 1;