From f3d2cb5a3575a4f1c3068e597f48fbd8671998a4 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Fri, 12 Jul 2024 16:12:08 +0200 Subject: 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. --- test/end-to-end/target-cache/check-sharding.sh | 22 +++++++++++----------- test/end-to-end/target-cache/serve-sync.sh | 8 ++++---- 2 files changed, 15 insertions(+), 15 deletions(-) (limited to 'test/end-to-end/target-cache') 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 -- cgit v1.2.3