diff options
author | Klaus T. Aehlig <aehlig@linta.de> | 2024-02-05 11:46:34 +0100 |
---|---|---|
committer | Klaus T. Aehlig <aehlig@linta.de> | 2024-02-05 16:24:18 +0100 |
commit | b20171a41a97dbfd75a98955694eb9df5314ef27 (patch) | |
tree | 1be0e4d5ecaf0bec2e5b198da3d9ff1c3aea0d0d /test/end-to-end/target-tests | |
parent | d71277e0a0b6ad60b6ecce4382b7f7f3e35c3282 (diff) | |
download | justbuild-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/target-tests')
-rwxr-xr-x | test/end-to-end/target-tests/glob.sh | 8 | ||||
-rwxr-xr-x | test/end-to-end/target-tests/repo_names.sh | 4 | ||||
-rwxr-xr-x | test/end-to-end/target-tests/tree-inputs.sh | 1 | ||||
-rwxr-xr-x | test/end-to-end/target-tests/upwards.sh | 2 |
4 files changed, 9 insertions, 6 deletions
diff --git a/test/end-to-end/target-tests/glob.sh b/test/end-to-end/target-tests/glob.sh index f655b3e3..131d533e 100755 --- a/test/end-to-end/target-tests/glob.sh +++ b/test/end-to-end/target-tests/glob.sh @@ -129,7 +129,7 @@ EOI do_test() { echo === Enumeration refres to targets === - ${TOOL} install -C ${CONF} --local-build-root ${BUILDROOT} -o ${OUTDIR}/enum enumeration 2>&1 + ${TOOL} install -L '["env", "PATH='"${PATH}"'"]' -C ${CONF} --local-build-root ${BUILDROOT} -o ${OUTDIR}/enum enumeration 2>&1 cat ${OUTDIR}/enum/keys.txt echo @@ -141,7 +141,7 @@ do_test() { echo === Glob always refres to files and directories are ignored === - ${TOOL} install -C ${CONF} --local-build-root ${BUILDROOT} -o ${OUTDIR}/glob glob 2>&1 + ${TOOL} install -L '["env", "PATH='"${PATH}"'"]' -C ${CONF} --local-build-root ${BUILDROOT} -o ${OUTDIR}/glob glob 2>&1 cat ${OUTDIR}/glob/keys.txt echo @@ -153,7 +153,7 @@ do_test() { echo === Globs and targets can be combined === - ${TOOL} install -C ${CONF} --local-build-root ${BUILDROOT} -o ${OUTDIR}/with_target with_target 2>&1 + ${TOOL} install -L '["env", "PATH='"${PATH}"'"]' -C ${CONF} --local-build-root ${BUILDROOT} -o ${OUTDIR}/with_target with_target 2>&1 cat ${OUTDIR}/with_target/keys.txt echo @@ -165,7 +165,7 @@ do_test() { echo === Globs only inspect the top-level directory of the module === - ${TOOL} install -C ${CONF} --local-build-root ${BUILDROOT} -o ${OUTDIR}/not_top_level not_top_level 2>&1 + ${TOOL} install -L '["env", "PATH='"${PATH}"'"]' -C ${CONF} --local-build-root ${BUILDROOT} -o ${OUTDIR}/not_top_level not_top_level 2>&1 cat ${OUTDIR}/not_top_level/keys.txt echo diff --git a/test/end-to-end/target-tests/repo_names.sh b/test/end-to-end/target-tests/repo_names.sh index aec5996a..65929674 100755 --- a/test/end-to-end/target-tests/repo_names.sh +++ b/test/end-to-end/target-tests/repo_names.sh @@ -88,7 +88,7 @@ EOF mkdir -p .root echo == Building in A == -./bin/tool-under-test install -C bindings.json -o . --local-build-root .root --main A . back 2>&1 +./bin/tool-under-test install -L '["env", "PATH='"${PATH}"'"]' -C bindings.json -o . --local-build-root .root --main A . back 2>&1 cat back.txt grep -q 'I am A' back.txt grep -q 'This is B' back.txt @@ -96,7 +96,7 @@ grep -q 'Hello A' back.txt rm -f back.txt echo == Building in B == -./bin/tool-under-test install -C bindings.json -o . --local-build-root .root --main B . back 2>&1 +./bin/tool-under-test install -L '["env", "PATH='"${PATH}"'"]' -C bindings.json -o . --local-build-root .root --main B . back 2>&1 cat back.txt grep -q 'I am B' back.txt grep -q 'This is A' back.txt diff --git a/test/end-to-end/target-tests/tree-inputs.sh b/test/end-to-end/target-tests/tree-inputs.sh index edbe7f7e..7a0398b8 100755 --- a/test/end-to-end/target-tests/tree-inputs.sh +++ b/test/end-to-end/target-tests/tree-inputs.sh @@ -38,6 +38,7 @@ cat > src/TARGETS <<'EOF' EOF ./bin/tool-under-test install -o out --workspace-root src \ + -L '["env", "PATH='"${PATH}"'"]' \ --local-build-root .root . read_trees 2>&1 grep SUCCESS out/result diff --git a/test/end-to-end/target-tests/upwards.sh b/test/end-to-end/target-tests/upwards.sh index fb700588..d196a8e8 100755 --- a/test/end-to-end/target-tests/upwards.sh +++ b/test/end-to-end/target-tests/upwards.sh @@ -38,6 +38,7 @@ cat > src/TARGETS <<'EOF' EOF ./bin/tool-under-test install -o out --workspace-root src \ + -L '["env", "PATH='"${PATH}"'"]' \ --local-build-root .root . it 2>&1 grep OK out/out @@ -61,6 +62,7 @@ EOF ./bin/tool-under-test install -o out2 --workspace-root src \ + -L '["env", "PATH='"${PATH}"'"]' \ --local-build-root .root deep 'OK up' 2>&1 grep OK out2/out |