summaryrefslogtreecommitdiff
path: root/tcwg_kernel-bisect.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tcwg_kernel-bisect.sh')
-rwxr-xr-xtcwg_kernel-bisect.sh58
1 files changed, 35 insertions, 23 deletions
diff --git a/tcwg_kernel-bisect.sh b/tcwg_kernel-bisect.sh
index 265aa34d..61876313 100755
--- a/tcwg_kernel-bisect.sh
+++ b/tcwg_kernel-bisect.sh
@@ -5,7 +5,10 @@ set -ef -o pipefail
scripts=$(dirname $0)
. $scripts/jenkins-helpers.sh
-artifacts=$(pwd)/artifacts
+# Relative artifacts are used for generation of manifests and reproduction
+# instructions.
+rel_artifacts=artifacts
+artifacts=$(pwd)/$rel_artifacts
fresh_dir $artifacts "$artifacts/manifests/*" "$artifacts/jenkins/*"
@@ -41,12 +44,12 @@ trap "eval \"echo ERROR at \${FUNCNAME[0]}:\${BASH_LINENO[0]}\" > $artifacts/fai
echo "Testing baseline_rev $baseline_rev (should be success)"
$build_script \
^^ $reproduce_bisect \
- %% $artifacts/manifests/build-baseline.sh \
- @@ $artifacts/manifests/build-parameters.sh \
+ %% $rel_artifacts/manifests/build-baseline.sh \
+ @@ $rel_artifacts/manifests/build-parameters.sh \
--mode "baseline" \
--current_branch "$baseline_rev" \
--reset_baseline true \
- --top_artifacts "$artifacts/build-baseline" \
+ --top_artifacts "$rel_artifacts/build-baseline" \
--verbose "$verbose"
assert ! [ -f $artifacts/failures ]
@@ -92,20 +95,20 @@ rev=\$(git rev-parse HEAD)
cd ..
$build_script \
^^ $reproduce_bisect \
- %% $artifacts/manifests/build-\$rev.sh \
- @@ $artifacts/manifests/build-parameters.sh \
+ %% $rel_artifacts/manifests/build-\$rev.sh \
+ @@ $rel_artifacts/manifests/build-parameters.sh \
--mode bisect \
- --top_artifacts $artifacts/build-\$rev \
+ --top_artifacts $rel_artifacts/build-\$rev \
--verbose "$verbose" &
res=0 && wait \$! || res=\$?
-if [ -f $artifacts/build-\$rev/failures ]; then
- echo "\$rev" >> $artifacts/bad_revs
+if [ -f $rel_artifacts/build-\$rev/failures ]; then
+ echo "\$rev" >> $rel_artifacts/bad_revs
exit 1
elif [ x"\$res" != x"0" ]; then
- echo "\$rev" >> $artifacts/skipped_revs
+ echo "\$rev" >> $rel_artifacts/skipped_revs
exit 125
else
- echo "\$rev" >> $artifacts/good_revs
+ echo "\$rev" >> $rel_artifacts/good_revs
exit 0
fi
EOF
@@ -297,33 +300,42 @@ to (for $bad_name == $bad_sha1)
$(cat $artifacts/build-$bad_sha1/results)
</cut>
-Artifacts of $good_name build: ${BUILD_URL}artifact/artifacts/build-$good_sha1/
-Artifacts of $bad_name build: ${BUILD_URL}artifact/artifacts/build-$bad_sha1/
+Artifacts of $good_name build: ${BUILD_URL}artifact/$rel_artifacts/build-$good_sha1/
+Artifacts of $bad_name build: ${BUILD_URL}artifact/$rel_artifacts/build-$bad_sha1/
Reproduce builds:
<cut>
mkdir investigate-$current_project-$bad_sha1
cd investigate-$current_project-$bad_sha1
+
git clone https://git.linaro.org/toolchain/jenkins-scripts
-wget ${BUILD_URL}artifact/artifacts/manifests/build-baseline.sh
-$build_script @@ build-baseline.sh
-wget ${BUILD_URL}artifact/artifacts/manifests/build-parameters.sh
-wget ${BUILD_URL}artifact/artifacts/test.sh
-chmod +x test.sh
+
+mkdir -p $rel_artifacts/manifests
+curl -o $rel_artifacts/manifests/build-baseline.sh ${BUILD_URL}artifact/$rel_artifacts/manifests/build-baseline.sh
+curl -o $rel_artifacts/manifests/build-parameters.sh ${BUILD_URL}artifact/$rel_artifacts/manifests/build-parameters.sh
+curl -o $rel_artifacts/test.sh ${BUILD_URL}artifact/$rel_artifacts/test.sh
+chmod +x $rel_artifacts/test.sh
+
+# Reproduce the baseline build (build all pre-requisites)
+$build_script @@ $rel_artifacts/manifests/build-baseline.sh
+
cd $current_project
+
# Reproduce $bad_name build
git checkout --detach $bad_sha1
-../test.sh
+../$rel_artifacts/test.sh
+
# Reproduce $good_name build
git checkout --detach $good_sha1
-../test.sh
+../$rel_artifacts/test.sh
+
cd ..
</cut>
History of pending regressions and results: https://git.linaro.org/toolchain/ci/base-artifacts.git/log/?h=linaro-local/ci/$ci_project/$ci_config
-Bisect log: ${BUILD_URL}artifact/artifacts/bisect.log/*view*/
-Artifacts: ${BUILD_URL}artifact/artifacts/
+Bisect log: ${BUILD_URL}artifact/$rel_artifacts/bisect.log/*view*/
+Artifacts: ${BUILD_URL}artifact/$rel_artifacts/
Build URL: $BUILD_URL
Build log: ${BUILD_URL}consoleText
EOF
@@ -333,7 +345,7 @@ if [ -f $artifacts/first-bad ]; then
Full commit:
<cut>
-$(git -C $current_project show $first_bad)
+$(git -C $current_project show --stat --patch $first_bad | head -n 1000)
</cut>
EOF
fi