diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-07-05 10:46:42 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-07-11 11:56:33 +0200 |
commit | bec3322cfff305f13735c5f72febfd752b49fa10 (patch) | |
tree | 3d730607194508cca566873f1d06cee02bb8aa44 /test/end-to-end/remote-execution/install.sh | |
parent | cc5636adb95d6e0de1ff7858b317d7ed319c0ee8 (diff) | |
download | justbuild-bec3322cfff305f13735c5f72febfd752b49fa10.tar.gz |
test: Extend coverage for symlinks and ignore_special roots
Diffstat (limited to 'test/end-to-end/remote-execution/install.sh')
-rw-r--r-- | test/end-to-end/remote-execution/install.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/end-to-end/remote-execution/install.sh b/test/end-to-end/remote-execution/install.sh index 559b1a5b..29c74dfa 100644 --- a/test/end-to-end/remote-execution/install.sh +++ b/test/end-to-end/remote-execution/install.sh @@ -50,6 +50,7 @@ mkdir -p tree/foo/bar mkdir -p tree/baz echo content frist file > tree/foo/bar/data.txt echo content second file > tree/baz/data.txt +ln -s dummy tree/foo/link cat > TARGETS <<'EOF' {"": {"type": "install", "dirs": [[["TREE", null, "tree"], "."]]}} @@ -69,6 +70,10 @@ for f in $(cd "${SRCDIR_A}/tree" && find . -type f) do cmp "${SRCDIR_A}/tree/$f" "${OUTDIR_B}/first/$f" done +for l in $(cd "${SRCDIR_A}/tree" && find . -type L) +do + cmp $(readlink "${SRCDIR_A}/tree/$l") $(readlink "${OUTDIR_B}/first/$l") +done ## ... and to remember @@ -78,10 +83,15 @@ done "${JUST}" install-cas --local-build-root "${LBRDIR_B}" \ -o "${OUTDIR_B}/first-from-local" ${LOCAL_ARGS} "${TREE_ID}" 2>&1 + for f in $(cd "${SRCDIR_A}/tree" && find . -type f) do cmp "${SRCDIR_A}/tree/$f" "${OUTDIR_B}/first-from-local/$f" done +for l in $(cd "${SRCDIR_A}/tree" && find . -type L) +do + cmp $(readlink "${SRCDIR_A}/tree/$l") $(readlink "${OUTDIR_B}/first-from-local/$l") +done # install-cas has to prefer (at least: use) local CAS, also with remote endpoint @@ -95,8 +105,10 @@ touch ROOT mkdir -p tree/different/foobar mkdir -p tree/bar/other_dir +mkdir -p tree/another_dir echo some other content > tree/different/foobar/file.txt echo yet another content > tree/bar/other_dir/file.txt +ln -s dummy tree/another_dir/link cat > TARGETS <<'EOF' {"": {"type": "install", "dirs": [[["TREE", null, "tree"], "."]]}} @@ -116,6 +128,10 @@ for f in $(cd "${SRCDIR_B}/tree" && find . -type f) do cmp "${SRCDIR_B}/tree/$f" "${OUTDIR_B}/second/$f" done +for l in $(cd "${SRCDIR_B}/tree" && find . -type L) +do + cmp $(readlink "${SRCDIR_B}/tree/$l") $(readlink "${OUTDIR_B}/second/$l") +done # install --remember @@ -134,6 +150,7 @@ cat > TARGETS <<'EOF' , "echo some file content > out/foo/data.txt" , "echo more file content > out/bar/file.txt" , "echo even more file content > out/bar/another_file.txt" + , "ln -s dummy out/baz/link" ] } } @@ -154,5 +171,9 @@ for f in $(cd "${OUTDIR_C}/remote/out" && find . -type f) do cmp "${OUTDIR_C}/remote/out/$f" "${OUTDIR_C}/local/$f" done +for l in $(cd "${OUTDIR_C}/remote/out" && find . -type L) +do + cmp $(readlink "${OUTDIR_C}/remote/out/$l") $(readlink "${OUTDIR_C}/local/$l") +done echo OK |