diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2025-04-23 09:33:56 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2025-04-23 09:33:56 +0200 |
commit | a045db67a4b9e388e66dc80f33e8548465546fc4 (patch) | |
tree | 9f1dd8eb9f68c2b64469286fe1031ac1005319d1 /test/end-to-end/just-mr/repeated-gc.sh | |
parent | a212d87be891c5146021b6442063ed39a4a1cd4a (diff) | |
download | justbuild-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/repeated-gc.sh')
-rwxr-xr-x | test/end-to-end/just-mr/repeated-gc.sh | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/end-to-end/just-mr/repeated-gc.sh b/test/end-to-end/just-mr/repeated-gc.sh index 3b7bf62e..f4fa3ce6 100755 --- a/test/end-to-end/just-mr/repeated-gc.sh +++ b/test/end-to-end/just-mr/repeated-gc.sh @@ -84,18 +84,18 @@ grep VALUES "${OUT}/out.txt" # Before rotation the git root should still exist [ -e "${GIT_ROOT}" ] -"${JUST_MR}" --local-build-root "${LBR}" --just "${JUST}" gc-repo 2>&1 +"${JUST_MR}" --norc --local-build-root "${LBR}" --just "${JUST}" gc-repo 2>&1 # After gc rotation, the original git root should no longer exist [ -e "${GIT_ROOT}" ] && exit 1 || : -"${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 # Building should nevertheless succeed, due to the old repo generation # ===================================================================== -"${JUST_MR}" --just "${JUST}" --local-build-root "${LBR}" \ +"${JUST_MR}" --norc --just "${JUST}" --local-build-root "${LBR}" \ -L '["env", "PATH='"${PATH}"'"]' install -o "${OUT}" 2>&1 # sanity check grep VALUES "${OUT}/out.txt" @@ -113,12 +113,12 @@ GIT_ROOT=$(jq -r '.repositories.""."workspace_root" | .[2]' "${CONF}") echo "Git root is ${GIT_ROOT}" [ -e "${GIT_ROOT}" ] -"${JUST_MR}" --local-build-root "${LBR}" --just "${JUST}" gc-repo 2>&1 +"${JUST_MR}" --norc --local-build-root "${LBR}" --just "${JUST}" gc-repo 2>&1 [ -e "${GIT_ROOT}" ] && exit 1 || : -"${JUST_MR}" --local-build-root "${LBR}" --just "${JUST}" gc 2>&1 -"${JUST_MR}" --local-build-root "${LBR}" --just "${JUST}" gc 2>&1 -"${JUST_MR}" --just "${JUST}" --local-build-root "${LBR}" \ +"${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 --just "${JUST}" --local-build-root "${LBR}" \ -L '["env", "PATH='"${PATH}"'"]' install -o "${OUT}" 2>&1 grep VALUES "${OUT}/out.txt" rm -f "${OUT}/out.txt" @@ -128,8 +128,8 @@ done # Finally demonstrate that the root was not taken from anything but the cache # =========================================================================== -"${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}" --norc --local-build-root "${LBR}" --just "${JUST}" gc-repo 2>&1 +"${JUST_MR}" --norc --local-build-root "${LBR}" --just "${JUST}" gc-repo 2>&1 # after full rotation of the repository, the root should be lost "${JUST_MR}" --norc --local-build-root "${LBR}" -f "${OUT}/log" \ |