Esempio n. 1
0
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);
}
Esempio n. 2
0
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);
}
Esempio n. 3
0
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;
}
Esempio n. 4
0
void log_test_end(SRunner * sr, TestResult * tr)
{
    srunner_send_evt(sr, tr, CLEND_T);
}
Esempio n. 5
0
void log_suite_end(SRunner * sr, Suite * s)
{
    srunner_send_evt(sr, s, CLEND_S);
}
Esempio n. 6
0
void log_suite_start(SRunner * sr, Suite * s)
{
    srunner_send_evt(sr, s, CLSTART_S);
}
Esempio n. 7
0
void log_srunner_end(SRunner * sr)
{
    srunner_send_evt(sr, NULL, CLEND_SR);
}
Esempio n. 8
0
void log_srunner_start(SRunner * sr)
{
    srunner_send_evt(sr, NULL, CLSTART_SR);
}