summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus T. Aehlig <aehlig@linta.de>2024-02-05 12:32:23 +0100
committerKlaus T. Aehlig <aehlig@linta.de>2024-02-05 16:24:18 +0100
commit7f618e71d0894cbd3b9a532fae311130751128ec (patch)
tree16b3b99b05a1275cf45871f7c1129052c2fa6a0d
parentb20171a41a97dbfd75a98955694eb9df5314ef27 (diff)
downloadjustbuild-7f618e71d0894cbd3b9a532fae311130751128ec.tar.gz
end-to-end tests with remote (and serve) endpoint: inhert PATH
... in the local launcher for the execution end point. In this way, the tests also work on systems where sh does not pull in enough paths to have all the "usual" tools available. To also get a correct path on systems relying on sh pulling in enough paths, take what sh, launched with the default launcher, would believe the path is.
-rwxr-xr-xtest/end-to-end/with_remote_test_runner.py7
-rwxr-xr-xtest/end-to-end/with_serve_test_runner.py7
2 files changed, 14 insertions, 0 deletions
diff --git a/test/end-to-end/with_remote_test_runner.py b/test/end-to-end/with_remote_test_runner.py
index 31e3ca14..31601272 100755
--- a/test/end-to-end/with_remote_test_runner.py
+++ b/test/end-to-end/with_remote_test_runner.py
@@ -74,9 +74,16 @@ if not custom_remote:
print(f"Warning: removing unexpected info file {REMOTE_INFO}")
os.remove(REMOTE_INFO)
+ PATH=subprocess.run(
+ ["env", "--", "sh", "-c", "echo -n $PATH"],
+ stdout=subprocess.PIPE,
+ ).stdout.decode('utf-8')
+
remote_cmd = [
"./bin/just",
"execute",
+ "-L",
+ json.dumps(["env", "PATH=" + PATH]),
"--info-file",
REMOTE_INFO,
"--local-build-root",
diff --git a/test/end-to-end/with_serve_test_runner.py b/test/end-to-end/with_serve_test_runner.py
index 6176c876..5caf752c 100755
--- a/test/end-to-end/with_serve_test_runner.py
+++ b/test/end-to-end/with_serve_test_runner.py
@@ -86,9 +86,16 @@ if os.path.exists(REMOTE_INFO):
print(f"Warning: removing unexpected info file {REMOTE_INFO}")
os.remove(REMOTE_INFO)
+PATH=subprocess.run(
+ ["env", "--", "sh", "-c", "echo -n $PATH"],
+ stdout=subprocess.PIPE,
+).stdout.decode('utf-8')
+
remote_cmd = [
"./bin/just",
"execute",
+ "-L",
+ json.dumps(["env", "PATH=" + PATH]),
"--info-file",
REMOTE_INFO,
"--local-build-root",