From 5ec10bf23e299433ad540a22de37669b009ad1ad Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Mon, 2 Dec 2024 12:06:21 +0100 Subject: ["end-to-end", "with remote"]: support REMOTE_BIN For tests where we bring our own remote-execution end point, support a directory where executables can be placed that are picked up early in PATH by remote actions. In this way, a test can be designed verifying that a particular action actually was run remotely. --- test/end-to-end/with_remote_test_runner.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'test/end-to-end/with_remote_test_runner.py') diff --git a/test/end-to-end/with_remote_test_runner.py b/test/end-to-end/with_remote_test_runner.py index ea1121bc..9f817273 100755 --- a/test/end-to-end/with_remote_test_runner.py +++ b/test/end-to-end/with_remote_test_runner.py @@ -60,6 +60,8 @@ os.makedirs(WORK_DIR, exist_ok=True) REMOTE_DIR = os.path.realpath("remote") os.makedirs(REMOTE_DIR, exist_ok=True) REMOTE_LBR = os.path.join(REMOTE_DIR, "build-root") +REMOTE_EXTRA_BINDIR = os.path.join(REMOTE_DIR, "bin") +os.makedirs(REMOTE_EXTRA_BINDIR, exist_ok=True) g_REMOTE_EXECUTION_ADDRESS: str = "" @@ -85,7 +87,9 @@ if not custom_remote: "./staged/bin/just", "execute", "-L", - json.dumps(["env", "PATH=" + PATH]), + json.dumps( + ["env", + "PATH=" + REMOTE_EXTRA_BINDIR + (":" if PATH else "") + PATH]), "--info-file", REMOTE_INFO, "--local-build-root", @@ -135,7 +139,8 @@ else: ENV = dict(os.environ, TEST_TMPDIR=TEMP_DIR, TMPDIR=TEMP_DIR, - REMOTE_EXECUTION_ADDRESS=g_REMOTE_EXECUTION_ADDRESS) + REMOTE_EXECUTION_ADDRESS=g_REMOTE_EXECUTION_ADDRESS, + REMOTE_BIN=REMOTE_EXTRA_BINDIR) if compatible: ENV["COMPATIBLE"] = "YES" -- cgit v1.2.3