From e39afdb8984b90d45be89c90438833cd2722fd2f Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Thu, 24 May 2012 20:34:16 -0600 Subject: [PATCH] tests: back to short test names With the switch to modules by default, I was getting super long test output: TEST: /home/remote/eblake/libvirt/tests/.libs/lt-interfacexml2xmltest compared to the former: TEST: interfacexml2xmltest * tests/testutils.c (virtTestMain): Trim off libtool goop. (cherry picked from commit ee407255101e372b9f7943d012f3f92c172be2f0) --- tests/testutils.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/testutils.c b/tests/testutils.c index 98595adf23..8f2ca51067 100644 --- a/tests/testutils.c +++ b/tests/testutils.c @@ -35,6 +35,7 @@ #include "logging.h" #include "command.h" #include "virrandom.h" +#include "dirname.h" #if TEST_OOM_TRACE # include @@ -576,9 +577,9 @@ int virtTestMain(int argc, if (!abs_srcdir) exit(EXIT_AM_HARDFAIL); - progname = argv[0]; - if (STRPREFIX(progname, "./")) - progname += 2; + progname = last_component(argv[0]); + if (STRPREFIX(progname, "lt-")) + progname += 3; if (argc > 1) { fprintf(stderr, "Usage: %s\n", argv[0]); fputs("effective environment variables:\n"