summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2012-10-08 21:31:15 -0500
committerDenis Kenzior <denkenz@gmail.com>2012-10-09 11:26:55 -0500
commit15c6325f633f30e1674a87e96fa68f6216a8b52f (patch)
tree166e6b1da1141b5a9e13304a65c9dead45713bab /tools
parentd4289aa8cd2fdfc78dd17838e47f819798bd7fa1 (diff)
downloadofono-15c6325f633f30e1674a87e96fa68f6216a8b52f.tar.gz
stktest: Improve statistics reporting
Diffstat (limited to 'tools')
-rw-r--r--tools/stktest.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/stktest.c b/tools/stktest.c
index 6b07d83c..fa8969f2 100644
--- a/tools/stktest.c
+++ b/tools/stktest.c
@@ -1708,6 +1708,9 @@ static void test_destroy(gpointer user_data)
static void __stktest_test_summarize(void)
{
GList *l;
+ unsigned int not_run = 0;
+ unsigned int passed = 0;
+ unsigned int failed = 0;
g_print("\n\nTest Summary\n");
g_print("============\n");
@@ -1720,15 +1723,23 @@ static void __stktest_test_summarize(void)
switch (test->result) {
case TEST_RESULT_NOT_RUN:
g_print("Not Run\n");
+ not_run += 1;
break;
case TEST_RESULT_PASSED:
g_print("Passed\n");
+ passed += 1;
break;
case TEST_RESULT_FAILED:
g_print("Failed\n");
+ failed += 1;
break;
}
}
+
+ g_print("\nTotal: %d, Passed: %d(%.1f%%), Failed: %d, NotRun: %d\n",
+ not_run + passed + failed, passed,
+ (float) passed * 100 / (not_run + passed + failed),
+ failed, not_run);
}
static void __stktest_test_cleanup(void)