[glib] gtester: Count inability to run a test in a binary as a failure
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gtester: Count inability to run a test in a binary as a failure
- Date: Mon, 18 Jul 2011 12:17:38 +0000 (UTC)
commit 75b30dc51c3926392483094a6228a3646a43e798
Author: Benjamin Otte <otte gnome org>
Date: Mon Jul 18 14:10:35 2011 +0200
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.
glib/gtester.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/glib/gtester.c b/glib/gtester.c
index 28fac8d..b0d9260 100644
--- a/glib/gtester.c
+++ b/glib/gtester.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]