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

[Xen-devel] [OSSTEST PATCH RFC v2 05/14] BuildSupport: move buildcmd_stamped_logged here



... so that other build scripts can use it, too.

It now accepts one more parameter called "component" to be useful in
other build scripts.

No functional change.

Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
v2: new
---
 Osstest/BuildSupport.pm | 15 +++++++++++++++
 ts-xen-build            | 18 ++----------------
 2 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/Osstest/BuildSupport.pm b/Osstest/BuildSupport.pm
index a183546..dfdf2e4 100644
--- a/Osstest/BuildSupport.pm
+++ b/Osstest/BuildSupport.pm
@@ -36,6 +36,7 @@ BEGIN {
                       $whhost $ho
 
                       builddirsprops
+                      buildcmd_stamped_logged
                       $builddir $makeflags
 
                       prepbuilddirs
@@ -56,6 +57,20 @@ our ($whhost,$ho);
 our ($builddir,$makeflags);
 our ($xendist);
 
+sub buildcmd_stamped_logged ($$$$$$) {
+    my ($timeout, $component, $stampname, $prefix, $cmd, $suffix) = @_;
+    target_cmd_build($ho, $timeout, $builddir, <<END);
+        cd $component
+        $prefix
+        ( $cmd 2>&1 &&             touch ../$stampname-ok-stamp
+        ) |tee ../$stampname-log
+        test -f ../$stampname-ok-stamp
+        $suffix
+        echo ok.
+END
+#/;
+}
+
 sub selectbuildhost {
     # pass \@ARGV
     my ($av) = @_;
diff --git a/ts-xen-build b/ts-xen-build
index 58670f1..5e076d7 100755
--- a/ts-xen-build
+++ b/ts-xen-build
@@ -95,20 +95,6 @@ END
                );
 }
 
-sub buildcmd_stamped_logged ($$$$$) {
-    my ($timeout, $stampname, $prefix, $cmd, $suffix) = @_;
-    target_cmd_build($ho, $timeout, $builddir, <<END);
-        cd xen
-        $prefix
-        ( $cmd 2>&1 &&             touch ../$stampname-ok-stamp
-        ) |tee ../$stampname-log
-        test -f ../$stampname-ok-stamp
-        $suffix
-        echo ok.
-END
-#/;
-}
-
 sub build () {
     my $xend_opt= $r{enable_xend} =~ m/true/ ? "--enable-xend" : 
"--disable-xend";
     my $ovmf_opt= $r{enable_ovmf} =~ m/true/ ? "--enable-ovmf" : 
"--disable-ovmf";
@@ -116,7 +102,7 @@ sub build () {
     my $configure_prefix = $r{cmdprefix_configure} // '';
     my $make_prefix =      $r{cmdprefix_make}      // '';
 
-    buildcmd_stamped_logged(600, 'configure', <<END,<<END,<<END);
+    buildcmd_stamped_logged(600, 'xen', 'configure', <<END,<<END,<<END);
             if test -f configure; then
                 if grep -q -- $xend_opt tools/configure ; then
                    xend=$xend_opt
@@ -130,7 +116,7 @@ END
             fi
 END
 #/;
-    buildcmd_stamped_logged(9000, 'build', '',<<END,'');
+    buildcmd_stamped_logged(9000, 'xen', 'build', '',<<END,'');
             if test -f xen/Kconfig; then
                 $make_prefix make -C xen olddefconfig
             fi
-- 
2.1.4


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

 


Rackspace

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