summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2018-12-14 11:53:06 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2018-12-18 12:06:36 +0000
commitea235db8947d604be8c62c294a880495f2bce862 (patch)
treefb474e7391ec22ce83c71267a4513c3b2c88f38e
parent21fc0f98378654f7ccfa2df95e6645bef0f13ebb (diff)
tcwg_kernel-bisect.sh: Create artifacts directory earlier
... so that convert_args_to_variables can create manifest file when needed Change-Id: I21e484cb88c15a2dfe1c767663faf71445dc9214
-rwxr-xr-xtcwg_kernel-bisect.sh16
1 files changed, 8 insertions, 8 deletions
diff --git a/tcwg_kernel-bisect.sh b/tcwg_kernel-bisect.sh
index 55c8ba37..22f26bf6 100755
--- a/tcwg_kernel-bisect.sh
+++ b/tcwg_kernel-bisect.sh
@@ -5,6 +5,10 @@ set -ef -o pipefail
scripts=$(dirname $0)
. $scripts/jenkins-helpers.sh
+artifacts=$(pwd)/artifacts
+rm -rf $artifacts
+mkdir $artifacts
+
# Process bisect-only args
convert_args_to_variables "$@"
shift "$SHIFT_CONVERTED_ARGS"
@@ -15,7 +19,7 @@ BUILD_URL="${BUILD_URL:-$(pwd)}"
confirm_failure="${confirm_failure:-false}"
# Process build args and record them in build-manifest.sh
-convert_args_to_variables %% build-manifest.sh "$@"
+convert_args_to_variables %% artifacts/build-manifest.sh "$@"
obligatory_variables current_project toolchain
@@ -27,16 +31,12 @@ set -u
if $verbose; then set -x; fi
-artifacts=$(pwd)/artifacts
-rm -rf $artifacts
-mkdir $artifacts
-
trap "eval \"echo ERROR at \${FUNCNAME[0]}:\${BASH_LINENO[0]}\" > $artifacts/failures" EXIT
if $confirm_failure; then
# Make sure we are not about to bisect a sporadic failure.
$scripts/tcwg_kernel-build.sh \
- @@ build-manifest.sh \
+ @@ artifacts/build-manifest.sh \
--mode "baseline" \
--current_rev "$bad_rev" \
--top_artifacts "$artifacts/build-bad" \
@@ -64,7 +64,7 @@ fi
# Build baseline that we are going to re-use to speed-up bisection.
# (This also confirms that infrastructure is OK.)
$scripts/tcwg_kernel-build.sh \
- @@ build-manifest.sh \
+ @@ artifacts/build-manifest.sh \
--mode "baseline" \
--current_rev "$baseline_rev" \
--reset_baseline true \
@@ -108,7 +108,7 @@ cat > ../bisect-run.sh <<EOF
rev=\$(git rev-parse HEAD)
cd ..
$scripts/tcwg_kernel-build.sh \
- @@ build-manifest.sh \
+ @@ artifacts/build-manifest.sh \
--mode bisect \
--top_artifacts $artifacts/build-\$rev \
--verbose "$verbose" &