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

[Xen-devel] [OSSTEST PATCH 08/24] cs-hosts-list: Support --suites



Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 cs-hosts-list | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/cs-hosts-list b/cs-hosts-list
index 92f44ee..9b82d51 100755
--- a/cs-hosts-list
+++ b/cs-hosts-list
@@ -31,6 +31,7 @@ csreadconfig();
 
 our @kernels = qw(xen linux);
 our @arches;
+our @suites;
 
 while (@ARGV && $ARGV[0] =~ m/^-/) {
     $_ = shift @ARGV;
@@ -40,6 +41,8 @@ while (@ARGV && $ARGV[0] =~ m/^-/) {
            @arches = split /\,/, $1;
        } elsif (s/^--kernels=(.*)/-/) {
            @kernels = split /\,/, $1;
+       } elsif (s/^--suites=(.*)/-/) {
+           @suites = split /\,/, $1;
        } else {
            die "bad option $_ ?";
        }
@@ -89,12 +92,25 @@ sub report_arch ($) {
     $o .= " NONE NONE";
 }
 
+sub report_suite ($) {
+    my ($host) = @_;
+    foreach my $suite (@suites) {
+       $flagq->execute($host,"suite-$suite");
+       if ($flagq->fetchrow_arrayref()) {
+           $o .= " $suite";
+           return;
+       }
+    }
+    $o .= " NONE";
+}
+
 db_retry($dbh_tests,[],sub {
     $o='';
     $q->execute(@qargs);
     while (my ($host) = $q->fetchrow_array()) {
        $o .= $host;
        report_arch($host) if @arches;
+       report_suite($host) if @suites;
        $o .= "\n";
     }
 });
-- 
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®.