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

[Xen-devel] [OSSTEST PATCH 19/26] Xen built versions: Move list of subtrees to BuildSupport



Turn the adhoc list of tree names and subdirectories in
collect_xen_built_versions into a hash, which we iterate over.

Doing this in a data-driven way allows us to provide this information
to callers of collect_xen_built_versions, which is going to be helpful
in a moment.

Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 Osstest/BuildSupport.pm | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/Osstest/BuildSupport.pm b/Osstest/BuildSupport.pm
index a183546..d59eace 100644
--- a/Osstest/BuildSupport.pm
+++ b/Osstest/BuildSupport.pm
@@ -42,7 +42,7 @@ BEGIN {
 
                       xendist
                       $xendist
-                      collect_xen_built_versions
+                      collect_xen_built_versions %xensubtrees
 
                       submodulefixup submodule_have submodule_find
 
@@ -85,15 +85,21 @@ sub xendist () {
        ($ho, 'xendist', '', $r{"buildjob"});
 }
 
+our %xensubtrees = qw(
+    qemu       tools/ioemu-dir
+    qemu       tools/qemu-xen-traditional-dir
+    qemuu      tools/qemu-xen-dir
+    seabios    tools/firmware/seabios-dir
+    ovmf       tools/firmware/ovmf-dir
+    minios     extras/mini-os
+    );
+
 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);
+    my $xendir = "$builddir/xen";
+    foreach my $subtree (sort keys %xensubtrees) {
+       my $subdir = $xendir.'/'.$xensubtrees{$subtree};
+       store_revision($ho, $subtree, "$subdir", 1);
+    }
 }
 
 #----- submodules -----
-- 
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®.