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

[OSSTEST PATCH 59/60] sg-report-job-history: Provide --time-limit


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Date: Fri, 14 Aug 2020 18:22:04 +0100
  • Authentication-results: esa3.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:27:05 +0000
  • Ironport-sdr: 2GK7l3G/uOcKXbY4SjRQWQUlQEzoo5dZmdQlsaPFIRd6/Bs+9n55B0Vghq5A0xGQtUfKni4ICU +5qZt2lVKqGkOPDCXSNi1JSmSP74g64HGAmdZBJsyBSPgHzfpv+97ea9FKR6uNd3KPsY7qbpah YxR9GumtmQbVyhm4RVuTe1YGNXeU2YCtSQ5dR6efxtAteefE5L8ygiEcm8YAYPjijw9RGgi/s6 38kto9Jv2O2LiOnVD2QR7G5cvLGQSd3pa5LvemQ4jabUThiukgOzTlOvbDAru1PCzlvnrecGKb Ma0=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Calculate a minflight based on the time limit, and set the time limit
to a year ago by default.

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 5d2a7e15..e09c694f 100755
--- a/sg-report-job-history
+++ b/sg-report-job-history
@@ -30,6 +30,7 @@ use Osstest::HistoryReport;
 
 our (@blessings,@branches);
 our $limit= 100;
+our $timelimit= 86400 * (366 + 14);
 our $htmlout = '.';
 our $flight;
 our $maxjobs=10;
@@ -44,6 +45,8 @@ while (@ARGV && $ARGV[0] =~ m/^-/) {
         $$1= $2;
     } elsif (m/^--(limit)\=([1-9]\d*)$/) {
         $$1= $2;
+    } elsif (m/^--time-limit\=([1-9]\d*)$/) {
+        $timelimit= $1;
     } elsif (restrictflight_arg($_)) {
        # Handled by Executive
     } elsif (m/^--html-dir=(.*)$/) {
@@ -67,6 +70,9 @@ csreadconfig();
 
 our @jobs;
 
+our $minflight = minflight_by_time($timelimit);
+print DEBUG "MINFLIGHT $minflight\n";
+
 sub findflight () {
     my $branches= $dbh_tests->selectcol_arrayref(<<END, {}, $flight);
         SELECT branch FROM flights WHERE flight=?
@@ -144,6 +150,7 @@ END
         SELECT * 
           FROM jobs JOIN flights USING (flight)
          WHERE ($cond)
+           AND flight > $minflight
       ORDER BY flight DESC
          LIMIT $limit
 END
-- 
2.11.0




 


Rackspace

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