Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reintroduce remote-test support in run-make tests #138652

Merged
merged 2 commits into from
Mar 25, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion src/tools/run-make-support/src/run.rs
Original file line number Diff line number Diff line change
@@ -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);
2 changes: 2 additions & 0 deletions tests/run-make/doctests-keep-binaries/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//@ ignore-cross-compile attempts to run the doctests

// Check that valid binaries are persisted by running them, regardless of whether the
// --run or --no-run option is used.

2 changes: 2 additions & 0 deletions tests/run-make/target-cpu-native/rmake.rs
Original file line number Diff line number Diff line change
@@ -3,6 +3,8 @@
// warnings when used, and that binaries produced by it can also be successfully executed.
// See https://github.com/rust-lang/rust/pull/23238

//@ ignore-cross-compile target-cpu=native doesn't work well when cross compiling

use run_make_support::{run, rustc};

fn main() {
Loading