cr-daily-branch, cr-publish-flight-logs: Tolerate failure to push harness
PATCH 1/1 cr-daily-branch, cr-publish-flight-logs: Tolerate failure to push harness
Provide cr-publish-flight-logs --push-harness-try, which attempts the push but doesn't mind if it fails.
If we are not --real, tolerate failure to publish the flight logs.
Also, honour OSSTEST_PUSH_HARNESS which might contain '' or --push-harness or --push-harness-try.
--- cr-publish-flight-logs | 10 ++++++++-- cri-args-hostlists | 5 ++++- 2 files changed, 12 insertions(+), 3 deletions(-)
cr-publish-flight-logs +8 -2
@@ -27,9 +27,9 @@ our %c; readglobalconfig(); my $push_harness = 0; -if (@ARGV && $ARGV[0] eq '--push-harness') { +if (@ARGV && $ARGV[0] =~ m{^--push-harness(?:-try)?$}) { + $push_harness = $&; shift @ARGV; - $push_harness = 1; } my $flight= shift @ARGV // '';
@@ -46,8 +46,14 @@ if ($push_harness) { exit 0 if (!$githost || !$gitdir); + eval { system_checked("git push $githost:$gitdir HEAD:refs/heads/flight-$flight"); system_checked("ssh $githost 'cd $gitdir && git update-server-info'"); + }; + if ($@) { + $push_harness eq '--push-harness-try' or die; + warn; + } } sub copydir ($$) {
cri-args-hostlists +4 -1
@@ -51,6 +51,8 @@ elif [ "x$1" = "x--like-real" ]; then : ${OSSTEST_CRON_SETTINGS:=$dcs-real} : ${OSSTEST_HTML_SUFFIX:=-play} shift +else + : ${OSSTEST_PUSH_HARNESS=--push-harness-try} fi : ${OSSTEST_BLESSING:=play}
@@ -127,7 +129,8 @@ start_email () { publish_send_email () { local flight=$1 exec >&2 - ./cr-publish-flight-logs --push-harness $flight + ./cr-publish-flight-logs ${OSSTEST_PUSH_HARNESS- --push-harness} \ + $flight send_email tmp/$flight.email }
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 10 lines · Ian Jackson
Provide cr-publish-flight-logs --push-harness-try, which attempts the push but doesn't mind if it fails.
If we are not --real, tolerate failure to publish the flight logs.
Also, honour
OSSTEST_PUSH_HARNESSwhich might contain '' or --push-harness or --push-harness-try.CC Roger Pau Monné <[email protected]>Signed-off-by Ian Jackson <[email protected]>
Just tested this by manually killing a cr-daily-branch and it worked properly, see:
http://logs.test-lab.xenproject.org/osstest/logs/124171/
So:
Thanks!
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Roger Pau Monné writes ("Re: [OSSTEST PATCH] cr-daily-branch, cr-publish-flight-logs: Tolerate failure to push harness"):
Quoted 8 lines
Just tested this by manually killing a cr-daily-branch and it worked properly, see:
http://logs.test-lab.xenproject.org/osstest/logs/124171/
So:
Tested-by Roger Pau Monné <[email protected]>
Thanks :-).
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel