summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--test/Cargo.lock1
-rw-r--r--test/scripts/ssh-setup.sh5
-rw-r--r--test/test-runner/Cargo.toml1
-rw-r--r--test/test-runner/src/main.rs18
4 files changed, 20 insertions, 5 deletions
diff --git a/test/Cargo.lock b/test/Cargo.lock
index 6209028fde..67f538e39a 100644
--- a/test/Cargo.lock
+++ b/test/Cargo.lock
@@ -3409,6 +3409,7 @@ version = "0.0.0"
dependencies = [
"bytes",
"chrono",
+ "dirs",
"futures",
"libc",
"log",
diff --git a/test/scripts/ssh-setup.sh b/test/scripts/ssh-setup.sh
index 08887d4aba..66809407d8 100644
--- a/test/scripts/ssh-setup.sh
+++ b/test/scripts/ssh-setup.sh
@@ -22,8 +22,9 @@ for file in test-runner connection-checker $APP_PACKAGE $PREVIOUS_APP $UI_RUNNER
cp -f "$SCRIPT_DIR/$file" "$RUNNER_DIR"
done
-# Unprivileged users need execute rights for connection checker
-chmod 551 "${RUNNER_DIR}/connection-checker"
+# Unprivileged users need execute rights for some executables
+chmod 775 "${RUNNER_DIR}/connection-checker"
+chmod 775 "${RUNNER_DIR}/$UI_RUNNER"
chown -R root "$RUNNER_DIR/"
diff --git a/test/test-runner/Cargo.toml b/test/test-runner/Cargo.toml
index 7206cb394a..8df61e7164 100644
--- a/test/test-runner/Cargo.toml
+++ b/test/test-runner/Cargo.toml
@@ -11,6 +11,7 @@ rust-version.workspace = true
workspace = true
[dependencies]
+dirs = "5.0.1"
futures = { workspace = true }
tarpc = { workspace = true }
tokio = { workspace = true }
diff --git a/test/test-runner/src/main.rs b/test/test-runner/src/main.rs
index 79bc17b4ef..735e61360e 100644
--- a/test/test-runner/src/main.rs
+++ b/test/test-runner/src/main.rs
@@ -92,12 +92,24 @@ impl Service for TestServer {
log::debug!("Exec {} (args: {args:?})", path);
let mut cmd = Command::new(&path);
+ cmd.stdout(Stdio::piped());
+ cmd.stderr(Stdio::piped());
+ cmd.stdin(Stdio::piped());
cmd.args(args);
- // Make sure that PATH is updated
- // TODO: We currently do not need this on non-Windows
#[cfg(target_os = "windows")]
- cmd.env("PATH", sys::get_system_path_var()?);
+ {
+ // Make sure that PATH is updated
+ cmd.env("PATH", sys::get_system_path_var()?);
+ if let Some(home_dir) = dirs::home_dir() {
+ cmd.env("USERPROFILE", home_dir);
+ }
+ }
+
+ #[cfg(unix)]
+ if let Some(home_dir) = dirs::home_dir() {
+ cmd.env("HOME", home_dir);
+ }
cmd.envs(env);