Skip to content

Commit a8f7fd1

Browse files
committed
update cc_detect tests
Signed-off-by: onur-ozkan <work@onurozkan.dev>
1 parent 7669d50 commit a8f7fd1

File tree

1 file changed

+6
-6
lines changed
  • src/bootstrap/src/utils/cc_detect

1 file changed

+6
-6
lines changed

src/bootstrap/src/utils/cc_detect/tests.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ fn test_language_clang() {
181181

182182
#[test]
183183
fn test_new_cc_build() {
184-
let build = Build::new(Config { ..Config::parse(Flags::parse(&["check".to_owned()])) });
184+
let build = Build::new(Config { ..Config::parse(Flags::parse(&["build".to_owned()])) });
185185
let target = TargetSelection::from_user("x86_64-unknown-linux-gnu");
186186
let cfg = new_cc_build(&build, target.clone());
187187
let compiler = cfg.get_compiler();
@@ -190,7 +190,7 @@ fn test_new_cc_build() {
190190

191191
#[test]
192192
fn test_default_compiler_wasi() {
193-
let build = Build::new(Config { ..Config::parse(Flags::parse(&["check".to_owned()])) });
193+
let build = Build::new(Config { ..Config::parse(Flags::parse(&["build".to_owned()])) });
194194
let target = TargetSelection::from_user("wasm32-wasi");
195195
let wasi_sdk = PathBuf::from("/wasi-sdk");
196196
// SAFETY: bootstrap tests run on a single thread
@@ -215,7 +215,7 @@ fn test_default_compiler_wasi() {
215215

216216
#[test]
217217
fn test_default_compiler_fallback() {
218-
let build = Build::new(Config { ..Config::parse(Flags::parse(&["check".to_owned()])) });
218+
let build = Build::new(Config { ..Config::parse(Flags::parse(&["build".to_owned()])) });
219219
let target = TargetSelection::from_user("x86_64-unknown-linux-gnu");
220220
let mut cfg = cc::Build::new();
221221
let result = default_compiler(&mut cfg, Language::C, target, &build);
@@ -224,7 +224,7 @@ fn test_default_compiler_fallback() {
224224

225225
#[test]
226226
fn test_find_target_with_config() {
227-
let mut build = Build::new(Config { ..Config::parse(Flags::parse(&["check".to_owned()])) });
227+
let mut build = Build::new(Config { ..Config::parse(Flags::parse(&["build".to_owned()])) });
228228
let target = TargetSelection::from_user("x86_64-unknown-linux-gnu");
229229
let mut target_config = Target::default();
230230
target_config.cc = Some(PathBuf::from("dummy-cc"));
@@ -249,7 +249,7 @@ fn test_find_target_with_config() {
249249

250250
#[test]
251251
fn test_find_target_without_config() {
252-
let mut build = Build::new(Config { ..Config::parse(Flags::parse(&["check".to_owned()])) });
252+
let mut build = Build::new(Config { ..Config::parse(Flags::parse(&["build".to_owned()])) });
253253
let target = TargetSelection::from_user("x86_64-unknown-linux-gnu");
254254
build.config.target_config.clear();
255255
find_target(&build, target.clone());
@@ -262,7 +262,7 @@ fn test_find_target_without_config() {
262262

263263
#[test]
264264
fn test_find() {
265-
let mut build = Build::new(Config { ..Config::parse(Flags::parse(&["check".to_owned()])) });
265+
let mut build = Build::new(Config { ..Config::parse(Flags::parse(&["build".to_owned()])) });
266266
let target1 = TargetSelection::from_user("x86_64-unknown-linux-gnu");
267267
let target2 = TargetSelection::from_user("x86_64-unknown-openbsd");
268268
build.targets.push(target1.clone());

0 commit comments

Comments
 (0)