Skip to content

Commit 5775947

Browse files
committed
chore: update path tests to use check
1 parent 730e219 commit 5775947

File tree

1 file changed

+39
-39
lines changed

1 file changed

+39
-39
lines changed

tests/testsuite/path.rs

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ fn cargo_compile_with_root_dev_deps() {
139139
)
140140
.build();
141141

142-
p.cargo("build")
142+
p.cargo("check")
143143
.with_status(101)
144144
.with_stderr_contains("[..]can't find crate for `bar`")
145145
.run();
@@ -275,10 +275,10 @@ fn no_rebuild_dependency() {
275275
.file("bar/src/bar.rs", "pub fn bar() {}")
276276
.build();
277277
// First time around we should compile both foo and bar
278-
p.cargo("build")
278+
p.cargo("check")
279279
.with_stderr(
280-
"[COMPILING] bar v0.5.0 ([CWD]/bar)\n\
281-
[COMPILING] foo v0.5.0 ([CWD])\n\
280+
"[CHECKING] bar v0.5.0 ([CWD]/bar)\n\
281+
[CHECKING] foo v0.5.0 ([CWD])\n\
282282
[FINISHED] dev [unoptimized + debuginfo] target(s) \
283283
in [..]\n",
284284
)
@@ -293,9 +293,9 @@ fn no_rebuild_dependency() {
293293
"#,
294294
);
295295
// Don't compile bar, but do recompile foo.
296-
p.cargo("build")
296+
p.cargo("check")
297297
.with_stderr(
298-
"[COMPILING] foo v0.5.0 ([..])\n\
298+
"[CHECKING] foo v0.5.0 ([..])\n\
299299
[FINISHED] dev [unoptimized + debuginfo] target(s) \
300300
in [..]\n",
301301
)
@@ -341,16 +341,16 @@ fn deep_dependencies_trigger_rebuild() {
341341
.file("baz/Cargo.toml", &basic_lib_manifest("baz"))
342342
.file("baz/src/baz.rs", "pub fn baz() {}")
343343
.build();
344-
p.cargo("build")
344+
p.cargo("check")
345345
.with_stderr(
346-
"[COMPILING] baz v0.5.0 ([CWD]/baz)\n\
347-
[COMPILING] bar v0.5.0 ([CWD]/bar)\n\
348-
[COMPILING] foo v0.5.0 ([CWD])\n\
346+
"[CHECKING] baz v0.5.0 ([CWD]/baz)\n\
347+
[CHECKING] bar v0.5.0 ([CWD]/bar)\n\
348+
[CHECKING] foo v0.5.0 ([CWD])\n\
349349
[FINISHED] dev [unoptimized + debuginfo] target(s) \
350350
in [..]\n",
351351
)
352352
.run();
353-
p.cargo("build").with_stdout("").run();
353+
p.cargo("check").with_stdout("").run();
354354

355355
// Make sure an update to baz triggers a rebuild of bar
356356
//
@@ -359,11 +359,11 @@ fn deep_dependencies_trigger_rebuild() {
359359
sleep_ms(1000);
360360
p.change_file("baz/src/baz.rs", r#"pub fn baz() { println!("hello!"); }"#);
361361
sleep_ms(1000);
362-
p.cargo("build")
362+
p.cargo("check")
363363
.with_stderr(
364-
"[COMPILING] baz v0.5.0 ([CWD]/baz)\n\
365-
[COMPILING] bar v0.5.0 ([CWD]/bar)\n\
366-
[COMPILING] foo v0.5.0 ([CWD])\n\
364+
"[CHECKING] baz v0.5.0 ([CWD]/baz)\n\
365+
[CHECKING] bar v0.5.0 ([CWD]/bar)\n\
366+
[CHECKING] foo v0.5.0 ([CWD])\n\
367367
[FINISHED] dev [unoptimized + debuginfo] target(s) \
368368
in [..]\n",
369369
)
@@ -379,10 +379,10 @@ fn deep_dependencies_trigger_rebuild() {
379379
"#,
380380
);
381381
sleep_ms(1000);
382-
p.cargo("build")
382+
p.cargo("check")
383383
.with_stderr(
384-
"[COMPILING] bar v0.5.0 ([CWD]/bar)\n\
385-
[COMPILING] foo v0.5.0 ([CWD])\n\
384+
"[CHECKING] bar v0.5.0 ([CWD]/bar)\n\
385+
[CHECKING] foo v0.5.0 ([CWD])\n\
386386
[FINISHED] dev [unoptimized + debuginfo] target(s) \
387387
in [..]\n",
388388
)
@@ -464,10 +464,10 @@ fn nested_deps_recompile() {
464464
.file("src/bar/src/bar.rs", "pub fn gimme() -> i32 { 92 }")
465465
.build();
466466

467-
p.cargo("build")
467+
p.cargo("check")
468468
.with_stderr(
469-
"[COMPILING] bar v0.5.0 ([CWD]/src/bar)\n\
470-
[COMPILING] foo v0.5.0 ([CWD])\n\
469+
"[CHECKING] bar v0.5.0 ([CWD]/src/bar)\n\
470+
[CHECKING] foo v0.5.0 ([CWD])\n\
471471
[FINISHED] dev [unoptimized + debuginfo] target(s) \
472472
in [..]\n",
473473
)
@@ -477,9 +477,9 @@ fn nested_deps_recompile() {
477477
p.change_file("src/main.rs", r#"fn main() {}"#);
478478

479479
// This shouldn't recompile `bar`
480-
p.cargo("build")
480+
p.cargo("check")
481481
.with_stderr(
482-
"[COMPILING] foo v0.5.0 ([CWD])\n\
482+
"[CHECKING] foo v0.5.0 ([CWD])\n\
483483
[FINISHED] dev [unoptimized + debuginfo] target(s) \
484484
in [..]\n",
485485
)
@@ -507,7 +507,7 @@ fn error_message_for_missing_manifest() {
507507
.file("src/bar/not-a-manifest", "")
508508
.build();
509509

510-
p.cargo("build")
510+
p.cargo("check")
511511
.with_status(101)
512512
.with_stderr(
513513
"\
@@ -559,7 +559,7 @@ fn override_relative() {
559559
)
560560
.file("src/lib.rs", "")
561561
.build();
562-
p.cargo("build -v").run();
562+
p.cargo("check -v").run();
563563
}
564564

565565
#[cargo_test]
@@ -595,7 +595,7 @@ fn override_self() {
595595
.file("src/main.rs", "fn main() {}")
596596
.build();
597597

598-
p.cargo("build").run();
598+
p.cargo("check").run();
599599
}
600600

601601
#[cargo_test]
@@ -648,7 +648,7 @@ fn override_path_dep() {
648648
.file("src/lib.rs", "")
649649
.build();
650650

651-
p.cargo("build -v").run();
651+
p.cargo("check -v").run();
652652
}
653653

654654
#[cargo_test]
@@ -808,11 +808,11 @@ fn custom_target_no_rebuild() {
808808
)
809809
.file("b/src/lib.rs", "")
810810
.build();
811-
p.cargo("build")
811+
p.cargo("check")
812812
.with_stderr(
813813
"\
814-
[COMPILING] a v0.5.0 ([..])
815-
[COMPILING] foo v0.5.0 ([..])
814+
[CHECKING] a v0.5.0 ([..])
815+
[CHECKING] foo v0.5.0 ([..])
816816
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
817817
",
818818
)
@@ -822,11 +822,11 @@ fn custom_target_no_rebuild() {
822822
p.root().join("target"),
823823
p.root().join("target_moved")
824824
));
825-
p.cargo("build --manifest-path=b/Cargo.toml")
825+
p.cargo("check --manifest-path=b/Cargo.toml")
826826
.env("CARGO_TARGET_DIR", "target_moved")
827827
.with_stderr(
828828
"\
829-
[COMPILING] b v0.5.0 ([..])
829+
[CHECKING] b v0.5.0 ([..])
830830
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
831831
",
832832
)
@@ -866,14 +866,14 @@ fn override_and_depend() {
866866
.file("b/src/lib.rs", "")
867867
.file("b/.cargo/config", r#"paths = ["../a"]"#)
868868
.build();
869-
p.cargo("build")
869+
p.cargo("check")
870870
.cwd("b")
871871
.with_stderr(
872872
"\
873873
[WARNING] skipping duplicate package `a2` found at `[..]`
874-
[COMPILING] a2 v0.5.0 ([..])
875-
[COMPILING] a1 v0.5.0 ([..])
876-
[COMPILING] b v0.5.0 ([..])
874+
[CHECKING] a2 v0.5.0 ([..])
875+
[CHECKING] a1 v0.5.0 ([..])
876+
[CHECKING] b v0.5.0 ([..])
877877
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
878878
",
879879
)
@@ -890,7 +890,7 @@ fn missing_path_dependency() {
890890
r#"paths = ["../whoa-this-does-not-exist"]"#,
891891
)
892892
.build();
893-
p.cargo("build")
893+
p.cargo("check")
894894
.with_status(101)
895895
.with_stderr(
896896
"\
@@ -943,7 +943,7 @@ fn invalid_path_dep_in_workspace_with_lockfile() {
943943
.build();
944944

945945
// Generate a lock file
946-
p.cargo("build").run();
946+
p.cargo("check").run();
947947

948948
// Change the dependency on `bar` to an invalid path
949949
p.change_file(
@@ -961,7 +961,7 @@ fn invalid_path_dep_in_workspace_with_lockfile() {
961961

962962
// Make sure we get a nice error. In the past this actually stack
963963
// overflowed!
964-
p.cargo("build")
964+
p.cargo("check")
965965
.with_status(101)
966966
.with_stderr(
967967
"\

0 commit comments

Comments
 (0)