summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2020-02-02 11:23:55 -0800
committerGuy Harris <guy@alum.mit.edu>2020-02-02 11:23:55 -0800
commit0069f1d9f8aca26b165a07d6da7b162d00d24209 (patch)
treeaed7d57b2722f915833be240e1c2e6ae0bb82931
parent6426ddfb52a84b777f4d974de87871f24d8d146f (diff)
downloadtcpdump-0069f1d9f8aca26b165a07d6da7b162d00d24209.tar.gz
Add in the passed and failed counts from subshells.
Once we've gotten rid of those scripts, this should no longer be necessary. Fixes the problem I mentioned in my comment in GitHub issue #820. Get rid of extra blank lines at the end while we're at it.
-rwxr-xr-xtests/TESTrun14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/TESTrun b/tests/TESTrun
index d645f3b1..a532acca 100755
--- a/tests/TESTrun
+++ b/tests/TESTrun
@@ -142,6 +142,18 @@ if(scalar(@ARGV) == 0) {
runSimpleTests($ARGV[0]);
}
+#
+# XXX - read files used by shell scripts, and add the passed and failed
+# counts reported therein to our own passed and failed counts; we can
+# remove this once we no longer use shell scripts in tests.
+#
+open(PASSEDCOUNT, "<", "tests/.passed");
+$passedcount += <PASSEDCOUNT>;
+close(PASSEDCOUNT);
+open(FAILEDCOUNT, ">", "tests/.failed");
+$failedcount += <FAILEDCOUNT>;
+close(FAILEDCOUNT);
+
# exit with number of failing tests.
print "------------------------------------------------\n";
printf("%4u tests failed\n",$failedcount);
@@ -149,5 +161,3 @@ printf("%4u tests passed\n",$passedcount);
system("cat ${failureoutput}");
exit $failedcount;
-
-