diff options
| author | Pietro Albini <pietro.albini@ferrous-systems.com> | 2025-03-18 09:59:00 +0100 |
|---|---|---|
| committer | Pietro Albini <pietro.albini@ferrous-systems.com> | 2025-03-18 10:10:50 +0100 |
| commit | 5fe1e47f80de2c5edd63d575ad311ccbd55d8f46 (patch) | |
| tree | e55ed01ec2102efc4c9ac41f9166010badb3bdef /src/tools | |
| parent | 493c38ba371929579fe136df26eccd9516347c7a (diff) | |
| download | rust-5fe1e47f80de2c5edd63d575ad311ccbd55d8f46.tar.gz rust-5fe1e47f80de2c5edd63d575ad311ccbd55d8f46.zip | |
reintroduce remote-test support in run-make tests
The old Makefile-based infrastructure included support for executing binaries with remote-test-client if configured, but that didn't get ported to run_make_support as part of the rmake migration. This PR re-introduces back that support, with the same implementation (and limitations) of the original Makefile-based support.
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/run-make-support/src/run.rs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/tools/run-make-support/src/run.rs b/src/tools/run-make-support/src/run.rs index 7812863ccc2..60e711d3402 100644 --- a/src/tools/run-make-support/src/run.rs +++ b/src/tools/run-make-support/src/run.rs @@ -12,7 +12,20 @@ fn run_common(name: &str, args: Option<&[&str]>) -> Command { bin_path.push(cwd()); bin_path.push(name); let ld_lib_path_envvar = env_var("LD_LIB_PATH_ENVVAR"); - let mut cmd = Command::new(bin_path); + + let mut cmd = if let Some(rtc) = env::var_os("REMOTE_TEST_CLIENT") { + let mut cmd = Command::new(rtc); + cmd.arg("run"); + // FIXME: the "0" indicates how many support files should be uploaded along with the binary + // to execute. If a test requires additional files to be pushed to the remote machine, this + // will have to be changed (and the support files will have to be uploaded). + cmd.arg("0"); + cmd.arg(bin_path); + cmd + } else { + Command::new(bin_path) + }; + if let Some(args) = args { for arg in args { cmd.arg(arg); |
