summaryrefslogtreecommitdiff
path: root/test/end-to-end/just-mr/gc-drop.sh
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2025-04-23 09:33:56 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2025-04-23 09:33:56 +0200
commita045db67a4b9e388e66dc80f33e8548465546fc4 (patch)
tree9f1dd8eb9f68c2b64469286fe1031ac1005319d1 /test/end-to-end/just-mr/gc-drop.sh
parenta212d87be891c5146021b6442063ed39a4a1cd4a (diff)
downloadjustbuild-a045db67a4b9e388e66dc80f33e8548465546fc4.tar.gz
Make end-to-end tests independent of the user's configuration
End-to-end tests should, like all tests, be independent of any non-project files the user has in their home directory. This also applies when running the tests locally. In particular, end-to-end tests should not read the user's ~/.just-mrrc. Therefore, properly set --norc in all end-to-end tests (where this is not already the case).
Diffstat (limited to 'test/end-to-end/just-mr/gc-drop.sh')
-rw-r--r--test/end-to-end/just-mr/gc-drop.sh36
1 files changed, 18 insertions, 18 deletions
diff --git a/test/end-to-end/just-mr/gc-drop.sh b/test/end-to-end/just-mr/gc-drop.sh
index 5bd46996..ce609a48 100644
--- a/test/end-to-end/just-mr/gc-drop.sh
+++ b/test/end-to-end/just-mr/gc-drop.sh
@@ -106,13 +106,13 @@ EOF
cat repos.json
# archive a
-"${JUST_MR}" --just "${JUST}" --local-build-root "${LBR}" --main a \
+"${JUST_MR}" --norc --just "${JUST}" --local-build-root "${LBR}" --main a \
-L '["env", "PATH='"${PATH}"'"]' install -o "${OUT}" 2>&1
# ... sanity check
grep VALUES "${OUT}/out.txt"
# archive b
-"${JUST_MR}" --just "${JUST}" --local-build-root "${LBR}" --main b \
+"${JUST_MR}" --norc --just "${JUST}" --local-build-root "${LBR}" --main b \
-L '["env", "PATH='"${PATH}"'"]' install -o "${OUT}" 2>&1
# ... sanity check
grep 42 "${OUT}/out.txt"
@@ -120,11 +120,11 @@ grep 42 "${OUT}/out.txt"
# Rotate, and use a again
# =======================
-"${JUST_MR}" --local-build-root "${LBR}" --just "${JUST}" gc 2>&1
-"${JUST_MR}" --local-build-root "${LBR}" --just "${JUST}" gc 2>&1
-"${JUST_MR}" --local-build-root "${LBR}" --just "${JUST}" gc-repo 2>&1
+"${JUST_MR}" --norc --local-build-root "${LBR}" --just "${JUST}" gc 2>&1
+"${JUST_MR}" --norc --local-build-root "${LBR}" --just "${JUST}" gc 2>&1
+"${JUST_MR}" --norc --local-build-root "${LBR}" --just "${JUST}" gc-repo 2>&1
-"${JUST_MR}" --just "${JUST}" --local-build-root "${LBR}" --main a \
+"${JUST_MR}" --norc --just "${JUST}" --local-build-root "${LBR}" --main a \
-L '["env", "PATH='"${PATH}"'"]' install -o "${OUT}" 2>&1
grep VALUES "${OUT}/out.txt"
@@ -137,15 +137,15 @@ grep VALUES "${OUT}/out.txt"
# clean up b, which should result in reduced disk usage.
# get rid of CAS/cahe
-"${JUST_MR}" --local-build-root "${LBR}" --just "${JUST}" gc 2>&1
-"${JUST_MR}" --local-build-root "${LBR}" --just "${JUST}" gc 2>&1
+"${JUST_MR}" --norc --local-build-root "${LBR}" --just "${JUST}" gc 2>&1
+"${JUST_MR}" --norc --local-build-root "${LBR}" --just "${JUST}" gc 2>&1
# measure disk usage
PRE_DROP_DISK=$(du -sb "${LBR}" | cut -f 1)
echo "Pre drop, disk usage is ${PRE_DROP_DISK}"
# drop
-"${JUST_MR}" --local-build-root "${LBR}" --just "${JUST}" gc-repo --drop-only 2>&1
+"${JUST_MR}" --norc --local-build-root "${LBR}" --just "${JUST}" gc-repo --drop-only 2>&1
# measure disk usage
@@ -157,21 +157,21 @@ echo "Post drop, disk usage is ${POST_DROP_DISK}"
# Verify that a is still in the youngest generation: even after one more
# rotation, we should be able to build a.
-"${JUST_MR}" --local-build-root "${LBR}" --just "${JUST}" gc 2>&1
-"${JUST_MR}" --local-build-root "${LBR}" --just "${JUST}" gc 2>&1
-"${JUST_MR}" --local-build-root "${LBR}" --just "${JUST}" gc-repo 2>&1
-"${JUST_MR}" --just "${JUST}" --local-build-root "${LBR}" --main a \
+"${JUST_MR}" --norc --local-build-root "${LBR}" --just "${JUST}" gc 2>&1
+"${JUST_MR}" --norc --local-build-root "${LBR}" --just "${JUST}" gc 2>&1
+"${JUST_MR}" --norc --local-build-root "${LBR}" --just "${JUST}" gc-repo 2>&1
+"${JUST_MR}" --norc --just "${JUST}" --local-build-root "${LBR}" --main a \
-L '["env", "PATH='"${PATH}"'"]' install -o "${OUT}" 2>&1
grep VALUES "${OUT}/out.txt"
# Finally demonstrate that the root was not taken from anything but the cache
# ===========================================================================
-"${JUST_MR}" --local-build-root "${LBR}" --just "${JUST}" gc 2>&1
-"${JUST_MR}" --local-build-root "${LBR}" --just "${JUST}" gc 2>&1
-"${JUST_MR}" --local-build-root "${LBR}" --just "${JUST}" gc-repo 2>&1
-"${JUST_MR}" --local-build-root "${LBR}" --just "${JUST}" gc-repo 2>&1
-"${JUST_MR}" --just "${JUST}" --local-build-root "${LBR}" --main a \
+"${JUST_MR}" --norc --local-build-root "${LBR}" --just "${JUST}" gc 2>&1
+"${JUST_MR}" --norc --local-build-root "${LBR}" --just "${JUST}" gc 2>&1
+"${JUST_MR}" --norc --local-build-root "${LBR}" --just "${JUST}" gc-repo 2>&1
+"${JUST_MR}" --norc --local-build-root "${LBR}" --just "${JUST}" gc-repo 2>&1
+"${JUST_MR}" --norc --just "${JUST}" --local-build-root "${LBR}" --main a \
-L '["env", "PATH='"${PATH}"'"]' build 2>&1 && exit 1 || :
echo OK