]> xenbits.xensource.com Git - people/aperard/osstest.git/commitdiff
cs-hosts-list, standalone-generate-dump-flight-runvars: make compatible
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 16 May 2017 17:40:39 +0000 (18:40 +0100)
committerIan Jackson <ian.jackson@eu.citrix.com>
Wed, 17 May 2017 22:53:57 +0000 (23:53 +0100)
Honour OSSTEST_HOSTSLIST_DUMMY, to cause cs-hosts-list to produce
dummy output.  This means that standalone-generate-dump-flight-runvars
can now try generating flights whose contents depend on the host
database, and which are therefore normally only useable in Executive
mode.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
cs-hosts-list
standalone-generate-dump-flight-runvars

index 9b82d519b414bac1d15008ee44394fb54ee6c33a..16b52192dbebae7c6b4d94c054244160df647d9e 100755 (executable)
@@ -52,6 +52,22 @@ while (@ARGV && $ARGV[0] =~ m/^-/) {
 @ARGV == 1 or die $!;
 my ($flags) = @ARGV;
 
+my $o;
+
+if ($ENV{'OSSTEST_HOSTSLIST_DUMMY'}) {
+    $o .= "SOMEHOST";
+    if (@arches) {
+       $o .= " $kernels[0]";
+       $o .= " {".join(',',@arches)."}";
+    }
+    if (@suites) {
+       $o .= " $suites[0]";
+    }
+    $o .= "\n";
+    print $o or die $!;
+    exit 0;
+}
+
 my @qargs;
 my $qtxt= <<END;
         SELECT resname
@@ -75,8 +91,6 @@ my $flagq = $dbh_tests->prepare(<<END);
          WHERE hostname=? AND hostflag=?
 END
 
-my $o;
-
 sub report_arch ($) {
     my ($host) = @_;
     foreach my $kernel (@kernels) {
index 8fcc852c9c6f17668a3fc5dad74962cf8d80f234..04631b3d07904f74225143cf9860b9035c0cbaf3 100755 (executable)
@@ -41,6 +41,7 @@ fi
 : ${AP_FETCH_PLACEHOLDERS:=y}
 export AP_FETCH_PLACEHOLDERS
 
+export OSSTEST_HOSTSLIST_DUMMY=1
 
 if [ "x$AP_FETCH_PLACEHOLDERS" != xy ]; then
     if [ "x$AP_FETCH_MEMO_KEEP" = x ]; then