]> xenbits.xensource.com Git - people/aperard/osstest.git/commitdiff
sg-report-job-history (nfc): Add new hostvarcols calculation
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 10 Aug 2020 15:04:39 +0000 (16:04 +0100)
committerIan Jackson <ian.jackson@eu.citrix.com>
Wed, 19 Aug 2020 10:41:18 +0000 (11:41 +0100)
We are going to want to replace the existing @hostvarcols
calculation.  Provide a new one based on $ri->{Hosts}.

Right now, die if they don't produce the same answers.  This still
works, which shows that the calculation is right.

Tested-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
sg-report-job-history

index 118926c64d2e78bc79020f81b8dd39ed202a20e7..fb2930a9594e571ad54a73c1a8cac163bd983103 100755 (executable)
@@ -206,6 +206,13 @@ END
         push @test_rows, $ri;
     }
 
+    my %hostvarnames;
+    foreach my $ri (@test_rows) {
+       $hostvarnames{$_}=1 foreach keys %{ $ri->{Hosts} }
+    }
+    my @hostvarcols2 = sort keys %hostvarnames;
+    die unless "@hostvarcols" eq "@hostvarcols2";
+
     my $osstestverq= db_prepare(<<END);
         SELECT DISTINCT harness
           FROM flights_harness_touched