summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2019-05-24 09:06:39 +0000
committerintrigeri <intrigeri@boum.org>2019-05-24 09:21:15 +0000
commitcec67ab2c20e3dc0b34a1ff22ba5adab84a9dac6 (patch)
tree93059ab7c9e75d0eef1c58ff0bf9f906b106123f
parent360ea16b298fc7b935fe3ab064d0111c799a4713 (diff)
wrap_test_suite: don't use --old-iso when testing branches based on Buster, until Tails 4.0 is released.bugfix/16754-dont-use-old-iso-when-testing-buster-images
This can be reverted once 4.0 is released, but no big deal if we forget about it for a while: the code will automatically revert to the "use --old-iso" behaviour for Buster-based branches once 4.0 is out.
-rw-r--r--files/jenkins/slaves/isotesters/wrap_test_suite20
1 files changed, 19 insertions, 1 deletions
diff --git a/files/jenkins/slaves/isotesters/wrap_test_suite b/files/jenkins/slaves/isotesters/wrap_test_suite
index 805b949..9a0599a 100644
--- a/files/jenkins/slaves/isotesters/wrap_test_suite
+++ b/files/jenkins/slaves/isotesters/wrap_test_suite
@@ -15,6 +15,7 @@ shift
### Constants
ALREADY_RUN_FLAG_FILE="${TMP_DIR}/already_run"
+FIRST_BUSTER_SPECIFIC_COMMIT=2f106487f6a118e76cf0d7d47ba260e087a64ab2
### Sanity checks
@@ -66,6 +67,23 @@ only_changes_doc() {
[ -z "${base_branch_non_doc_diff}" ]
}
+based_on_buster() {
+ git merge-base --is-ancestor \
+ "$FIRST_BUSTER_SPECIFIC_COMMIT" \
+ "$(git rev-parse --verify HEAD)"
+}
+
+tails_4_0_was_released() {
+ git merge-base --is-ancestor \
+ "$FIRST_BUSTER_SPECIFIC_COMMIT" \
+ "$(git rev-parse --verify origin/master)"
+}
+
+use_last_release_as_old_iso() {
+ [ "$USE_LAST_RELEASE_AS_OLD_ISO" = yes ] \
+ && ( tails_4_0_was_released || ! based_on_buster )
+}
+
### Main
as_root_do touch "$ALREADY_RUN_FLAG_FILE"
@@ -75,7 +93,7 @@ git merge --no-edit "${UPSTREAMJOB_GIT_BASE_BRANCH_HEAD}"
UPSTREAMJOB_ISO=$(ls tmp/tails-*.iso)
-if [ "$USE_LAST_RELEASE_AS_OLD_ISO" = yes ]; then
+if use_last_release_as_old_iso; then
LAST_RELEASE_VERSION=$(git show origin/master:debian/changelog | dpkg-parsechangelog -l- -S version)
PREVIOUS_ISO="tails-amd64-${LAST_RELEASE_VERSION}.iso"
PREVIOUS_IMG="tails-amd64-${LAST_RELEASE_VERSION}.img"