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/gc/basic.sh | 8 ++++---- test/end-to-end/gc/export.sh | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'test/end-to-end/gc') diff --git a/test/end-to-end/gc/basic.sh b/test/end-to-end/gc/basic.sh index b3e93ff5..28552885 100644 --- a/test/end-to-end/gc/basic.sh +++ b/test/end-to-end/gc/basic.sh @@ -68,14 +68,14 @@ EOF cat TARGETS # Build to fill the cache -"${JUST}" build ${BUILD_ARGS} \ +"${JUST}" build ${BUILD_ARGS} -L '["env", "PATH='"${PATH}"'"]' \ -D '{"ENV": {"TOOLS": "'${TOOLS_DIR}'"}}' 2>&1 # Demonstrate that from now on, we don't build anything any more rm -rf "${TOOLS_DIR}" # Verify the large file is in cache -"${JUST}" install ${BUILD_ARGS} -o "${OUT}/out-large" \ +"${JUST}" install ${BUILD_ARGS} -L '["env", "PATH='"${PATH}"'"]' -o "${OUT}/out-large" \ -D '{"ENV": {"TOOLS": "'${TOOLS_DIR}'"}}' large 2>&1 wc -c "${OUT}/out-large/out.txt" test $(cat "${OUT}/out-large/out.txt" | wc -c) -gt 100000 @@ -84,7 +84,7 @@ test $(cat "${OUT}/out-large/out.txt" | wc -c) -gt 100000 "${JUST}" gc --local-build-root "${LBR}" 2>&1 # Use the tree -"${JUST}" build ${BUILD_ARGS} \ +"${JUST}" build ${BUILD_ARGS} -L '["env", "PATH='"${PATH}"'"]' \ -D '{"ENV": {"TOOLS": "'${TOOLS_DIR}'"}}' tree 2>&1 # collect garbage again @@ -96,7 +96,7 @@ wc -c "${OUT}/root.tar" test $(cat "${OUT}/root.tar" | wc -c) -lt 100000 # Verify that the tree is fully in cache -"${JUST}" install ${BUILD_ARGS} -o "${OUT}/out-tree" \ +"${JUST}" install ${BUILD_ARGS} -L '["env", "PATH='"${PATH}"'"]' -o "${OUT}/out-tree" \ -D '{"ENV": {"TOOLS": "'${TOOLS_DIR}'"}}' tree 2>&1 ls -R "${OUT}/out-tree" test -f "${OUT}/out-tree/out/hello/world/tree/hello.txt" diff --git a/test/end-to-end/gc/export.sh b/test/end-to-end/gc/export.sh index 87ec32fd..83185a1d 100644 --- a/test/end-to-end/gc/export.sh +++ b/test/end-to-end/gc/export.sh @@ -73,6 +73,7 @@ cat TARGETS # Build to fill the cache "${JUST_MR}" ${JUST_MR_ARGS} build ${BUILD_ARGS} \ + -L '["env", "PATH='"${PATH}"'"]' \ -D '{"ENV": {"TOOLS": "'${TOOLS_DIR}'"}}' 2>&1 # Demonstrate that from now on, we don't build anything any more @@ -86,6 +87,7 @@ rm -rf ${LBR}/protocol-dependent/generation-*/*/ac # Use the export "${JUST_MR}" ${JUST_MR_ARGS} build ${BUILD_ARGS} \ + -L '["env", "PATH='"${PATH}"'"]' \ -D '{"ENV": {"TOOLS": "'${TOOLS_DIR}'"}}' 2>&1 # collect garbage again @@ -93,6 +95,7 @@ rm -rf ${LBR}/protocol-dependent/generation-*/*/ac # Verify that the export target is fully in cache "${JUST_MR}" ${JUST_MR_ARGS} install ${BUILD_ARGS} -o "${OUT}" \ + -L '["env", "PATH='"${PATH}"'"]' \ -D '{"ENV": {"TOOLS": "'${TOOLS_DIR}'"}}' 2>&1 ls -R "${OUT}" test -f "${OUT}/out/hello/world/tree/hello.txt" -- cgit v1.2.3