]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
build: distribute commandtest files
authorEric Blake <eblake@redhat.com>
Fri, 10 Dec 2010 15:09:13 +0000 (08:09 -0700)
committerEric Blake <eblake@redhat.com>
Fri, 10 Dec 2010 15:44:53 +0000 (08:44 -0700)
* tests/Makefile.am (SUBDIRS): Add commanddata.
* tests/commandtest.c (checkoutput): Delete correct file.
(test4): Delete pid file.
(mymain): Delete unused variable.
* tests/commanddata/Makefile.am: New file.
* configure.ac (AC_OUTPUT): Build new makefile.
Reported by Dominik Klein.

configure.ac
tests/Makefile.am
tests/commanddata/Makefile.am [new file with mode: 0644]
tests/commandtest.c

index dde2cdeea725759704010c9fda88338400fc9a17..d8be160ad96ad9e1a1d0649d0743393559569698 100644 (file)
@@ -2254,6 +2254,7 @@ AC_OUTPUT(Makefile src/Makefile include/Makefile docs/Makefile \
           tests/xmconfigdata/Makefile \
           tests/xencapsdata/Makefile \
           tests/confdata/Makefile \
+          tests/commanddata/Makefile \
           examples/apparmor/Makefile \
           examples/domain-events/events-c/Makefile \
           examples/domsuspend/Makefile \
index e5c8d36b5ca447856f37987d1dbfce04b6d27359..0a235cfcce927ec9a87dd0a2aefdeabbd10e7a5e 100644 (file)
@@ -2,7 +2,7 @@
 
 SHELL = $(PREFERABLY_POSIX_SHELL)
 
-SUBDIRS = confdata sexpr2xmldata \
+SUBDIRS = commanddata confdata sexpr2xmldata \
   xml2sexprdata xmconfigdata xencapsdata
 
 INCLUDES = \
diff --git a/tests/commanddata/Makefile.am b/tests/commanddata/Makefile.am
new file mode 100644 (file)
index 0000000..ea0f8e1
--- /dev/null
@@ -0,0 +1,2 @@
+EXTRA_DIST = \
+   $(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/*.log))
index e95620500bc113e4093ea0e8563732a54357f993..a1bcf688e3558ab5c6323c00fa99e6dca51919ed 100644 (file)
@@ -86,7 +86,7 @@ static int checkoutput(const char *testname)
     ret = 0;
 
 cleanup:
-    unlink(actuallog);
+    unlink(actualname);
     VIR_FREE(actuallog);
     VIR_FREE(actualname);
     VIR_FREE(expectlog);
@@ -248,6 +248,7 @@ static int test4(const void *unused ATTRIBUTE_UNUSED)
 
 cleanup:
     virCommandFree(cmd);
+    unlink(pidfile);
     VIR_FREE(pidfile);
     return ret;
 }
@@ -707,12 +708,6 @@ mymain(int argc, char **argv)
                     1, NAME, NULL) < 0)                               \
         ret = -1
 
-    char *actualname;
-    if (virAsprintf(&actualname, "%s/commandhelper.log", abs_builddir) < 0)
-        return EXIT_FAILURE;
-    unlink(actualname);
-    VIR_FREE(actualname);
-
     DO_TEST(test0);
     DO_TEST(test1);
     DO_TEST(test2);