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/libexec/dtf-commit-results.in | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'controller/libexec') 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