gtester: Count inability to run a test in a binary as a failure

Previously, when a binary did not run a single test - for whatever
reason, from the binary not existing to the binary not using the gtester
framework - no failures were recorded. Now we record a non-successful
run of a binary that did not start any tests as a failure, too.

Note that this does not change the behavior of any binaries that exit
successfully or that report the start of any gtester test.
This commit is contained in:
Benjamin Otte 2011-07-18 14:10:35 +02:00
parent 4a25d60023
commit 75b30dc51c

View File

@ -445,6 +445,10 @@ launch_test (const char *binary)
goto retry;
}
/* count the inability to run a test as a failure */
if (!success && testcase_count == 0)
testcase_fail_count++;
if (!gtester_quiet)
g_print ("%s: %s\n", !success ? "FAIL" : "PASS", binary);
g_timer_destroy (btimer);