summaryrefslogtreecommitdiff
path: root/test/end-to-end/with_remote_test_runner.py
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2024-12-02 12:06:21 +0100
committerKlaus Aehlig <klaus.aehlig@huawei.com>2024-12-02 17:20:35 +0100
commit5ec10bf23e299433ad540a22de37669b009ad1ad (patch)
tree92efd3ad393ebdb51c18017ff673b328ccfc96ce /test/end-to-end/with_remote_test_runner.py
parentfcb5f8625c8b872497c88cc23f169926d691e308 (diff)
downloadjustbuild-5ec10bf23e299433ad540a22de37669b009ad1ad.tar.gz
["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.
Diffstat (limited to 'test/end-to-end/with_remote_test_runner.py')
-rwxr-xr-xtest/end-to-end/with_remote_test_runner.py9
1 files changed, 7 insertions, 2 deletions
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"