]> xenbits.xensource.com Git - osstest.git/commitdiff
Executive: cs-job-create: Check that OSSTEST_FLIGHT is not set
authorIan Jackson <ian.jackson@eu.citrix.com>
Wed, 16 Sep 2015 12:28:54 +0000 (13:28 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 18 Sep 2015 11:37:30 +0000 (12:37 +0100)
If OSSTEST_FLIGHT is set on entry to JobDB::Executive::flight_create,
fail.  This obviously represents some kind of mistake.

One effect is that standalone-generate-dump-flight-runvars won't fill
an Executive database with test flights.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Osstest/JobDB/Executive.pm

index cc52f57f8083594f4e0f706ec27b6aa41d09ab17..6ba3d37609af3b686a37f378decce5c9b82d4d33 100644 (file)
@@ -89,6 +89,8 @@ END
 
 sub flight_create ($$$) { #method
     my ($jd,$intended,$branch) = @_;
+    die "OSSTEST_FLIGHT set on entry to JobDB::Executive::flight_create\n"
+       if $ENV{'OSSTEST_FLIGHT'};
     $dbh_tests->do(<<END, {}, $branch, $intended);
              INSERT INTO flights
                          (flight,  started, blessing,       branch, intended)