[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH OSSTEST v3 08/13] ts-libvirt-build: run libvirt test suite



We're interested in xlconfigtest.

Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 ts-libvirt-build | 35 ++++++++++++++++++++++++++---------
 1 file changed, 26 insertions(+), 9 deletions(-)

diff --git a/ts-libvirt-build b/ts-libvirt-build
index f764b53..713bea0 100755
--- a/ts-libvirt-build
+++ b/ts-libvirt-build
@@ -27,6 +27,7 @@ builddirsprops();
 
 our %submodmap = qw(gnulib gnulib);
 our $submodules;
+our $xenprefix;
 
 sub libvirtd_init ();
 
@@ -39,15 +40,6 @@ sub checkout () {
 }
 
 sub config() {
-    my $xenprefix;
-    foreach (qw(/usr/local /usr)) {
-       if (target_file_exists($ho, "$xendist$_/lib/libxenctrl.so")) {
-           $xenprefix="$xendist$_";
-           last;
-       }
-    }
-    die "no xen prefix" unless $xenprefix;
-
     # Uses --no-git because otherwise autogen.sh will undo
     # submodulefixup's attempts to honour
     # revision_libvirt_gnulib. This in turn requires that we specify
@@ -75,6 +67,19 @@ sub build() {
 END
 }
 
+sub runtest() {
+     target_cmd_build($ho, 3600, $builddir, <<END);
+        cd libvirt
+        rm -f ../libvirt-test-suite-ok-stamp
+        (LD_LIBRARY_PATH=$xenprefix/lib/ \\
+             make check VIR_TEST_EXPENSIVE=1 2>&1 && \\
+             touch ../libvirt-test-suite-ok-stamp) \\
+             | tee ../libvirt-test-suite-log
+        test -f ../libvirt-test-suite-ok-stamp #/
+        echo ok.
+END
+}
+
 sub install() {
     target_cmd_build($ho, 300, $builddir, <<END);
         mkdir -p dist
@@ -90,9 +95,21 @@ END
 END
 }
 
+sub setxenprefix() {
+    foreach (qw(/usr/local /usr)) {
+        if (target_file_exists($ho, "$xendist$_/lib/libxenctrl.so")) {
+            $xenprefix="$xendist$_";
+            last;
+        }
+    }
+    die "no xen prefix" unless $xenprefix;
+}
+
 checkout();
+setxenprefix();
 config();
 build();
+runtest();
 install();
 built_stash($ho, $builddir, 'dist', 'libvirtdist');
 
-- 
1.9.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.