summaryrefslogtreecommitdiff
path: root/test/end-to-end/gc
diff options
context:
space:
mode:
authorKlaus T. Aehlig <aehlig@linta.de>2024-02-05 11:46:34 +0100
committerKlaus T. Aehlig <aehlig@linta.de>2024-02-05 16:24:18 +0100
commitb20171a41a97dbfd75a98955694eb9df5314ef27 (patch)
tree1be0e4d5ecaf0bec2e5b198da3d9ff1c3aea0d0d /test/end-to-end/gc
parentd71277e0a0b6ad60b6ecce4382b7f7f3e35c3282 (diff)
downloadjustbuild-b20171a41a97dbfd75a98955694eb9df5314ef27.tar.gz
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.
Diffstat (limited to 'test/end-to-end/gc')
-rw-r--r--test/end-to-end/gc/basic.sh8
-rw-r--r--test/end-to-end/gc/export.sh3
2 files changed, 7 insertions, 4 deletions
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"