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

[Xen-devel] [PATCH v4 2/9] dummy flight generation: cs-hosts-list should not print { }



From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>

With newer bash, this causes
      local envvar="FREEBSD_${arch^^}_BUILDJOB"
      if [ -n "${!envvar}" ]; then
to (properly) report a syntax error.

As Roger says, it is better to print a dummy host for each
architecture, so do that.

Reported-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 cs-hosts-list | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/cs-hosts-list b/cs-hosts-list
index 6b910ae3..384ed461 100755
--- a/cs-hosts-list
+++ b/cs-hosts-list
@@ -92,15 +92,18 @@ my ($flags) = @ARGV;
 my $o;
 
 if ($ENV{'OSSTEST_HOSTSLIST_DUMMY'}) {
-    $o .= "SOMEHOST";
-    if (@arches) {
-       $o .= " $kernels[0]";
-       $o .= " {".join(',',@arches)."}";
+    foreach my $arch (@arches ? @arches : qw(SOMEARCH)) {
+        $o .= "SOMEHOST";
+        $o .= "-\U$arch" if @arches;
+        if (@arches) {
+            $o .= " $kernels[0]";
+            $o .= " $arch";
+        }
+        if (@suites) {
+            $o .= " $suites[0]";
+        }
+        $o .= "\n";
     }
-    if (@suites) {
-       $o .= " $suites[0]";
-    }
-    $o .= "\n";
     print $o or die $!;
     exit 0;
 }
-- 
2.17.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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