Skip to content

Commit

Permalink
FIXME(9639) remove fixme and accept non-utf8 paths in compiletest
Browse files Browse the repository at this point in the history
  • Loading branch information
nivkner committed Dec 19, 2018
1 parent 957a9c7 commit 0e72c80
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions src/tools/compiletest/src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use util::{logv, PathBufExt};
use std::collections::hash_map::DefaultHasher;
use std::collections::{HashMap, HashSet, VecDeque};
use std::env;
use std::ffi::OsString;
use std::ffi::{OsStr, OsString};
use std::fmt;
use std::fs::{self, create_dir_all, File};
use std::hash::{Hash, Hasher};
Expand Down Expand Up @@ -760,13 +760,13 @@ impl<'test> TestCx<'test> {
}
drop(stdout);

let debugger_script = self.make_out_name("debugger.script");
// FIXME (#9639): This needs to handle non-utf8 paths
let debugger_opts = vec![
"-quiet".to_owned(),
"-batch".to_owned(),
"-nx".to_owned(),
format!("-command={}", debugger_script.to_str().unwrap()),
let mut debugger_script = OsString::from("-command=");
debugger_script.push(self.make_out_name("debugger.script"));
let debugger_opts: &[&OsStr] = &[
"-quiet".as_ref(),
"-batch".as_ref(),
"-nx".as_ref(),
&debugger_script,
];

let gdb_path = self.config.gdb.as_ref().unwrap();
Expand All @@ -775,12 +775,12 @@ impl<'test> TestCx<'test> {
stdout,
stderr,
} = Command::new(&gdb_path)
.args(&debugger_opts)
.args(debugger_opts)
.output()
.expect(&format!("failed to exec `{:?}`", gdb_path));
let cmdline = {
let mut gdb = Command::new(&format!("{}-gdb", self.config.target));
gdb.args(&debugger_opts);
gdb.args(debugger_opts);
let cmdline = self.make_cmdline(&gdb, "");
logv(self.config, format!("executing {}", cmdline));
cmdline
Expand Down Expand Up @@ -868,18 +868,18 @@ impl<'test> TestCx<'test> {
debug!("script_str = {}", script_str);
self.dump_output_file(&script_str, "debugger.script");

let debugger_script = self.make_out_name("debugger.script");
let mut debugger_script = OsString::from("-command=");
debugger_script.push(self.make_out_name("debugger.script"));

// FIXME (#9639): This needs to handle non-utf8 paths
let debugger_opts = vec![
"-quiet".to_owned(),
"-batch".to_owned(),
"-nx".to_owned(),
format!("-command={}", debugger_script.to_str().unwrap()),
let debugger_opts: &[&OsStr] = &[
"-quiet".as_ref(),
"-batch".as_ref(),
"-nx".as_ref(),
&debugger_script,
];

let mut gdb = Command::new(self.config.gdb.as_ref().unwrap());
gdb.args(&debugger_opts)
gdb.args(debugger_opts)
.env("PYTHONPATH", rust_pp_module_abs_path);

debugger_run_result = self.compose_and_run(
Expand Down

0 comments on commit 0e72c80

Please sign in to comment.