diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2019-01-19 14:43:37 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2019-01-21 14:27:28 +0000 |
commit | 8a88980231c3181b7d71c4455d60248414698ed2 (patch) | |
tree | 02b246dcee8300f342167ca7c31d1d936b3d08a7 | |
parent | 73d563e61e0bd76c93f3639cc9e384322a56134c (diff) |
tcwg_kernel-bisect.sh: Simplify handling of artifact directories
... for the benefit of reproducer runs.
Keep baseline directory in place since otherwise the reproducer run
will try to move the symlink thinking it is a directory.
Create all symlinks with "-f" to overwrite them in reproducer runs.
Change-Id: If11b27fad7dc3112a4aa43bb021e1de8d3884d00
-rwxr-xr-x | tcwg_kernel-bisect.sh | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/tcwg_kernel-bisect.sh b/tcwg_kernel-bisect.sh index 3f4693cf..921699f5 100755 --- a/tcwg_kernel-bisect.sh +++ b/tcwg_kernel-bisect.sh @@ -61,10 +61,8 @@ cd $current_project # Remember $good_rev from the baseline build above. good_rev=$(git rev-parse HEAD) baseline_rev="$good_rev" -mv "$artifacts/build-baseline" "$artifacts/build-$baseline_rev" -mv "$artifacts/manifests/build-baseline.sh" "$artifacts/manifests/build-$baseline_rev.sh" -ln -s "build-$baseline_rev" "$artifacts/build-baseline" -ln -s "build-$baseline_rev.sh" "$artifacts/manifests/build-baseline.sh" +ln -f -s "build-baseline" "$artifacts/build-$baseline_rev" +ln -f -s "build-baseline.sh" "$artifacts/manifests/build-$baseline_rev.sh" echo "$baseline_rev" >> $artifacts/good_revs cat <<EOF | manifest_out @@ -173,9 +171,8 @@ EOF fi fi -ln -s "build-$good_rev" "$artifacts/build-good" -ln -s "build-$good_rev.sh" "$artifacts/manifests/build-good.sh" - +ln -f -s "build-$good_rev" "$artifacts/build-good" +ln -f -s "build-$good_rev.sh" "$artifacts/manifests/build-good.sh" git checkout --detach $bad_rev $artifacts/test.sh & @@ -251,8 +248,8 @@ if [ -f $artifacts/first-bad ]; then touch $artifacts/jenkins/build-name sed -i -e "s/\$/-$first_bad/" $artifacts/jenkins/build-name - ln -s "build-$first_bad" "$artifacts/build-first_bad" - ln -s "build-$first_bad.sh" "$artifacts/manifests/build-first_bad.sh" + ln -f -s "build-$first_bad" "$artifacts/build-first_bad" + ln -f -s "build-$first_bad.sh" "$artifacts/manifests/build-first_bad.sh" last_good=$(git -C $current_project rev-parse $first_bad^) @@ -286,8 +283,8 @@ if [ -f $artifacts/first-bad ]; then cd .. fi - ln -s "build-$last_good" "$artifacts/build-last_good" - ln -s "build-$last_good.sh" "$artifacts/manifests/build-last_good.sh" + ln -f -s "build-$last_good" "$artifacts/build-last_good" + ln -f -s "build-$last_good.sh" "$artifacts/manifests/build-last_good.sh" cat >> $artifacts/jenkins/mail-body.txt <<EOF Successfully identified regression in $current_project on $target @ $toolchain-${rr[${toolchain}_version]} @ linux-${rr[linux_version]}-$linux_config between bad $bad_rev and baseline $baseline_rev . |