Skip to content

Commit 9c75640

Browse files
committed
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.
1 parent 493c38b commit 9c75640

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+
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)