]> xenbits.xensource.com Git - people/dariof/osstest.git/commitdiff
ts-host-install: New --poweron-test-only option
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 15 May 2015 16:54:03 +0000 (16:54 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 19 May 2015 12:30:02 +0000 (13:30 +0100)
We are having a difficulty with one of the test boxes, which can be
most easily reproduced by running ts-host-install to power cycle the
box and then see if it wakes up enough to fetch a preseed file.

Keep this mode of operation in tree in case it's useful in future.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
ts-host-install

index dfee932fded8984106d407a16558771c4afcdde8..69de4b69bdc61b6fae1c05a8c1d50ccf538f2b2b 100755 (executable)
@@ -27,6 +27,7 @@ use Osstest::Logtailer;
 tsreadconfig();
 
 my $debconf_priority;
+my $poweron_test_only;
 
 our %xopts;
 
@@ -35,6 +36,8 @@ while (@ARGV and $ARGV[0] =~ m/^-/) {
     last if m/^--$/;
     if (m/^--priority(?:=(.*))?$/) {
         $xopts{DebconfPriority}= defined($1) ? $1 : 'low';
+    } elsif  (m/^--poweron-test-only$/) {
+       $poweron_test_only= 1;
     } elsif  (m/^--rescue$/) {
        $xopts{RescueMode}= 1;
     }
@@ -71,6 +74,13 @@ END
     await_webspace_fetch_byleaf(get_timeout($ho,'reboot',$timeout{ReadPreseed})
                                 , 1,
                                 $logtailer, $ho, $ps_url);
+
+    if ($poweron_test_only) {
+       logm("Hooray, power on worked.");
+       power_state($ho, 0);
+       exit 0;
+    }
+
     setup_pxeboot_local($ho);
 
     await_tcp(get_timeout($ho,'reboot',$timeout{Sshd}), 14,$ho);