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

[OSSTEST PATCH 42/60] sg-report-job-history (nfc): Add new hostvarcols calculation


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Date: Fri, 14 Aug 2020 18:21:47 +0100
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Delivery-date: Fri, 14 Aug 2020 17:26:51 +0000
  • Ironport-sdr: xb4J0d22X3Zh3ZJ3X8aJtKQ9o14b9OJE/B1nJdYOFR4A/tgIUjPRFj3MZTx8GDMinayn7e3Fti ewWMlXXmlhmAz5xTJ3u1WpMjPK5wHua7z1en6QY+e4AKZvAfOjmg03AWQ0gfEAdZJXdgQvOlMM /Ymy11hXV6UJJKVulCy/RUXWtt0FzfG/mefN1acde3uL8igJo9HwwNTwQLc4jUmhrti89sgITg ckQI1MihPzBrYxP6kvPpnPD6yIHOzjfZMzKyBQtDsRNaV4bvAYEm3a32WUZ92LBB/85Y02zXan vnI=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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@xxxxxxxxxxxxx>
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 sg-report-job-history | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/sg-report-job-history b/sg-report-job-history
index 118926c6..fb2930a9 100755
--- a/sg-report-job-history
+++ b/sg-report-job-history
@@ -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
-- 
2.11.0




 


Rackspace

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