]> xenbits.xensource.com Git - people/iwj/osstest.git/commitdiff
cr-publish-flight-logs: do not push harness by default, only when invoked by cr*...
authorIan Jackson <iwj@woking.cam.xci-test.com>
Fri, 13 Sep 2013 14:13:24 +0000 (15:13 +0100)
committerIan Jackson <iwj@woking.cam.xci-test.com>
Fri, 13 Sep 2013 14:27:18 +0000 (15:27 +0100)
cr-publish-flight-logs
cri-args-hostlists
cri-bisect

index b9fab3ec4c328df29c81257f363c624990ebea97..56100daff13c13a84d72a11a639ca8c84cdafb70 100755 (executable)
@@ -25,6 +25,12 @@ our %c;
 
 readglobalconfig();
 
+my $push_harness = 0;
+if (@ARGV && $ARGV[0] eq '--push-harness') {
+    shift @ARGV;
+    $push_harness = 1;
+}
+
 die "usage: ./cr-publish-flight-logs <flight>" unless @ARGV==1;
 
 my $flight= shift @ARGV;
@@ -33,11 +39,13 @@ die unless $flight =~ m/^\d+$/;
 open LOCK, "> $c{GlobalLockDir}/publish-lock" or die $!;
 flock LOCK, LOCK_EX or die $!;
 
-my $githost= $c{HarnessPublishGitUserHost};
-my $gitdir= $c{HarnessPublishGitRepoDir};
+if ($push_harness) {
+    my $githost= $c{HarnessPublishGitUserHost};
+    my $gitdir= $c{HarnessPublishGitRepoDir};
 
-system_checked("git-push $githost:$gitdir HEAD:flight-$flight");
-system_checked("ssh $githost 'cd $gitdir && git update-server-info'");
+    system_checked("git-push $githost:$gitdir HEAD:flight-$flight");
+    system_checked("ssh $githost 'cd $gitdir && git update-server-info'");
+}
 
 sub copydir ($$) {
     my ($src,$dst) = @_;
index 0e2358f4a2d69b4282e5a4b679c14230ff0f4e66..9f34e4a7ab6e5009588a4df069a2559e8541e981 100644 (file)
@@ -114,7 +114,7 @@ start_email () {
 publish_send_email () {
        local flight=$1
        exec >&2
-       ./cr-publish-flight-logs $flight
+       ./cr-publish-flight-logs --push-harness $flight
        send_email tmp/$flight.email
 }
 
index aae5a688d0fd84346f3674294d283af716d0a0d8..af3f23f84612eb9bd199fbc5c6e72403d917ca99 100644 (file)
@@ -110,7 +110,7 @@ END
         if $flight_executed; then
                 echo >&3 ----------------------------------------
                 ./sg-report-flight >&3 $flight
-                ./cr-publish-flight-logs $flight
+                ./cr-publish-flight-logs --push-harness $flight
         fi
         exec 3>&-
         send_email tmp/$flight.email