Skip to content

Commit 57b3445

Browse files
committed
Auto merge of rust-lang#138652 - ferrocene:pa-remote-test-rmake, r=<try>
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. [Old Makefile-based implementation of this](https://github.com/rust-lang/rust/blob/9b8accbeb6336fa24d02b2a8bcaecaf44fe2bb65/tests/run-make/tools.mk#L65-L74) try-job: armhf-gnu
2 parents 87e60a7 + 5fe1e47 commit 57b3445

File tree

1 file changed

+14
-1
lines changed
  • src/tools/run-make-support/src

1 file changed

+14
-1
lines changed

src/tools/run-make-support/src/run.rs

+14-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,20 @@ fn run_common(name: &str, args: Option<&[&str]>) -> Command {
1212
bin_path.push(cwd());
1313
bin_path.push(name);
1414
let ld_lib_path_envvar = env_var("LD_LIB_PATH_ENVVAR");
15-
let mut cmd = Command::new(bin_path);
15+
16+
let mut cmd = if let Some(rtc) = env::var_os("REMOTE_TEST_CLIENT") {
17+
let mut cmd = Command::new(rtc);
18+
cmd.arg("run");
19+
// FIXME: the "0" indicates how many support files should be uploaded along with the binary
20+
// to execute. If a test requires additional files to be pushed to the remote machine, this
21+
// will have to be changed (and the support files will have to be uploaded).
22+
cmd.arg("0");
23+
cmd.arg(bin_path);
24+
cmd
25+
} else {
26+
Command::new(bin_path)
27+
};
28+
1629
if let Some(args) = args {
1730
for arg in args {
1831
cmd.arg(arg);

0 commit comments

Comments
 (0)