From 2ad39b1a78d94283eb3e11ee75337585ddc6d6d7 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Thu, 30 Oct 2014 08:41:37 +0100 Subject: controller: commit results even if 'run' failed * controller/bin/dtf-controller.in (child_task): Do not exit if dtf-run-remote failed. This allows us commit at least log files. * controller/libexec/dtf-commit-results.in: Do not try to extract dtf.tar.gz archive if it does not exist (dtf-run-remote fail). --- controller/bin/dtf-controller.in | 1 - controller/libexec/dtf-commit-results.in | 10 +++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'controller') diff --git a/controller/bin/dtf-controller.in b/controller/bin/dtf-controller.in index da196b7..84e098d 100644 --- a/controller/bin/dtf-controller.in +++ b/controller/bin/dtf-controller.in @@ -78,7 +78,6 @@ sub child_task # its tests failed. if ($rc ne 0) { print STDERR "$task: failed dtf-run-remote"; - exit (1); } my $db = $config->{db}; diff --git a/controller/libexec/dtf-commit-results.in b/controller/libexec/dtf-commit-results.in index b1d5bf2..d7a6949 100644 --- a/controller/libexec/dtf-commit-results.in +++ b/controller/libexec/dtf-commit-results.in @@ -12,13 +12,17 @@ db="$DTF_DATABASE_DEFAULT" test -n "$3" && db="$3" if test -z "$db" \ - || test -z "$resultdir" \ - || test ! -f "$resultdir/dtf.tar.gz" + || test -z "$resultdir" then echo >&2 "something is wrong, try bash -x" exit 1 fi +if test -f "$resultdir/dtf.tar.gz"; then + # Unpack tarball if available.. + ( cd "$resultdir" && tar -xf dtf.tar.gz ) +fi + mkdir -p "$db/$subresultdir" || exit 1 -( cd "$resultdir" && tar -xf dtf.tar.gz && cp -r . "$db/$subresultdir" ) +( cd "$resultdir" && cp -r . "$db/$subresultdir" ) -- cgit