-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pass features to native build commands
- Loading branch information
1 parent
f5f34e8
commit 27e0224
Showing
3 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -745,6 +745,9 @@ test!(custom_build_env_vars { | |
version = "0.5.0" | ||
authors = ["[email protected]"] | ||
[features] | ||
foo = [] | ||
[[bin]] | ||
name = "foo" | ||
"#) | ||
|
@@ -753,6 +756,7 @@ test!(custom_build_env_vars { | |
use std::io::fs::PathExtensions; | ||
fn main() {{ | ||
let _ncpus = os::getenv("NUM_JOBS").unwrap(); | ||
let _feat = os::getenv("CARGO_FEATURE_FOO").unwrap(); | ||
let debug = os::getenv("DEBUG").unwrap(); | ||
assert_eq!(debug.as_slice(), "true"); | ||
|
@@ -777,7 +781,8 @@ test!(custom_build_env_vars { | |
}} | ||
"#, | ||
p.root().join("target").join("native").display())); | ||
assert_that(build.cargo_process("build"), execs().with_status(0)); | ||
assert_that(build.cargo_process("build").arg("--features").arg("foo"), | ||
execs().with_status(0)); | ||
|
||
|
||
p = p | ||
|
@@ -789,6 +794,9 @@ test!(custom_build_env_vars { | |
authors = ["[email protected]"] | ||
build = '{}' | ||
[features] | ||
foo = [] | ||
[[bin]] | ||
name = "foo" | ||
|
@@ -798,7 +806,8 @@ test!(custom_build_env_vars { | |
.file("src/foo.rs", r#" | ||
fn main() {} | ||
"#); | ||
assert_that(p.cargo_process("build"), execs().with_status(0)); | ||
assert_that(p.cargo_process("build").arg("--features").arg("foo"), | ||
execs().with_status(0)); | ||
}) | ||
|
||
test!(crate_version_env_vars { | ||
|
27e0224
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from brson
at alexcrichton@27e0224
27e0224
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging alexcrichton/cargo/issue-633 = 27e0224 into auto-cargo
27e0224
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alexcrichton/cargo/issue-633 = 27e0224 merged ok, testing candidate = 5ad6c86f
27e0224
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some tests failed:
failure: http://buildbot.rust-lang.org/builders/cargo-mac-32/builds/536
failure: http://buildbot.rust-lang.org/builders/cargo-mac-64/builds/535
27e0224
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from brson
at alexcrichton@27e0224
27e0224
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging alexcrichton/cargo/issue-633 = 27e0224 into auto-cargo
27e0224
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alexcrichton/cargo/issue-633 = 27e0224 merged ok, testing candidate = 3743eb8
27e0224
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all tests pass:
success: http://buildbot.rust-lang.org/builders/cargo-win-32/builds/408
success: http://buildbot.rust-lang.org/builders/cargo-win-64/builds/56
success: http://buildbot.rust-lang.org/builders/cargo-linux-32/builds/541
success: http://buildbot.rust-lang.org/builders/cargo-linux-64/builds/534
success: http://buildbot.rust-lang.org/builders/cargo-mac-32/builds/538
success: http://buildbot.rust-lang.org/builders/cargo-mac-64/builds/537
27e0224
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fast-forwarding master to auto-cargo = 3743eb8