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

[Xen-devel] [OSSTEST PATCH [RFC] 2/3] ts-debian-fixup: support multiple guests



so that now, for example, this is possible:

$ OSSTEST_JOB=test-amd64-amd64-xl
$ export OSSTEST_JOB
$ ./ts-debian-install host=tg03 debian1 debian2
$ ./ts-debian-fixup host=tg03 debian1 debian2

This again assumes that either the host is explicitly specified
via a 'host=somehost' first argument, or the argument are all
guest names.

Signed-off-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx>
---
 ts-debian-fixup |   30 ++++++++++++++++++++----------
 1 file changed, 20 insertions(+), 10 deletions(-)

diff --git a/ts-debian-fixup b/ts-debian-fixup
index f001418..e281ad7 100755
--- a/ts-debian-fixup
+++ b/ts-debian-fixup
@@ -22,7 +22,14 @@ use Osstest::TestSupport;
 
 tsreadconfig();
 
-our ($ho,$gho) = ts_get_host_guest(@ARGV);
+our $whhost = 'host';
+if (@ARGV && ($ARGV[0] =~ m/^host=.*$/ || $ARGV[0] eq 'host')) {
+    $whhost = $ARGV[0];
+    shift @ARGV;
+}
+our (@guests) = @ARGV;
+
+our ($ho,$gho);
 
 our ($cfgfile,$cfgstash,$cfg);
 
@@ -163,12 +170,15 @@ sub writecfg () {
     target_putfile_root($ho,10, $cfgstash, $cfgfile);
 }
 
-savecfg();
-ether();
-target_kernkind_check($gho);
-access();
-console();
-filesystems();
-otherfixupcfg();
-writecfg();
-unmount();
+foreach my $g (@guests) {
+    ($ho,$gho) = ts_get_host_guest($whhost, $g);
+    savecfg();
+    ether();
+    target_kernkind_check($gho);
+    access();
+    console();
+    filesystems();
+    otherfixupcfg();
+    writecfg();
+    unmount();
+}


_______________________________________________
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®.