From: Ian Jackson Date: Wed, 2 May 2018 15:00:26 +0000 (+0100) Subject: ts-xen-install: Drop obsolete --check and $checkmode X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=80bddfbbe6b8b3c8ebb0ca02632295c47b5fc09f;p=people%2Froyger%2Fosstest.git ts-xen-install: Drop obsolete --check and $checkmode Since 5edec3222ff14b8200d5b41ed9af3c8d04c27314 ts-xen-build-check: reimplementation ... in 2011 we have a fully general version, and the --check option is no longer used. And since 467d6239daa352483ec8fef003bd4fc723702b77 pygrub: guest kernel install: move target_extract_jobdist_path into Osstest also in 2011, --check has not worked properly, because that commit moved the relevant code somewhere where $checkmode was not available and simply dropped the check. So remove the vestigial code in ts-xen-build. As for @ARGV, we simply die if we see something that looks like an option. Signed-off-by: Ian Jackson --- diff --git a/ts-xen-install b/ts-xen-install index a9f8631..fcbb697 100755 --- a/ts-xen-install +++ b/ts-xen-install @@ -26,23 +26,17 @@ use Osstest::TestSupport; use Data::Dumper; use Osstest::CXFabric; -my $checkmode= 0; - tsreadconfig(); our @hos; -if (@ARGV and $ARGV[0] eq '--check') { - $checkmode= 1; - shift @ARGV; - logm("checking builds are done..."); -} else { - if (!@ARGV) { - push @ARGV, 'host'; - } - foreach my $k (@ARGV) { - push @hos, selecthost($k); - } +die if @ARGV && $ARGV[0] =~ m/^-/; + +if (!@ARGV) { + push @ARGV, 'host'; +} +foreach my $k (@ARGV) { + push @hos, selecthost($k); } our $ho; @@ -372,19 +366,15 @@ sub forbidden () { END } -if ($checkmode) { - extract(); -} else { - die if @hos > 1; - $ho= $hos[0]; +die if @hos > 1; +$ho= $hos[0]; - packages(); - extradebs(); - extract(); - forbidden(); - adjustconfig(); - setupboot(); - setupinitd(); - ensurebridge(); - hosts(); -} +packages(); +extradebs(); +extract(); +forbidden(); +adjustconfig(); +setupboot(); +setupinitd(); +ensurebridge(); +hosts();