diff options
author | Sascha Roloff <sascha.roloff@huawei.com> | 2022-12-22 19:45:42 +0100 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2023-01-20 15:47:43 +0100 |
commit | 0db0064273920c835342dd168f8213b6a567e8c9 (patch) | |
tree | d51a77c3df5739f899040ec4808252ca0b64b272 /test/end-to-end/built-in-rules | |
parent | 3430425a300159c4a8a0f67cbbd0c3098daa9dfc (diff) | |
download | justbuild-0db0064273920c835342dd168f8213b6a567e8c9.tar.gz |
Add local garbage collection
Diffstat (limited to 'test/end-to-end/built-in-rules')
-rwxr-xr-x | test/end-to-end/built-in-rules/filegen_config.sh | 4 | ||||
-rwxr-xr-x | test/end-to-end/built-in-rules/generic_out_dirs.sh | 8 | ||||
-rwxr-xr-x | test/end-to-end/built-in-rules/tree.sh | 4 |
3 files changed, 10 insertions, 6 deletions
diff --git a/test/end-to-end/built-in-rules/filegen_config.sh b/test/end-to-end/built-in-rules/filegen_config.sh index c0fb72c7..4111578a 100755 --- a/test/end-to-end/built-in-rules/filegen_config.sh +++ b/test/end-to-end/built-in-rules/filegen_config.sh @@ -16,6 +16,8 @@ set -e +readonly LBRDIR="$TMPDIR/local-build-root" + touch ROOT cat <<'EOF' > TARGETS @@ -39,7 +41,7 @@ cat <<'EOF' > TARGETS EOF bin/tool-under-test analyse -D '{"NAME": "here-be-dragons"}' \ - --dump-targets targets.json --dump-blobs blobs.json 2>&1 + --local-build-root "$LBRDIR" --dump-targets targets.json --dump-blobs blobs.json 2>&1 echo echo "Blobs" cat blobs.json diff --git a/test/end-to-end/built-in-rules/generic_out_dirs.sh b/test/end-to-end/built-in-rules/generic_out_dirs.sh index 0302f6eb..afa49d19 100755 --- a/test/end-to-end/built-in-rules/generic_out_dirs.sh +++ b/test/end-to-end/built-in-rules/generic_out_dirs.sh @@ -52,7 +52,7 @@ echo "done" >&2 echo "missing_outs_and_out_dirs" >&2 # at least one of "outs" or "out_dirs" must be declared. we expect to fail during the analysis phase -bin/tool-under-test analyse --log-limit 0 -f test.log missing_outs_and_out_dirs && exit 1 || : +bin/tool-under-test analyse --local-build-root lcl-build --log-limit 0 -f test.log missing_outs_and_out_dirs && exit 1 || : grep 'outs' test.log && grep 'out_dirs' test.log echo "done" >&2 @@ -62,7 +62,7 @@ echo "out_dirs_contains_a_file" >&2 # because it is a directory. We don't grep the shell error message because it can # varay. # the analysis phase should run fine -bin/tool-under-test analyse out_dirs_contains_a_file +bin/tool-under-test analyse --local-build-root lcl-build out_dirs_contains_a_file echo "analysis ok" >&2 bin/tool-under-test build --local-build-root lcl-build out_dirs_contains_a_file && exit 1 || : echo "done" >&2 @@ -71,7 +71,7 @@ echo "outs_contains_a_dir" >&2 # we declared an output file "out", which is actually a tree # if we don't creat directory out, the shell will also complain about nonexisting directory "out" # anlysis should run fine -bin/tool-under-test analyse outs_contains_a_dir +bin/tool-under-test analyse --local-build-root lcl-build outs_contains_a_dir echo "analysis ok" >&2 bin/tool-under-test build --local-build-root lcl-build -f test.log outs_contains_a_dir && exit 1 || : # grep 'ERROR' test.log | grep 'output file' @@ -79,7 +79,7 @@ echo "done" >&2 echo "collision" >&2 # we expect an error during the analysis phase because outs and out_dirs must be disjoint -bin/tool-under-test analyse --log-limit 0 -f test.log collision && exit 1 || : +bin/tool-under-test analyse --local-build-root lcl-build --log-limit 0 -f test.log collision && exit 1 || : grep 'disjoint' test.log echo "done" >&2 exit diff --git a/test/end-to-end/built-in-rules/tree.sh b/test/end-to-end/built-in-rules/tree.sh index 68699eec..fd0cc957 100755 --- a/test/end-to-end/built-in-rules/tree.sh +++ b/test/end-to-end/built-in-rules/tree.sh @@ -16,6 +16,8 @@ set -e +readonly LBRDIR="$TMPDIR/local-build-root" + touch ROOT touch a.txt @@ -27,7 +29,7 @@ cat <<'EOF' > TARGETS EOF bin/tool-under-test analyse \ - --dump-trees trees.json --dump-artifacts-to-build artifacts.json 2>&1 + --local-build-root "$LBRDIR" --dump-trees trees.json --dump-artifacts-to-build artifacts.json 2>&1 echo echo Artifacts cat artifacts.json |