diff mbox

[OSSTEST,v3,1/2] Move collectversions from ts-xen-build into Osstest::BuildSupport

Message ID 1454664639-31814-1-git-send-email-ian.campbell@citrix.com
State New, archived
Headers show

Commit Message

Ian Campbell Feb. 5, 2016, 9:30 a.m. UTC
I'm going to have a need for it elsewhere.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/BuildSupport.pm | 12 ++++++++++++
 ts-xen-build            | 13 +------------
 2 files changed, 13 insertions(+), 12 deletions(-)
diff mbox

Patch

diff --git a/Osstest/BuildSupport.pm b/Osstest/BuildSupport.pm
index 933f6e1..a183546 100644
--- a/Osstest/BuildSupport.pm
+++ b/Osstest/BuildSupport.pm
@@ -42,6 +42,7 @@  BEGIN {
 
                       xendist
                       $xendist
+                      collect_xen_built_versions
 
                       submodulefixup submodule_have submodule_find
 
@@ -84,6 +85,17 @@  sub xendist () {
 	($ho, 'xendist', '', $r{"buildjob"});
 }
 
+sub collect_xen_built_versions () {
+    my $tools="$builddir/xen/tools";
+    my $extras="$builddir/xen/extras";
+    store_revision($ho, 'qemu', "$tools/ioemu-dir", 1);
+    store_revision($ho, 'qemu', "$tools/qemu-xen-traditional-dir", 1);
+    store_revision($ho, 'qemuu', "$tools/qemu-xen-dir", 1);
+    store_revision($ho, 'seabios', "$tools/firmware/seabios-dir", 1);
+    store_revision($ho, 'ovmf', "$tools/firmware/ovmf-dir", 1);
+    store_revision($ho, 'minios', "$extras/mini-os", 1);
+}
+
 #----- submodules -----
 
 sub submodulefixup ($$$$) {
diff --git a/ts-xen-build b/ts-xen-build
index 8f92729..382fe62 100755
--- a/ts-xen-build
+++ b/ts-xen-build
@@ -151,17 +151,6 @@  END
     }
 }
 
-sub collectversions () {
-    my $tools="$builddir/xen/tools";
-    my $extras="$builddir/xen/extras";
-    store_revision($ho, 'qemu', "$tools/ioemu-dir", 1);
-    store_revision($ho, 'qemu', "$tools/qemu-xen-traditional-dir", 1);
-    store_revision($ho, 'qemuu', "$tools/qemu-xen-dir", 1);
-    store_revision($ho, 'seabios', "$tools/firmware/seabios-dir", 1);
-    store_revision($ho, 'ovmf', "$tools/firmware/ovmf-dir", 1);
-    store_revision($ho, 'minios', "$extras/mini-os", 1);
-}
-
 sub divide () {
     # Only move hv to xeninstall, so that we can have
     # xenpolicy in tools tarball.
@@ -248,7 +237,7 @@  sub trapping ($) {
 checkout();
 
 trapping(\&build);
-trapping(\&collectversions);
+trapping(\&collect_xen_built_versions);
 
 die "*** something failed:\n\n".(join "\n\n",@probs)."\n** something failed"
     if @probs;