summaryrefslogtreecommitdiff
path: root/test/end-to-end/target-cache
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2024-07-12 16:12:08 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2024-07-12 16:29:14 +0200
commitf3d2cb5a3575a4f1c3068e597f48fbd8671998a4 (patch)
treec8080bb41d82ce6efd106f047dd87184e0b3db26 /test/end-to-end/target-cache
parent534ce6a0a096cede9aff88dd433b4c513003c189 (diff)
downloadjustbuild-f3d2cb5a3575a4f1c3068e597f48fbd8671998a4.tar.gz
Make end-to-end tests independent of the user's rc file
Our end-to-end tests involve calling just-mr. When run locally, in order to make then self-contained we need to make sure this test call to just-mr does not pick up the user's .just-mrrc that might contain different setting not overridden at the command line.
Diffstat (limited to 'test/end-to-end/target-cache')
-rw-r--r--test/end-to-end/target-cache/check-sharding.sh22
-rw-r--r--test/end-to-end/target-cache/serve-sync.sh8
2 files changed, 15 insertions, 15 deletions
diff --git a/test/end-to-end/target-cache/check-sharding.sh b/test/end-to-end/target-cache/check-sharding.sh
index 21d78417..496e11c4 100644
--- a/test/end-to-end/target-cache/check-sharding.sh
+++ b/test/end-to-end/target-cache/check-sharding.sh
@@ -258,7 +258,7 @@ echo
mkdir -p result
# Local build has the default TC shard.
-"${JUST_MR}" --local-build-root "${LBR}" --just "${JUST}" \
+"${JUST_MR}" --norc --local-build-root "${LBR}" --just "${JUST}" \
${ARGS} -L "${LOCAL_LAUNCHER}" install -o result 2>&1
if ! grep local result/test.out; then
echo 'Expected "local" result but found "'$(cat result/test.out)'"'
@@ -268,7 +268,7 @@ echo
# A regular remote endpoint has some different local TC shard client-side than
# a local build.
-"${JUST_MR}" --local-build-root "${LBR}" --just "${JUST}" \
+"${JUST_MR}" --norc --local-build-root "${LBR}" --just "${JUST}" \
${ARGS} -r ${REMOTE_ADDRESS} install -o result 2>&1
if ! grep remote result/test.out; then
echo 'Expected "remote" result but found "'$(cat result/test.out)'"'
@@ -279,7 +279,7 @@ echo
# A serve endpoint that dispatches to the same remote as before will have the
# same client-side TC shard as if it the build was directly dispatched to said
# remote.
-"${JUST_MR}" --local-build-root "${LBR}" --just "${JUST}" \
+"${JUST_MR}" --norc --local-build-root "${LBR}" --just "${JUST}" \
${ARGS} -R ${SERVE_RE_ADDRESS} -r ${REMOTE_ADDRESS} install -o result 2>&1
if ! grep remote result/test.out; then
echo 'Expected "remote" result but found "'$(cat result/test.out)'"'
@@ -288,7 +288,7 @@ fi
echo
# Serve standalone only shards like a local build on the serve-side.
-"${JUST_MR}" --local-build-root "${LBR}" --just "${JUST}" \
+"${JUST_MR}" --norc --local-build-root "${LBR}" --just "${JUST}" \
${ARGS} -R ${SERVE_ADDRESS} install -o result 2>&1
if ! grep serve result/test.out; then
echo 'Expected "serve" result but found "'$(cat result/test.out)'"'
@@ -297,7 +297,7 @@ fi
echo
# Serve standalone can also be used purely as a remote execution endpoint.
-"${JUST_MR}" --local-build-root "${LBR}" --just "${JUST}" \
+"${JUST_MR}" --norc --local-build-root "${LBR}" --just "${JUST}" \
${ARGS} -r ${SERVE_ADDRESS} install -o result 2>&1
if ! grep serve result/test.out; then
echo 'Expected "serve" result but found "'$(cat result/test.out)'"'
@@ -307,7 +307,7 @@ echo
# Check that rebuilding locally after all these runs picks up the correct TC
# cache hit.
-"${JUST_MR}" --local-build-root "${LBR}" --just "${JUST}" \
+"${JUST_MR}" --norc --local-build-root "${LBR}" --just "${JUST}" \
${ARGS} -L "${LOCAL_LAUNCHER}" install -o result 2>&1
if ! grep local result/test.out; then
echo 'Expected "local" result but found "'$(cat result/test.out)'"'
@@ -321,7 +321,7 @@ rm "${REMOTE_BIN_DIR}/endpoint"
rm "${SERVE_BIN_DIR}/endpoint"
rm "${SERVE_RE_BIN_DIR}/endpoint"
-"${JUST_MR}" --local-build-root "${LBR}" --just "${JUST}" \
+"${JUST_MR}" --norc --local-build-root "${LBR}" --just "${JUST}" \
${ARGS} -L "${LOCAL_LAUNCHER}" install -o result 2>&1
if ! grep local result/test.out; then
echo 'Expected "local" result but found "'$(cat result/test.out)'"'
@@ -329,7 +329,7 @@ if ! grep local result/test.out; then
fi
echo
-"${JUST_MR}" --local-build-root "${LBR}" --just "${JUST}" \
+"${JUST_MR}" --norc --local-build-root "${LBR}" --just "${JUST}" \
${ARGS} -r ${REMOTE_ADDRESS} install -o result 2>&1
if ! grep remote result/test.out; then
echo 'Expected "remote" result but found "'$(cat result/test.out)'"'
@@ -338,7 +338,7 @@ fi
grep remote result/test.out
echo
-"${JUST_MR}" --local-build-root "${LBR}" --just "${JUST}" \
+"${JUST_MR}" --norc --local-build-root "${LBR}" --just "${JUST}" \
${ARGS} -R ${SERVE_RE_ADDRESS} -r ${REMOTE_ADDRESS} install -o result 2>&1
if ! grep remote result/test.out; then
echo 'Expected "remote" result but found "'$(cat result/test.out)'"'
@@ -346,7 +346,7 @@ if ! grep remote result/test.out; then
fi
echo
-"${JUST_MR}" --local-build-root "${LBR}" --just "${JUST}" \
+"${JUST_MR}" --norc --local-build-root "${LBR}" --just "${JUST}" \
${ARGS} -R ${SERVE_ADDRESS} install -o result 2>&1
if ! grep serve result/test.out; then
echo 'Expected "serve" result but found "'$(cat result/test.out)'"'
@@ -354,7 +354,7 @@ if ! grep serve result/test.out; then
fi
echo
-"${JUST_MR}" --local-build-root "${LBR}" --just "${JUST}" \
+"${JUST_MR}" --norc --local-build-root "${LBR}" --just "${JUST}" \
${ARGS} -r ${SERVE_ADDRESS} install -o result 2>&1
if ! grep serve result/test.out; then
echo 'Expected "serve" result but found "'$(cat result/test.out)'"'
diff --git a/test/end-to-end/target-cache/serve-sync.sh b/test/end-to-end/target-cache/serve-sync.sh
index 7e5bd092..62ad666a 100644
--- a/test/end-to-end/target-cache/serve-sync.sh
+++ b/test/end-to-end/target-cache/serve-sync.sh
@@ -120,9 +120,9 @@ cat repos.json
# Build all locally, demonstrating the extensional projection and
# that the export structure is correct.
-"${JUST_MR}" --local-build-root "${LBR_LOCAL}" --just "${JUST}" \
+"${JUST_MR}" --norc --local-build-root "${LBR_LOCAL}" --just "${JUST}" \
-L '["env", "PATH='"${PATH}"'"]' build 2>&1
-"${JUST_MR}" --local-build-root "${LBR_LOCAL}" --just "${JUST}" \
+"${JUST_MR}" --norc --local-build-root "${LBR_LOCAL}" --just "${JUST}" \
-L '["env", "PATH='"${PATH}"'"]' build 2>&1
@@ -132,7 +132,7 @@ echo
# Now, with a completely fresh local build root, build the default target, using
# a serve endpoint which can provide ["@", "lib", "", ""],
# but not ["@", "", "", "local"].
-"${JUST_MR}" --local-build-root "${LBR}" --just "${JUST}" ${SERVE_ARGS} \
+"${JUST_MR}" --norc --local-build-root "${LBR}" --just "${JUST}" ${SERVE_ARGS} \
-L '["env", "PATH='"${PATH}"'"]' build 2>&1
echo 'remote build (same endpoint)'
@@ -140,7 +140,7 @@ echo
# Now, when continuing without serve (but still using remote-exection), things
# should still be in a consistent state, without causing staging conflicts.
echo
-"${JUST_MR}" --local-build-root "${LBR}" --just "${JUST}" ${RE_ARGS} \
+"${JUST_MR}" --norc --local-build-root "${LBR}" --just "${JUST}" ${RE_ARGS} \
-L '["env", "PATH='"${PATH}"'"]' build 2>&1