]> xenbits.xensource.com Git - people/iwj/osstest.git/commitdiff
wip reorg fixups
authorIan Jackson <iwj@woking.cam.xci-test.com>
Tue, 16 Oct 2012 18:15:54 +0000 (19:15 +0100)
committerIan Jackson <iwj@woking.cam.xci-test.com>
Tue, 16 Oct 2012 18:15:54 +0000 (19:15 +0100)
25 files changed:
tcl/JobDB-Standalone.tcl
ts-debian-fixup
ts-debian-install
ts-guest-destroy
ts-guest-localmigrate
ts-guest-migrate
ts-guest-saverestore
ts-guest-start
ts-guest-stop
ts-guests-nbd-mirror
ts-host-fail
ts-host-powercycle
ts-host-reboot
ts-hosts-allocate-Executive
ts-kernel-build
ts-leak-check
ts-logs-capture
ts-redhat-install
ts-remus-check
ts-remus-start
ts-windows-install
ts-xen-build
ts-xen-build-check
ts-xen-build-prep
ts-xen-install

index f060c64f2306ee389c82ca078821c7eac08872b2..2ff40e97750c666359876589371607155d847440 100644 (file)
@@ -44,7 +44,8 @@ proc set-flight {} {
 }
 
 proc spawn-step-begin {flight job ts stepnovar} {
-    variable stepcounter 0
+    variable stepcounter
+    if {![info exists stepcounter]} { set stepcounter 0 }
     upvar 1 $stepnovar stepno
     set stepno [incr stepcounter]
 }
index 701420715b7d4259dea47a001e0eadfc64227474..7f5479f65d4a8625a7f0cd36f504db6abd3a2803 100755 (executable)
@@ -3,9 +3,10 @@
 use strict qw(vars);
 use DBI;
 use Osstest;
+use Osstest::TestSupport;
+
+tsreadconfig();
 
-readconfig();
-opendb_state();
 our ($ho,$gho) = ts_get_host_guest(@ARGV);
 
 our ($cfgfile,$cfgstash,$cfg);
index 74c0cce2667d305a46c8f456c0d4d8cb075c7006..6dadfa8a3e7494da280c8998d39b136ace18ac10 100755 (executable)
@@ -3,6 +3,7 @@
 use strict qw(vars);
 use DBI;
 use Osstest;
+use Osstest::TestSupport;
 
 tsreadconfig();
 
index cdfb9145eb6f23af51cf73a7c0bb1a336ff7dbcf..44f46c5d2ec875229efc44d9ed01a806013541f3 100755 (executable)
@@ -3,9 +3,10 @@
 use strict qw(vars);
 use DBI;
 use Osstest;
+use Osstest::TestSupport;
+
+tsreadconfig();
 
-readconfig();
-opendb_state();
 our ($ho,$gho) = ts_get_host_guest(@ARGV);
 
 sub destroy () {
index 4872b1c1cfdcee4db5b9a441fcede1256c129083..688a736224b5c9339629e7177549a36377e280bd 100755 (executable)
@@ -3,11 +3,11 @@
 use strict qw(vars);
 use DBI;
 use Osstest;
+use Osstest::TestSupport;
 
 our %timeout= qw(Migrate      400);
 
-readconfig();
-opendb_state();
+tsreadconfig();
 
 our $reps= 1;
 
index f804f6fa4735424782cb90397fd20e8c1c285e1c..9b68be520ff8529140100cd66d788f808fffc7a0 100755 (executable)
@@ -3,11 +3,12 @@
 use strict qw(vars);
 use DBI;
 use Osstest;
+use Osstest::TestSupport;
 
 our %timeout= qw(Migrate      400);
 
-readconfig();
-opendb_state();
+tsreadconfig();
+
 our $sho = selecthost($ARGV[0]);
 our $dho = selecthost($ARGV[1]);
 our $gho = selectguest($ARGV[2],$sho);
index e3d50f6504a94fb160b6e6ad6639099b9b9d427b..1fe929c09f864720913c38249c0eda75119c69b6 100755 (executable)
@@ -3,9 +3,10 @@
 use strict qw(vars);
 use DBI;
 use Osstest;
+use Osstest::TestSupport;
+
+tsreadconfig();
 
-readconfig();
-opendb_state();
 our ($ho,$gho) = ts_get_host_guest(@ARGV);
 
 sub save () {
index 464f580bb8b4e1fc275f889f40c8cdb913dbd817..314134e6e3789f35d7626abdbea59b2f95335294 100755 (executable)
@@ -3,9 +3,10 @@
 use strict qw(vars);
 use DBI;
 use Osstest;
+use Osstest::TestSupport;
+
+tsreadconfig();
 
-readconfig();
-opendb_state();
 our ($ho,$gho) = ts_get_host_guest(@ARGV);
 
 sub start () {
index 13799560b2755eabeb8c65959e862a2b4b9a4199..d8f26c3cc97f509b1db1cb6d93f066580d015088 100755 (executable)
@@ -3,9 +3,10 @@
 use strict qw(vars);
 use DBI;
 use Osstest;
+use Osstest::TestSupport;
+
+tsreadconfig();
 
-readconfig();
-opendb_state();
 our ($ho,$gho) = ts_get_host_guest(@ARGV);
 
 sub stop () {
index 7fda5c74eadc25cb49c4a6eb9a045d589b632138..5ef3fc82aa1068acb51ea6bc642d9b04c8c88ac2 100755 (executable)
@@ -1,12 +1,11 @@
 #!/usr/bin/perl -w
 
-
 use strict qw(vars);
 use DBI;
 use Osstest;
+use Osstest::TestSupport;
 
-readconfig();
-opendb_state();
+tsreadconfig();
 
 our ($srvhost,$clthost,@gns) = @ARGV;
 
index 46e52902cb86a872eb9c4917388360e61523402d..918e25b114311a02d24486daf27246199c2ee4f0 100755 (executable)
@@ -3,9 +3,9 @@
 use strict qw(vars);
 use DBI;
 use Osstest;
+use Osstest::TestSupport;
 
-readconfig();
-opendb_state();
+tsreadconfig();
 
 our ($whhost) = @ARGV;
 our $ho= selecthost($whhost);
index ff5fc2bf0c2f412838d5f1c3367e0518b0216c10..974a34f7cc159d4c2695d7572a62f8f640e324bd 100755 (executable)
@@ -3,9 +3,9 @@
 use strict qw(vars);
 use DBI;
 use Osstest;
+use Osstest::TestSupport;
 
-readconfig();
-opendb_state();
+tsreadconfig();
 
 my $only;
 if (@ARGV && $ARGV[0] =~ m/^--power=([01])$/) {
index 8f04db1c994d902dec57cbc8eb66ac243ba8f5a1..354915ef3743fae59186c9e9f0d677e3a3a96f0b 100755 (executable)
@@ -3,9 +3,9 @@
 use strict qw(vars);
 use Osstest;
 use DBI;
+use Osstest::TestSupport;
 
-readconfig();
-opendb_state();
+tsreadconfig();
 
 our ($whhost) = @ARGV;
 $whhost ||= 'host';
index b2b80467a92e6c7a04b31e52347e718f4fc89773..8d0bebf851a8ca399bd16cd3fcc475d3119478fa 100755 (executable)
@@ -7,8 +7,9 @@ use Data::Dumper;
 use POSIX;
 use JSON;
 use IO::Handle;
+use Osstest::TestSupport;
 
-readconfig();
+tsreadconfig();
 opendb_state();
 
 open DEBUG, ">/dev/null" or die $!;
index a2bb2c53d354a075e6f84a657de21a09bd007274..257df389a29bb966bb55827304e35e1d93bb9bc2 100755 (executable)
@@ -3,9 +3,10 @@
 use strict qw(vars);
 use DBI;
 use Osstest;
+use Osstest::TestSupport;
+
+tsreadconfig();
 
-readconfig();
-opendb_state();
 our ($whhost) = @ARGV;
 $whhost ||= 'host';
 our $ho= selecthost($whhost);
index 8915b6ef9dce8b8e29319892242b42de73ba56e5..ea9e3b09ae890b8dbb01aae2b711639e332d2f9b 100755 (executable)
@@ -3,9 +3,9 @@
 use strict qw(vars);
 use DBI;
 use Osstest;
+use Osstest::TestSupport;
 
-readconfig();
-opendb_state();
+tsreadconfig();
 
 our ($mode, $whhost) = @ARGV;
 our $ho= selecthost($whhost);
index 89aa5b078984c46d525cd04aa6c13b4ac986efd9..b325058ff69ff4e3365b8a6aafad1fbd15226346 100755 (executable)
@@ -5,9 +5,9 @@ use Osstest;
 use DBI;
 use IO::File;
 use POSIX;
+use Osstest::TestSupport;
 
-readconfig();
-opendb_state();
+tsreadconfig();
 
 our ($whhost) = @ARGV;
 $whhost ||= 'host';
index 4e2fb21efffc3bd08ea93e38f30c6ebbbee0e474..daf0c19adde9e9e4d025d8a80c19cb61573db867 100755 (executable)
@@ -3,9 +3,9 @@
 use strict qw(vars);
 use DBI;
 use Osstest;
+use Osstest::TestSupport;
 
-readconfig();
-opendb_state();
+tsreadconfig();
 
 our $stage=0;
 if (@ARGV && $ARGV[0] =~ m/^--stage(\d+)$/) { $stage=$1; shift @ARGV; }
index 67bbc7727ab01ee0c58a7c6069a53d77c8353403..60334fdff75ee6dac4681e6827809d884360ef33 100755 (executable)
@@ -3,9 +3,10 @@
 use strict qw(vars);
 use DBI;
 use Osstest;
+use Osstest::TestSupport;
+
+tsreadconfig();
 
-readconfig();
-opendb_state();
 my $gn= pop(@ARGV);
 our @ho= map { selecthost($_) } @ARGV;
 our $gho= selectguest($gn,$ho[0]);
index 61b2a056e623b143e67f65640eeaef3530e7939b..5594e2335e83dedb1fa15aeb95c5aada086b0d7c 100755 (executable)
@@ -3,11 +3,12 @@
 use strict qw(vars);
 use DBI;
 use Osstest;
+use Osstest::TestSupport;
 
 our %timeout= qw(Migrate      400);
 
-readconfig();
-opendb_state();
+tsreadconfig();
+
 our $sho = selecthost($ARGV[0]);
 our $dho = selecthost($ARGV[1]);
 our $gho = selectguest($ARGV[2],$sho);
index 3a6393f6a16e6cad1f642063ec6aa4fbbc0eb4d3..ccc0e507edd7b80807568df19cb2b0039b4fc93e 100755 (executable)
@@ -3,9 +3,9 @@
 use strict qw(vars);
 use DBI;
 use Osstest;
+use Osstest::TestSupport;
 
-readconfig();
-opendb_state();
+tsreadconfig();
 
 our ($whhost) = @ARGV;
 $whhost ||= 'host';
index a657dcefd3f5a1eb15a5fa446982fc3cb6f9a236..fa40cbcf77390a1d6564949019cb1aa93ab8a277 100755 (executable)
@@ -5,9 +5,10 @@ use DBI;
 use Osstest;
 use File::Path;
 use POSIX;
+use Osstest::TestSupport;
+
+tsreadconfig();
 
-readconfig();
-opendb_state();
 our ($whhost) = @ARGV;
 $whhost ||= 'host';
 our $ho= selecthost($whhost);
index 8bed45c62d2658dd00df9d5708443c276943ff8e..29414e5c90942fa50f90491a9a8dbcb47fa16e71 100755 (executable)
@@ -1,7 +1,9 @@
 #!/usr/bin/perl -w
 
 use Osstest;
-readconfig();
+use Osstest::TestSupport;
+
+tsreadconfig();
 
 die if @ARGV && $ARGV[0] =~ m/^-/;
 
index 1caea0f87e526daac7ae7491662367edb6441d40..a6251a9004ce0475a9cdab86211d9a62925b7c42 100755 (executable)
@@ -4,9 +4,10 @@ use strict qw(vars);
 use DBI;
 use Osstest;
 use POSIX;
+use Osstest::TestSupport;
+
+tsreadconfig();
 
-readconfig();
-opendb_state();
 our ($whhost) = @ARGV;
 $whhost ||= 'host';
 our $ho= selecthost($whhost);
index 0475fa523ffa717dfd6f73455f637e6e42cf7691..5ee97af719492f272439cc7598b733dcb76e0495 100755 (executable)
@@ -5,12 +5,12 @@ use DBI;
 use Osstest;
 use File::Path;
 use POSIX;
-use OsstestDebian;
+use Osstest::Debian;
+use Osstest::TestSupport;
 
 my $checkmode= 0;
 
-readconfig();
-opendb_state();
+tsreadconfig();
 
 our @hos;