diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2023-03-09 14:59:16 +0100 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2023-03-13 17:28:59 +0100 |
commit | 6a826517cc5878fd1e0e2289ac02251059e6ef67 (patch) | |
tree | 686132792af88e129ed89ce512c79a6acbc87a39 /test/end-to-end/gc | |
parent | e315c8ff4ebc52c0081e9e3df717a080c5d7f41d (diff) | |
download | justbuild-6a826517cc5878fd1e0e2289ac02251059e6ef67.tar.gz |
Test: Extend basic GC test by link count check
Diffstat (limited to 'test/end-to-end/gc')
-rw-r--r-- | test/end-to-end/gc/basic.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/end-to-end/gc/basic.sh b/test/end-to-end/gc/basic.sh index dabb6dcf..b3e93ff5 100644 --- a/test/end-to-end/gc/basic.sh +++ b/test/end-to-end/gc/basic.sh @@ -103,4 +103,12 @@ test -f "${OUT}/out-tree/out/hello/world/tree/hello.txt" test -f "${OUT}/out-tree/out/hello/world/tree/name.txt" test "$(cat "${OUT}/out-tree/out/hello/world/tree/name.txt")" = "World" +# check if all files in generation 0 have been linked and not copied +readonly NON_LINKED_FILES=$(find ${LBR}/protocol-dependent/generation-0 -type f -exec sh -c 'test $(stat -c %h {}) != 2' \; -print) +echo +echo "Files with link count!=2:" +echo "${NON_LINKED_FILES:-"<none>"}" +echo +test -z "${NON_LINKED_FILES}" + echo OK |