[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH 09/24] cs-hosts-list, standalone-generate-dump-flight-runvars: make compatible



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@xxxxxxxxxxxxx>
---
 cs-hosts-list                           | 18 ++++++++++++++++--
 standalone-generate-dump-flight-runvars |  1 +
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/cs-hosts-list b/cs-hosts-list
index 9b82d51..16b5219 100755
--- a/cs-hosts-list
+++ b/cs-hosts-list
@@ -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) {
diff --git a/standalone-generate-dump-flight-runvars 
b/standalone-generate-dump-flight-runvars
index 8fcc852..04631b3 100755
--- a/standalone-generate-dump-flight-runvars
+++ b/standalone-generate-dump-flight-runvars
@@ -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
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.