]> xenbits.xensource.com Git - people/liuw/osstest.git/commitdiff
sg-report-host-history: Use a hash for hosts
authorIan Jackson <ian.jackson@eu.citrix.com>
Wed, 17 Jun 2015 15:57:39 +0000 (16:57 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 18 Jun 2015 15:31:04 +0000 (16:31 +0100)
This will allow deduplication.  No functional change other than a
change to the order of processing.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
sg-report-host-history

index 5a3f8be0e2f1854d155cca251bf86c3fa966d6ca..8a4d40f1ba65e8bf073e8a29d2a61453ef89be96 100755 (executable)
@@ -249,7 +249,13 @@ $dbh_tests->do("SET LOCAL enable_seqscan=false");
 # of the runvars table, rather than walking backwards through the
 # flights until it has what we've told it is enough.
 
+our %hosts;
+
 foreach my $host (@ARGV) {
+    $hosts{$host}++;
+}
+
+foreach my $host (sort keys %hosts) {
     db_retry($dbh_tests, [qw(flights)], sub {
        reporthost $host;
     });