Commit 1e73cccf authored by Peter Hutterer's avatar Peter Hutterer

test: make the test case failure output easier to select

Split the suite and test case name up so it's easier to select with a
double-click in the terminal. Because usually those tests need to be re-run
individually and making that easier is a good thing.

Previously:
:: Failure: ../test/test-tablet.c:4434:touch_arbitration:wacom-cintiq-13hdt-pen-tablet

Now:
:: Failure: ../test/test-tablet.c:4434: touch_arbitration(wacom-cintiq-13hdt-pen-tablet)
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent d5bdf7f2
Pipeline #38638 passed with stages
in 8 minutes and 46 seconds
......@@ -850,11 +850,22 @@ litest_run_suite(struct list *tests, int which, int max, int error_fd)
trs = srunner_failures(sr);
for (int i = 0; i < failed; i++) {
char tname[256];
char *c = tname;
/* tr_tcname is in the form "suite:testcase", let's
* convert this to "suite(testcase)" to make
* double-click selection in the terminal a bit
* easier. */
snprintf(tname, sizeof(tname), "%s)", tr_tcname(trs[i]));
if ((c = index(c, ':')))
*c = '(';
dprintf(error_fd,
":: Failure: %s:%d:%s\n",
":: Failure: %s:%d: %s\n",
tr_lfile(trs[i]),
tr_lno(trs[i]),
tr_tcname(trs[i]));
tname);
}
free(trs);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment