]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
tests: back to short test names
authorEric Blake <eblake@redhat.com>
Fri, 25 May 2012 02:34:16 +0000 (20:34 -0600)
committerEric Blake <eblake@redhat.com>
Fri, 25 May 2012 03:09:03 +0000 (21:09 -0600)
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.

tests/testutils.c

index 98595adf23fdc2eb9966573b918c60027808ea99..8f2ca510677505e34c6e05b9eabadfa1c17fbd18 100644 (file)
@@ -35,6 +35,7 @@
 #include "logging.h"
 #include "command.h"
 #include "virrandom.h"
+#include "dirname.h"
 
 #if TEST_OOM_TRACE
 # include <execinfo.h>
@@ -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"