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/just-mr/fetch-absent-archives-symlinks.sh | 4 ++++ test/end-to-end/just-mr/fetch-absent-archives.sh | 5 +++++ test/end-to-end/just-mr/fetch-absent-distdir-archive.sh | 4 ++++ test/end-to-end/just-mr/fetch-absent-git-tree.sh | 3 +++ test/end-to-end/just-mr/fetch-absent.sh | 5 +++++ test/end-to-end/just-mr/just-mr.test.sh | 2 ++ 6 files changed, 23 insertions(+) (limited to 'test/end-to-end/just-mr') diff --git a/test/end-to-end/just-mr/fetch-absent-archives-symlinks.sh b/test/end-to-end/just-mr/fetch-absent-archives-symlinks.sh index 217ea61a..48effd5c 100644 --- a/test/end-to-end/just-mr/fetch-absent-archives-symlinks.sh +++ b/test/end-to-end/just-mr/fetch-absent-archives-symlinks.sh @@ -68,12 +68,14 @@ echo cat repos.json echo CONF=$("${JUST_MR}" --norc --local-build-root "${LBR}" \ + -L '["env", "PATH='"${PATH}"'"]' \ --remote-serve-address ${SERVE} \ -r ${REMOTE_EXECUTION_ADDRESS} \ --fetch-absent setup) cat $CONF echo "${JUST}" install --local-build-root "${LBR}" -C "${CONF}" \ + -L '["env", "PATH='"${PATH}"'"]' \ -r "${REMOTE_EXECUTION_ADDRESS}" -o "${OUT}" 2>&1 grep x "${OUT}/out.txt" @@ -81,6 +83,7 @@ grep x "${OUT}/out.txt" # about the root should now be available locally, so we can build without # a serve or remote endpoint with still (logically) fetching absent roots. "${JUST_MR}" --norc --just "${JUST}" --local-build-root "${LBR}" \ + -L '["env", "PATH='"${PATH}"'"]' \ --fetch-absent install -o "${OUT2}" 2>&1 grep x "${OUT2}/out.txt" @@ -107,6 +110,7 @@ echo cat repos.json echo "${JUST_MR}" --norc --local-build-root "${LBR}" \ + -L '["env", "PATH='"${PATH}"'"]' \ --remote-serve-address ${SERVE} \ -r ${REMOTE_EXECUTION_ADDRESS} \ --just "${JUST}" \ diff --git a/test/end-to-end/just-mr/fetch-absent-archives.sh b/test/end-to-end/just-mr/fetch-absent-archives.sh index 52c05cb8..2b26bf71 100644 --- a/test/end-to-end/just-mr/fetch-absent-archives.sh +++ b/test/end-to-end/just-mr/fetch-absent-archives.sh @@ -64,12 +64,14 @@ echo cat repos.json echo CONF=$("${JUST_MR}" --norc --local-build-root "${LBR}" \ + -L '["env", "PATH='"${PATH}"'"]' \ --remote-serve-address ${SERVE} \ -r ${REMOTE_EXECUTION_ADDRESS} \ --fetch-absent setup) cat $CONF echo "${JUST}" install --local-build-root "${LBR}" -C "${CONF}" \ + -L '["env", "PATH='"${PATH}"'"]' \ -r "${REMOTE_EXECUTION_ADDRESS}" -o "${OUT}" 2>&1 grep 42 "${OUT}/out.txt" @@ -77,6 +79,7 @@ grep 42 "${OUT}/out.txt" # about the root should now be available locally, so we can build without # a serve or remote endpoint with still (logically) fetching absent roots. "${JUST_MR}" --norc --just "${JUST}" --local-build-root "${LBR}" \ + -L '["env", "PATH='"${PATH}"'"]' \ --fetch-absent install -o "${OUT2}" 2>&1 grep 42 "${OUT2}/out.txt" @@ -107,6 +110,7 @@ cat > targets/TARGETS <<'EOF' } EOF "${JUST_MR}" --norc --local-build-root "${LBR}" \ + -L '["env", "PATH='"${PATH}"'"]' \ --remote-serve-address ${SERVE} \ -r ${REMOTE_EXECUTION_ADDRESS} \ --just "${JUST}" \ @@ -145,6 +149,7 @@ echo cat repos.json echo "${JUST_MR}" --norc --local-build-root "${LBR_NON_ABSENT}" \ + -L '["env", "PATH='"${PATH}"'"]' \ --remote-serve-address ${SERVE} \ -r ${REMOTE_EXECUTION_ADDRESS} \ --just "${JUST}" \ diff --git a/test/end-to-end/just-mr/fetch-absent-distdir-archive.sh b/test/end-to-end/just-mr/fetch-absent-distdir-archive.sh index cded9c4a..ade94031 100644 --- a/test/end-to-end/just-mr/fetch-absent-distdir-archive.sh +++ b/test/end-to-end/just-mr/fetch-absent-distdir-archive.sh @@ -72,12 +72,14 @@ echo cat repos.json echo CONF=$("${JUST_MR}" --norc --local-build-root "${LBR}" \ + -L '["env", "PATH='"${PATH}"'"]' \ --remote-serve-address ${SERVE} \ -r ${REMOTE_EXECUTION_ADDRESS} \ --fetch-absent setup) cat $CONF echo "${JUST}" install --local-build-root "${LBR}" -C "${CONF}" \ + -L '["env", "PATH='"${PATH}"'"]' \ -r "${REMOTE_EXECUTION_ADDRESS}" -o "${OUT}" 2>&1 grep 42 "${OUT}/out.txt" @@ -85,6 +87,7 @@ grep 42 "${OUT}/out.txt" # about the root should now be available locally, so we can build without # a serve or remote endpoint with still (logically) fetching absent roots. "${JUST_MR}" --norc --just "${JUST}" --local-build-root "${LBR}" \ + -L '["env", "PATH='"${PATH}"'"]' \ --fetch-absent install -o "${OUT2}" 2>&1 grep 42 "${OUT2}/out.txt" @@ -116,6 +119,7 @@ echo cat repos.json echo "${JUST_MR}" --norc --local-build-root "${LBR_NON_ABSENT}" \ + -L '["env", "PATH='"${PATH}"'"]' \ --remote-serve-address ${SERVE} \ -r ${REMOTE_EXECUTION_ADDRESS} \ --just "${JUST}" \ diff --git a/test/end-to-end/just-mr/fetch-absent-git-tree.sh b/test/end-to-end/just-mr/fetch-absent-git-tree.sh index 5ecc034c..fb5d516a 100644 --- a/test/end-to-end/just-mr/fetch-absent-git-tree.sh +++ b/test/end-to-end/just-mr/fetch-absent-git-tree.sh @@ -59,6 +59,7 @@ echo cat repos.json echo CONF=$("${JUST_MR}" --norc --local-build-root "${LBR}" \ + -L '["env", "PATH='"${PATH}"'"]' \ --remote-serve-address ${SERVE} \ -r ${REMOTE_EXECUTION_ADDRESS} \ --fetch-absent setup) @@ -73,6 +74,7 @@ grep 42 "${OUT}/out.txt" # about the root should now be available locally, so we can build without # a serve or remote endpoint with still (logically) fetching absent roots. "${JUST_MR}" --norc --just "${JUST}" --local-build-root "${LBR}" \ + -L '["env", "PATH='"${PATH}"'"]' \ --fetch-absent install -o "${OUT2}" 2>&1 grep 42 "${OUT2}/out.txt" @@ -99,6 +101,7 @@ echo cat repos.json echo "${JUST_MR}" --norc --local-build-root "${LBR_NON_ABSENT}" \ + -L '["env", "PATH='"${PATH}"'"]' \ --remote-serve-address ${SERVE} \ -r ${REMOTE_EXECUTION_ADDRESS} \ --just "${JUST}" \ diff --git a/test/end-to-end/just-mr/fetch-absent.sh b/test/end-to-end/just-mr/fetch-absent.sh index 00c76e7b..30267998 100644 --- a/test/end-to-end/just-mr/fetch-absent.sh +++ b/test/end-to-end/just-mr/fetch-absent.sh @@ -62,12 +62,14 @@ echo cat repos.json echo CONF=$("${JUST_MR}" --norc --local-build-root "${LBR}" \ + -L '["env", "PATH='"${PATH}"'"]' \ --remote-serve-address ${SERVE} \ -r ${REMOTE_EXECUTION_ADDRESS} \ --fetch-absent setup) cat $CONF echo "${JUST}" install --local-build-root "${LBR}" -C "${CONF}" \ + -L '["env", "PATH='"${PATH}"'"]' \ -r "${REMOTE_EXECUTION_ADDRESS}" -o "${OUT}" 2>&1 grep 42 "${OUT}/out.txt" @@ -75,6 +77,7 @@ grep 42 "${OUT}/out.txt" # about the root should now be available locally, so we can build without # a serve or remote endpoint with still (logically) fetching absent roots. "${JUST_MR}" --norc --just "${JUST}" --local-build-root "${LBR}" \ + -L '["env", "PATH='"${PATH}"'"]' \ --fetch-absent install -o "${OUT2}" 2>&1 grep 42 "${OUT2}/out.txt" @@ -108,6 +111,7 @@ EOF "${JUST_MR}" --norc --local-build-root "${LBR}" \ --remote-serve-address ${SERVE} \ -r ${REMOTE_EXECUTION_ADDRESS} \ + -L '["env", "PATH='"${PATH}"'"]' \ --just "${JUST}" \ --fetch-absent install -o "${OUT3}" 2>&1 grep 42 "${OUT3}/out.txt" @@ -147,6 +151,7 @@ echo "${JUST_MR}" --norc --local-build-root "${LBR_NON_ABSENT}" \ --remote-serve-address ${SERVE} \ -r ${REMOTE_EXECUTION_ADDRESS} \ + -L '["env", "PATH='"${PATH}"'"]' \ --just "${JUST}" \ install -o "${OUT_NON_ABSENT}" 2>&1 grep 42 "${OUT_NON_ABSENT}/out.txt" diff --git a/test/end-to-end/just-mr/just-mr.test.sh b/test/end-to-end/just-mr/just-mr.test.sh index 276bcfdf..105f1b97 100644 --- a/test/end-to-end/just-mr/just-mr.test.sh +++ b/test/end-to-end/just-mr/just-mr.test.sh @@ -252,6 +252,7 @@ echo "Test individual repos" test_alone() { CONFIG_CPP=$("${JUST_MR_CPP}" -C test-repos.json --norc \ --local-build-root "${BUILDROOT}" \ + -L '["env", "PATH='"${PATH}"'"]' \ -j 32 setup "$1") if [ ! -s "${CONFIG_CPP}" ]; then exit 1 @@ -279,6 +280,7 @@ echo "Set up parallel run" test_all() { CONFIG_CPP=$("${JUST_MR_CPP}" -C test-repos.json --norc \ --local-build-root "${BUILDROOT}" \ + -L '["env", "PATH='"${PATH}"'"]' \ ${DISTDIR_ARGS} -j 32 setup --all) if [ ! -s "${CONFIG_CPP}" ]; then exit 1 -- cgit v1.2.3