Commit fbd73f80 authored by anonym's avatar anonym
Browse files

Start test suite with `rake test` for supported branches.

This will make the testing and deployment of tails/sysadmin#12503 and
tails/tails!202 smoother.
parent da222211
......@@ -78,6 +78,13 @@ based_on_buster() {
"$(git rev-parse --verify HEAD)"
}
rake_test_is_supported() {
RAKE_TEST_SUPPORTED_COMMIT=aaa2064f48d88c0d6bc158b1325f727b775b81a1
git merge-base --is-ancestor \
"$RAKE_TEST_SUPPORTED_COMMIT" \
"$(git rev-parse --verify HEAD)"
}
tails_4_0_was_released() {
git merge-base --is-ancestor \
"$FIRST_BUSTER_SPECIFIC_COMMIT" \
......@@ -118,21 +125,27 @@ perl -pi -E \
s{\A(\s*password:\s*).*}{\$1test}" \
"${WORKSPACE}/features/config/common.d/thunderbird.yml"
if echo "${UPSTREAMJOB_GIT_BRANCH}" | grep -q -E '[+-]force-all-tests$' \
|| [ "${GIT_BRANCH#origin/}" = testing ] \
|| [ "${GIT_BRANCH#origin/}" = feature/tor-nightly-master ] \
|| [ "${GIT_BRANCH#origin/}" = devel ] ; then
TAGS_ARGS=""
elif git describe --tags --exact-match "${UPSTREAMJOB_GIT_COMMIT}" >/dev/null 2>&1; then
if rake_test_is_supported; then
TEST_SUITE_COMMAND="rake test"
TAGS_ARGS=""
elif [ "${UPSTREAMJOB_GIT_COMMIT}" != "${UPSTREAMJOB_GIT_BASE_BRANCH_HEAD}" ] && \
only_changes_doc "$UPSTREAMJOB_GIT_BASE_BRANCH_HEAD"; then
TAGS_ARGS="--tag ~@fragile --tag @doc"
else
TAGS_ARGS="--tag ~@fragile"
TEST_SUITE_COMMAND="./run_test_suite"
if echo "${UPSTREAMJOB_GIT_BRANCH}" | grep -q -E '[+-]force-all-tests$' \
|| [ "${GIT_BRANCH#origin/}" = testing ] \
|| [ "${GIT_BRANCH#origin/}" = feature/tor-nightly-master ] \
|| [ "${GIT_BRANCH#origin/}" = devel ] ; then
TAGS_ARGS=""
elif git describe --tags --exact-match "${UPSTREAMJOB_GIT_COMMIT}" >/dev/null 2>&1; then
TAGS_ARGS=""
elif [ "${UPSTREAMJOB_GIT_COMMIT}" != "${UPSTREAMJOB_GIT_BASE_BRANCH_HEAD}" ] && \
only_changes_doc "$UPSTREAMJOB_GIT_BASE_BRANCH_HEAD"; then
TAGS_ARGS="--tag ~@fragile --tag @doc"
else
TAGS_ARGS="--tag ~@fragile"
fi
fi
as_root_do ./run_test_suite \
as_root_do ${TEST_SUITE_COMMAND} \
--old-iso "${PREVIOUS_ISO}" \
--iso "${UPSTREAMJOB_ISO}" \
--artifacts-base-uri "${JENKINS_URL}job/${JOB_NAME}/${BUILD_NUMBER}/artifact/build-artifacts/" \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment