update cc_detect tests
Signed-off-by: onur-ozkan <work@onurozkan.dev>
This commit is contained in:
parent
7669d50119
commit
a8f7fd1d26
1 changed files with 6 additions and 6 deletions
|
|
@ -181,7 +181,7 @@ fn test_language_clang() {
|
|||
|
||||
#[test]
|
||||
fn test_new_cc_build() {
|
||||
let build = Build::new(Config { ..Config::parse(Flags::parse(&["check".to_owned()])) });
|
||||
let build = Build::new(Config { ..Config::parse(Flags::parse(&["build".to_owned()])) });
|
||||
let target = TargetSelection::from_user("x86_64-unknown-linux-gnu");
|
||||
let cfg = new_cc_build(&build, target.clone());
|
||||
let compiler = cfg.get_compiler();
|
||||
|
|
@ -190,7 +190,7 @@ fn test_new_cc_build() {
|
|||
|
||||
#[test]
|
||||
fn test_default_compiler_wasi() {
|
||||
let build = Build::new(Config { ..Config::parse(Flags::parse(&["check".to_owned()])) });
|
||||
let build = Build::new(Config { ..Config::parse(Flags::parse(&["build".to_owned()])) });
|
||||
let target = TargetSelection::from_user("wasm32-wasi");
|
||||
let wasi_sdk = PathBuf::from("/wasi-sdk");
|
||||
// SAFETY: bootstrap tests run on a single thread
|
||||
|
|
@ -215,7 +215,7 @@ fn test_default_compiler_wasi() {
|
|||
|
||||
#[test]
|
||||
fn test_default_compiler_fallback() {
|
||||
let build = Build::new(Config { ..Config::parse(Flags::parse(&["check".to_owned()])) });
|
||||
let build = Build::new(Config { ..Config::parse(Flags::parse(&["build".to_owned()])) });
|
||||
let target = TargetSelection::from_user("x86_64-unknown-linux-gnu");
|
||||
let mut cfg = cc::Build::new();
|
||||
let result = default_compiler(&mut cfg, Language::C, target, &build);
|
||||
|
|
@ -224,7 +224,7 @@ fn test_default_compiler_fallback() {
|
|||
|
||||
#[test]
|
||||
fn test_find_target_with_config() {
|
||||
let mut build = Build::new(Config { ..Config::parse(Flags::parse(&["check".to_owned()])) });
|
||||
let mut build = Build::new(Config { ..Config::parse(Flags::parse(&["build".to_owned()])) });
|
||||
let target = TargetSelection::from_user("x86_64-unknown-linux-gnu");
|
||||
let mut target_config = Target::default();
|
||||
target_config.cc = Some(PathBuf::from("dummy-cc"));
|
||||
|
|
@ -249,7 +249,7 @@ fn test_find_target_with_config() {
|
|||
|
||||
#[test]
|
||||
fn test_find_target_without_config() {
|
||||
let mut build = Build::new(Config { ..Config::parse(Flags::parse(&["check".to_owned()])) });
|
||||
let mut build = Build::new(Config { ..Config::parse(Flags::parse(&["build".to_owned()])) });
|
||||
let target = TargetSelection::from_user("x86_64-unknown-linux-gnu");
|
||||
build.config.target_config.clear();
|
||||
find_target(&build, target.clone());
|
||||
|
|
@ -262,7 +262,7 @@ fn test_find_target_without_config() {
|
|||
|
||||
#[test]
|
||||
fn test_find() {
|
||||
let mut build = Build::new(Config { ..Config::parse(Flags::parse(&["check".to_owned()])) });
|
||||
let mut build = Build::new(Config { ..Config::parse(Flags::parse(&["build".to_owned()])) });
|
||||
let target1 = TargetSelection::from_user("x86_64-unknown-linux-gnu");
|
||||
let target2 = TargetSelection::from_user("x86_64-unknown-openbsd");
|
||||
build.targets.push(target1.clone());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue