Skip to content

Commit

Permalink
Correct code to not run host-only tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-Simulacrum committed Aug 13, 2017
1 parent cec6816 commit 6571968
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 1 addition & 3 deletions src/bootstrap/builder.rs
Expand Up @@ -127,9 +127,7 @@ impl StepDescription {

// Determine the targets participating in this rule.
let targets = if self.only_hosts {
// If --target was specified but --host wasn't specified, don't run
// any host-only tests.
if build.config.hosts.is_empty() && !build.config.targets.is_empty() {
if build.config.run_host_only {
&[]
} else if self.only_build {
build.build_triple()
Expand Down
6 changes: 6 additions & 0 deletions src/bootstrap/config.rs
Expand Up @@ -56,6 +56,8 @@ pub struct Config {
pub profiler: bool,
pub ignore_git: bool,

pub run_host_only: bool,

pub on_fail: Option<String>,
pub stage: Option<u32>,
pub keep_stage: Option<u32>,
Expand Down Expand Up @@ -305,6 +307,9 @@ impl Config {
config.incremental = flags.incremental;
config.keep_stage = flags.keep_stage;

// If --target was specified but --host wasn't specified, don't run any host-only tests.
config.run_host_only = flags.host.is_empty() && !flags.target.is_empty();

let toml = file.map(|file| {
let mut f = t!(File::open(&file));
let mut contents = String::new();
Expand Down Expand Up @@ -351,6 +356,7 @@ impl Config {
config.targets
};


config.nodejs = build.nodejs.map(PathBuf::from);
config.gdb = build.gdb.map(PathBuf::from);
config.python = build.python.map(PathBuf::from);
Expand Down

0 comments on commit 6571968

Please sign in to comment.