char *file; /* File where the test occured */
int line; /* Line number where the test occurred */
char *tcname; /* Test case that generated the result */
+ char *tfname; /* Test function that generated the result */
char *msg; /* Failure message */
};
exact_msg = (tr->rtype == CRERROR) ? "(after this point) ": "";
if ((print_mode >= CRVERBOSE && tr->rtype == CRPASS) ||
(tr->rtype != CRPASS && print_mode >= CRNORMAL)) {
- fprintf (file, "%s:%d:%s:%s: %s%s\n",
+ fprintf (file, "%s:%d:%s:%s:%s: %s%s\n",
tr->file, tr->line,
rtype_to_string(tr->rtype), tr->tcname,
+ tr->tfname,
exact_msg, tr->msg);
}
}
static void srunner_run_tcase (SRunner *sr, TCase *tc);
static void srunner_add_failure (SRunner *sr, TestResult *tf);
static TestResult *tfun_run (int msqid, char *tcname, TF *tf);
-static TestResult *receive_result_info (int msqid, int status, char *tcname);
+static TestResult *receive_result_info (int msqid, int status, char *tcname,
+ char *tfname);
static void receive_last_loc_info (int msqid, TestResult *tr);
static void receive_failure_info (int msqid, int status, TestResult *tr);
static List *srunner_resultlst (SRunner *sr);
}
}
-static TestResult *receive_result_info (int msqid, int status, char *tcname)
+static TestResult *receive_result_info (int msqid, int status, char *tcname,
+ char *tfname)
{
TestResult *tr = emalloc (sizeof(TestResult));
tr->tcname = tcname;
+ tr->tfname = tfname;
receive_last_loc_info (msqid, tr);
receive_failure_info (msqid, status, tr);
return tr;
_exit(EXIT_SUCCESS);
}
(void) wait(&status);
- return receive_result_info(msqid, status, tcname);
+ return receive_result_info(msqid, status, tcname, tfun->name);
}