From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: [OSSTEST PATCH [RFC] 2/3] ts-debian-fixup: support multiple guests Date: Thu, 5 Dec 2013 15:10:00 +0000 Message-ID: <20131205150959.20194.3702.stgit@drall.uk.xensource.com> References: <20131205150935.20194.10427.stgit@drall.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20131205150935.20194.10427.stgit@drall.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org 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 --- 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(); +}