diff options
| author | bors <bors@rust-lang.org> | 2023-08-04 05:34:47 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-08-04 05:34:47 +0000 |
| commit | 098c1db7e55e7229a520a2ec8e460e1e300e109b (patch) | |
| tree | 50f220915c64405a877ba4bf0f726d3eefd62b61 /src | |
| parent | a7caaae9fbef81325887aea060fc551da4589c6f (diff) | |
| parent | 353e26869f9b6672089abcd7516b11a4a2a4c375 (diff) | |
| download | rust-098c1db7e55e7229a520a2ec8e460e1e300e109b.tar.gz rust-098c1db7e55e7229a520a2ec8e460e1e300e109b.zip | |
Auto merge of #114449 - matthiaskrgr:rollup-cekswes, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #113534 (Forbid old-style `simd_shuffleN` intrinsics) - #113999 (Specify macro is invalid in certain contexts) - #114348 (Migrate GUI colors test to original CSS color format) - #114373 (unix/kernel_copy.rs: copy_file_range_candidate allows empty output files) - #114404 (Migrate GUI colors test to original CSS color format) - #114409 (builtin impl confirmation wuhu) - #114429 (compiletest: Handle non-utf8 paths (fix FIXME)) - #114431 (Enable tests on rustc_codegen_ssa) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/compiletest/src/runtest.rs | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 7aa86c66bad..07a54cb26d3 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -1939,7 +1939,8 @@ impl<'test> TestCx<'test> { let mut test_client = Command::new(self.config.remote_test_client.as_ref().unwrap()); test_client - .args(&["run", &support_libs.len().to_string(), &prog]) + .args(&["run", &support_libs.len().to_string()]) + .arg(&prog) .args(support_libs) .args(args); @@ -2525,7 +2526,7 @@ impl<'test> TestCx<'test> { // If this is emscripten, then run tests under nodejs if self.config.target.contains("emscripten") { if let Some(ref p) = self.config.nodejs { - args.push(p.clone()); + args.push(p.into()); } else { self.fatal("emscripten target requested and no NodeJS binary found (--nodejs)"); } @@ -2533,7 +2534,7 @@ impl<'test> TestCx<'test> { // shim } else if self.config.target.contains("wasm32") { if let Some(ref p) = self.config.nodejs { - args.push(p.clone()); + args.push(p.into()); } else { self.fatal("wasm32 target requested and no NodeJS binary found (--nodejs)"); } @@ -2545,13 +2546,12 @@ impl<'test> TestCx<'test> { .unwrap() // chop off `ui` .parent() .unwrap(); // chop off `tests` - args.push(src.join("src/etc/wasm32-shim.js").display().to_string()); + args.push(src.join("src/etc/wasm32-shim.js").into_os_string()); } let exe_file = self.make_exe_name(); - // FIXME (#9639): This needs to handle non-utf8 paths - args.push(exe_file.to_str().unwrap().to_owned()); + args.push(exe_file.into_os_string()); // Add the arguments in the run_flags directive args.extend(self.split_maybe_args(&self.props.run_flags)); @@ -2560,12 +2560,16 @@ impl<'test> TestCx<'test> { ProcArgs { prog, args } } - fn split_maybe_args(&self, argstr: &Option<String>) -> Vec<String> { + fn split_maybe_args(&self, argstr: &Option<String>) -> Vec<OsString> { match *argstr { Some(ref s) => s .split(' ') .filter_map(|s| { - if s.chars().all(|c| c.is_whitespace()) { None } else { Some(s.to_owned()) } + if s.chars().all(|c| c.is_whitespace()) { + None + } else { + Some(OsString::from(s)) + } }) .collect(), None => Vec::new(), @@ -4372,8 +4376,8 @@ impl<'test> TestCx<'test> { } struct ProcArgs { - prog: String, - args: Vec<String>, + prog: OsString, + args: Vec<OsString>, } pub struct ProcRes { |
