From 79d5890e07ae3521041a6615f565e7e2bbc31ac4 Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Mon, 22 Jan 2024 13:13:19 +0000 Subject: [PATCH] Bug 1874234 - don't run linux tests through `mach python`. r=ahal Test tasks don't populate a repository, so if one exists it'll have been set up by a previous task on the same worker; we don't want to rely on it in that case, as that makes tasks unreproducible (and breaks, currently, because mach python doesn't like python 3.7). Explicitly use mach python for android generate-profile tasks, which do set up a checkout and require in-tree packages. Differential Revision: https://phabricator.services.mozilla.com/D198704 --- taskcluster/ci/generate-profile/kind.yml | 2 ++ taskcluster/scripts/tester/test-linux.sh | 6 +----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/taskcluster/ci/generate-profile/kind.yml b/taskcluster/ci/generate-profile/kind.yml index 597687a049c5..0258d97703aa 100644 --- a/taskcluster/ci/generate-profile/kind.yml +++ b/taskcluster/ci/generate-profile/kind.yml @@ -103,6 +103,7 @@ jobs: env: WORKING_DIR: "/builds/worker" MOZHARNESS_PATH: "/builds/worker/checkouts/gecko/testing/mozharness" + PYTHON: "/builds/worker/checkouts/gecko/mach python" artifacts: - type: directory name: public/build @@ -142,6 +143,7 @@ jobs: env: WORKING_DIR: "/builds/worker" MOZHARNESS_PATH: "/builds/worker/checkouts/gecko/testing/mozharness" + PYTHON: "/builds/worker/checkouts/gecko/mach python" artifacts: - type: directory name: public/build diff --git a/taskcluster/scripts/tester/test-linux.sh b/taskcluster/scripts/tester/test-linux.sh index 1d87c1f2b813..250ae40e10e3 100755 --- a/taskcluster/scripts/tester/test-linux.sh +++ b/taskcluster/scripts/tester/test-linux.sh @@ -254,10 +254,6 @@ if [ -n "$MOZHARNESS_OPTIONS" ]; then done fi -# Use |mach python| if a source checkout exists so in-tree packages are -# available. -[[ -x "${GECKO_PATH}/mach" ]] && python="${PYTHON:-python3} ${GECKO_PATH}/mach python" || python="${PYTHON:-python2.7}" - # Save the computed mozharness command to a binary which is useful for # interactive mode. mozharness_bin="$HOME/bin/run-mozharness" @@ -267,7 +263,7 @@ echo -e "#!/usr/bin/env bash # Some mozharness scripts assume base_work_dir is in # the current working directory, see bug 1279237 cd "$WORKSPACE" -cmd=\"${python} ${MOZHARNESS_PATH}/scripts/${MOZHARNESS_SCRIPT} ${config_cmds} ${options} ${@} \${@}\" +cmd=\"${PYTHON:-python3} ${MOZHARNESS_PATH}/scripts/${MOZHARNESS_SCRIPT} ${config_cmds} ${options} ${@} \${@}\" echo \"Running: \${cmd}\" exec \${cmd}" > ${mozharness_bin} chmod +x ${mozharness_bin} -- 2.11.4.GIT