void log_test_start(SRunner * sr, TCase * tc, TF * tfun) { char buffer[100]; snprintf(buffer, 99, "%s:%s", tc->name, tfun->name); srunner_send_evt(sr, buffer, CLSTART_T); }
void srunner_init_logging (SRunner *sr, enum print_output print_mode) { FILE *f; sr->loglst = check_list_create(); srunner_register_lfun (sr, stdout, 0, stdout_lfun, print_mode); f = srunner_open_lfile (sr); if (f) { srunner_register_lfun (sr, f, 1, lfile_lfun, print_mode); } f = srunner_open_xmlfile (sr); if (f) { srunner_register_lfun (sr, f, 2, xml_lfun, print_mode); } srunner_send_evt (sr, NULL, CLINITLOG_SR); }
void srunner_end_logging (SRunner *sr) { List *l; int rval; srunner_send_evt (sr, NULL, CLENDLOG_SR); l = sr->loglst; for (list_front(l); !list_at_end(l); list_advance(l)) { Log *lg = list_val(l); if (lg->close) { rval = fclose (lg->lfile); if (rval != 0) eprintf ("Error in call to fclose while closing log file:", __FILE__, __LINE__ - 2); } free (lg); } list_free(l); sr->loglst = NULL; }
void log_test_end(SRunner * sr, TestResult * tr) { srunner_send_evt(sr, tr, CLEND_T); }
void log_suite_end(SRunner * sr, Suite * s) { srunner_send_evt(sr, s, CLEND_S); }
void log_suite_start(SRunner * sr, Suite * s) { srunner_send_evt(sr, s, CLSTART_S); }
void log_srunner_end(SRunner * sr) { srunner_send_evt(sr, NULL, CLEND_SR); }
void log_srunner_start(SRunner * sr) { srunner_send_evt(sr, NULL, CLSTART_SR); }