summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2016-02-10 10:57:11 (GMT)
committerAndreas Schneider <asn@cryptomilk.org>2016-02-10 10:57:38 (GMT)
commit56ed9b0eb533ea38825c1be570f48334d1e457f0 (patch)
treeea835eac21269717ba44b0c2ebd6f45ce9549376
parent9a120731ec3831c68bfa88b719395f3ea8a24f54 (diff)
downloadcmocka-56ed9b0eb533ea38825c1be570f48334d1e457f0.zip
cmocka-56ed9b0eb533ea38825c1be570f48334d1e457f0.tar.gz
cmocka-56ed9b0eb533ea38825c1be570f48334d1e457f0.tar.bz2
cmocka: Print group setup and teardown errors
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--src/cmocka.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/cmocka.c b/src/cmocka.c
index 310073d..e43a8b3 100644
--- a/src/cmocka.c
+++ b/src/cmocka.c
@@ -2791,8 +2791,13 @@ int _cmocka_run_group_tests(const char *group_name,
}
}
} else {
+ if (cm_error_message != NULL) {
+ print_error("[ ERROR ] --- %s\n", cm_error_message);
+ vcm_free_error(cm_error_message);
+ cm_error_message = NULL;
+ }
cmprintf(PRINTF_TEST_ERROR, 0,
- group_name, "Group setup failed");
+ group_name, "[ FAILED ] GROUP SETUP");
total_errors++;
}
@@ -2803,6 +2808,15 @@ int _cmocka_run_group_tests(const char *group_name,
group_teardown,
&group_state,
group_check_point);
+ if (rc != 0) {
+ if (cm_error_message != NULL) {
+ print_error("[ ERROR ] --- %s\n", cm_error_message);
+ vcm_free_error(cm_error_message);
+ cm_error_message = NULL;
+ }
+ cmprintf(PRINTF_TEST_ERROR, 0,
+ group_name, "[ FAILED ] GROUP TEARDOWN");
+ }
}
cmprintf_group_finish(group_name,