From b20171a41a97dbfd75a98955694eb9df5314ef27 Mon Sep 17 00:00:00 2001 From: "Klaus T. Aehlig" Date: Mon, 5 Feb 2024 11:46:34 +0100 Subject: end-to-end tests: inherit path ... for test actions, by setting an appropriate local launcher. In this way, the tests can also be run on systems where sh does not pull in enough paths to have all the "usual" tools available. --- test/end-to-end/remote-execution/large-blobs.sh | 3 ++- test/end-to-end/remote-execution/native-protocol.sh | 8 ++++++-- test/end-to-end/remote-execution/upload-test.sh | 8 ++++---- 3 files changed, 12 insertions(+), 7 deletions(-) (limited to 'test/end-to-end/remote-execution') diff --git a/test/end-to-end/remote-execution/large-blobs.sh b/test/end-to-end/remote-execution/large-blobs.sh index 21804977..a338825a 100644 --- a/test/end-to-end/remote-execution/large-blobs.sh +++ b/test/end-to-end/remote-execution/large-blobs.sh @@ -55,7 +55,8 @@ run_tests() { echo echo Upload and download to $NAME $TYPE CAS. echo - "${JUST}" build test $BUILD_ARGS --dump-artifacts result + "${JUST}" build -L '["env", "PATH='"${PATH}"'"]' $BUILD_ARGS \ + --dump-artifacts result echo SUCCESS local ARTIFACT_ID="$(cat result | jq -r '."out.file".id')" diff --git a/test/end-to-end/remote-execution/native-protocol.sh b/test/end-to-end/remote-execution/native-protocol.sh index 3ff3a050..0737b9ff 100644 --- a/test/end-to-end/remote-execution/native-protocol.sh +++ b/test/end-to-end/remote-execution/native-protocol.sh @@ -80,7 +80,9 @@ fi echo echo Upload and download Git tree to local CAS in ${NAME} mode echo -"${JUST}" build -C "${CONF}" --main test test --local-build-root="${LBRDIR}" --dump-artifacts "${RESULT}" ${ARGS} 2>&1 +"${JUST}" build -L '["env", "PATH='"${PATH}"'"]' -C "${CONF}" --main test \ + --local-build-root="${LBRDIR}" --dump-artifacts "${RESULT}" \ + ${ARGS} test 2>&1 TREE_ID="$(jq -r ".${OUT_DIRNAME}.id" "${RESULT}" 2>&1)" test ${TREE_ID} ${EQUAL} ${GIT_TREE_ID} @@ -92,6 +94,8 @@ fi echo echo Upload and download Git tree to remote CAS in ${NAME} mode echo -"${JUST}" build -C "${CONF}" --main test test ${REMOTE_EXECUTION_ARGS} --local-build-root="${LBRDIR}" --dump-artifacts "${RESULT}" ${ARGS} 2>&1 +"${JUST}" build -L '["env", "PATH='"${PATH}"'"]' -C "${CONF}" --main test \ + ${REMOTE_EXECUTION_ARGS} --local-build-root="${LBRDIR}" \ + --dump-artifacts "${RESULT}" ${ARGS} test 2>&1 TREE_ID="$(jq -r ".${OUT_DIRNAME}.id" "${RESULT}" 2>&1)" test ${TREE_ID} ${EQUAL} ${GIT_TREE_ID} diff --git a/test/end-to-end/remote-execution/upload-test.sh b/test/end-to-end/remote-execution/upload-test.sh index f4fbfac7..91f6d069 100644 --- a/test/end-to-end/remote-execution/upload-test.sh +++ b/test/end-to-end/remote-execution/upload-test.sh @@ -59,7 +59,7 @@ fi # Build locally export CONF="$(realpath repos.json)" -"${JUST}" build -C "${CONF}" --local-build-root="${LBRDIR_1}" ${ARGS} 2>&1 +"${JUST}" build -L '["env", "PATH='"${PATH}"'"]' -C "${CONF}" --local-build-root="${LBRDIR_1}" ${ARGS} 2>&1 # Build remotely REMOTE_EXECUTION_ARGS="-r ${REMOTE_EXECUTION_ADDRESS}" @@ -67,7 +67,7 @@ if [ "${REMOTE_EXECUTION_PROPERTIES:-}" != "" ]; then REMOTE_EXECUTION_ARGS="${REMOTE_EXECUTION_ARGS} --remote-execution-property ${REMOTE_EXECUTION_PROPERTIES}" fi -"${JUST}" build -C "${CONF}" --local-build-root="${LBRDIR_1}" ${ARGS} ${REMOTE_EXECUTION_ARGS} 2>&1 +"${JUST}" build -L '["env", "PATH='"${PATH}"'"]' -C "${CONF}" --local-build-root="${LBRDIR_1}" ${ARGS} ${REMOTE_EXECUTION_ARGS} 2>&1 echo === ignore_special root === @@ -84,7 +84,7 @@ fi # Build locally export CONF="$(realpath repos.json)" -"${JUST}" build -C "${CONF}" --local-build-root="${LBRDIR_2}" ${ARGS} 2>&1 +"${JUST}" build -L '["env", "PATH='"${PATH}"'"]' -C "${CONF}" --local-build-root="${LBRDIR_2}" ${ARGS} 2>&1 # Build remotely REMOTE_EXECUTION_ARGS="-r ${REMOTE_EXECUTION_ADDRESS}" @@ -92,4 +92,4 @@ if [ "${REMOTE_EXECUTION_PROPERTIES:-}" != "" ]; then REMOTE_EXECUTION_ARGS="${REMOTE_EXECUTION_ARGS} --remote-execution-property ${REMOTE_EXECUTION_PROPERTIES}" fi -"${JUST}" build -C "${CONF}" --local-build-root="${LBRDIR_2}" ${ARGS} ${REMOTE_EXECUTION_ARGS} 2>&1 +"${JUST}" build -L '["env", "PATH='"${PATH}"'"]' -C "${CONF}" --local-build-root="${LBRDIR_2}" ${ARGS} ${REMOTE_EXECUTION_ARGS} 2>&1 -- cgit v1.2.3