Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch some tests from build to check #11725

Merged
merged 50 commits into from
Feb 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
1873c33
chore: update `alt_registry` test to use check
Muscraft Feb 3, 2023
9174c22
chore: update `build_config` test to use check
Muscraft Feb 3, 2023
7fcb542
chore: update `bad_manifest_path` test to use check
Muscraft Feb 3, 2023
e9838a5
chore: update `build_script_env` test to use check
Muscraft Feb 15, 2023
e2a6ed7
chore: update `cache_messages` test to use check
Muscraft Feb 15, 2023
9c6a044
chore: update `cargo_env_config` test to use check
Muscraft Feb 15, 2023
c10a4c6
chore: update `cargo_features` tests to use check
Muscraft Feb 15, 2023
3845fc9
chore: update `cfg` tests to use check
Muscraft Feb 15, 2023
d89e73c
chore: update `check_cfg` tests to use check
Muscraft Feb 15, 2023
8507c17
chore: update `config` tests to use check
Muscraft Feb 15, 2023
6d429b0
chore: update `config_include` tests to use check
Muscraft Feb 15, 2023
7dd17a4
chore: update `corrupt_git` tests to use check
Muscraft Feb 15, 2023
5ec0ad2
chore: update `death` tests to use check
Muscraft Feb 15, 2023
88e4714
chore: update `dep_info` tests to use check
Muscraft Feb 15, 2023
76bb60c
chore: update `directory` tests to use check
Muscraft Feb 15, 2023
620dfb1
chore: update `doc` tests to use check
Muscraft Feb 15, 2023
ea75921
chore: update `edition` tests to use check
Muscraft Feb 15, 2023
a5ec7e0
chore: update `features` tests to use check
Muscraft Feb 15, 2023
da70f75
chore: update `features2` tests to use check
Muscraft Feb 15, 2023
a03660d
chore: update `features_namespaced` tests to use check
Muscraft Feb 15, 2023
9c14193
chore: update `fix` tests to use check
Muscraft Feb 15, 2023
4934dff
chore: update `future_incompat_report` tests to use check
Muscraft Feb 15, 2023
29cd1ce
chore: update `git` tests to use check
Muscraft Feb 15, 2023
cb20cba
chore: update `git_auth` tests to use check
Muscraft Feb 15, 2023
e8f9ccf
chore: update `git_gc` tests to use check
Muscraft Feb 15, 2023
df909b9
chore: update `inheritable_workspace_fields` tests to use check
Muscraft Feb 15, 2023
9d85c01
chore: update `jobserver` tests to use check
Muscraft Feb 16, 2023
de704f5
chore: update `local_registry` tests to use check
Muscraft Feb 16, 2023
9a46caf
chore: update `lockfile_compat` tests to use check
Muscraft Feb 16, 2023
8f4f77e
chore: update `message_format` tests to use check
Muscraft Feb 16, 2023
1dd8536
chore: update `metabuild` tests to use check
Muscraft Feb 16, 2023
fb755a3
chore: update `net_config` tests to use check
Muscraft Feb 16, 2023
e3d3bb6
chore: update `offline` tests to use check
Muscraft Feb 16, 2023
de2e974
chore: update `package` tests to use check
Muscraft Feb 16, 2023
7b14e72
chore: update `package_features` tests to use check
Muscraft Feb 16, 2023
730e219
chore: update `patch` tests to use check
Muscraft Feb 16, 2023
5775947
chore: update `path` tests to use check
Muscraft Feb 16, 2023
341c400
chore: update `paths` tests to use check
Muscraft Feb 16, 2023
a726b8d
chore: update `proc_macro` tests to use check
Muscraft Feb 16, 2023
8d66a02
chore: update `profile_overrides` tests to use check
Muscraft Feb 16, 2023
41738be
chore: update `progress` tests to use check
Muscraft Feb 16, 2023
1b9af48
chore: update `pub_priv` tests to use check
Muscraft Feb 16, 2023
98c7466
chore: update `registry` tests to use check
Muscraft Feb 16, 2023
ab1794b
chore: update `registry_auth` tests to use check
Muscraft Feb 16, 2023
6282282
chore: update `replace` tests to use check
Muscraft Feb 16, 2023
43f9b8e
chore: update `rust_version` tests to use check
Muscraft Feb 16, 2023
866daf4
chore: update `rustflags` tests to use check
Muscraft Feb 16, 2023
b974cac
chore: update `update` tests to use check
Muscraft Feb 16, 2023
221938a
chore: update `vendor` tests to use check
Muscraft Feb 16, 2023
45c9c8e
chore: update `workspaces` tests to use check
Muscraft Feb 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 37 additions & 37 deletions tests/testsuite/alt_registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ fn depend_on_alt_registry() {

Package::new("bar", "0.0.1").alternative(true).publish();

p.cargo("build")
p.cargo("check")
.with_stderr(
"\
[UPDATING] `alternative` index
[DOWNLOADING] crates ...
[DOWNLOADED] bar v0.0.1 (registry `alternative`)
[COMPILING] bar v0.0.1 (registry `alternative`)
[COMPILING] foo v0.0.1 ([CWD])
[CHECKING] bar v0.0.1 (registry `alternative`)
[CHECKING] foo v0.0.1 ([CWD])
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]s
",
)
Expand All @@ -44,11 +44,11 @@ fn depend_on_alt_registry() {
p.cargo("clean").run();

// Don't download a second time
p.cargo("build")
p.cargo("check")
.with_stderr(
"\
[COMPILING] bar v0.0.1 (registry `alternative`)
[COMPILING] foo v0.0.1 ([CWD])
[CHECKING] bar v0.0.1 (registry `alternative`)
[CHECKING] foo v0.0.1 ([CWD])
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]s
",
)
Expand Down Expand Up @@ -81,16 +81,16 @@ fn depend_on_alt_registry_depends_on_same_registry_no_index() {
.alternative(true)
.publish();

p.cargo("build")
p.cargo("check")
.with_stderr(
"\
[UPDATING] `alternative` index
[DOWNLOADING] crates ...
[DOWNLOADED] [..] v0.0.1 (registry `alternative`)
[DOWNLOADED] [..] v0.0.1 (registry `alternative`)
[COMPILING] baz v0.0.1 (registry `alternative`)
[COMPILING] bar v0.0.1 (registry `alternative`)
[COMPILING] foo v0.0.1 ([CWD])
[CHECKING] baz v0.0.1 (registry `alternative`)
[CHECKING] bar v0.0.1 (registry `alternative`)
[CHECKING] foo v0.0.1 ([CWD])
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]s
",
)
Expand Down Expand Up @@ -123,16 +123,16 @@ fn depend_on_alt_registry_depends_on_same_registry() {
.alternative(true)
.publish();

p.cargo("build")
p.cargo("check")
.with_stderr(
"\
[UPDATING] `alternative` index
[DOWNLOADING] crates ...
[DOWNLOADED] [..] v0.0.1 (registry `alternative`)
[DOWNLOADED] [..] v0.0.1 (registry `alternative`)
[COMPILING] baz v0.0.1 (registry `alternative`)
[COMPILING] bar v0.0.1 (registry `alternative`)
[COMPILING] foo v0.0.1 ([CWD])
[CHECKING] baz v0.0.1 (registry `alternative`)
[CHECKING] bar v0.0.1 (registry `alternative`)
[CHECKING] foo v0.0.1 ([CWD])
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]s
",
)
Expand Down Expand Up @@ -165,17 +165,17 @@ fn depend_on_alt_registry_depends_on_crates_io() {
.alternative(true)
.publish();

p.cargo("build")
p.cargo("check")
.with_stderr_unordered(
"\
[UPDATING] `alternative` index
[UPDATING] `dummy-registry` index
[DOWNLOADING] crates ...
[DOWNLOADED] baz v0.0.1 (registry `dummy-registry`)
[DOWNLOADED] bar v0.0.1 (registry `alternative`)
[COMPILING] baz v0.0.1
[COMPILING] bar v0.0.1 (registry `alternative`)
[COMPILING] foo v0.0.1 ([CWD])
[CHECKING] baz v0.0.1
[CHECKING] bar v0.0.1 (registry `alternative`)
[CHECKING] foo v0.0.1 ([CWD])
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]s
",
)
Expand Down Expand Up @@ -205,11 +205,11 @@ fn registry_and_path_dep_works() {
.file("bar/src/lib.rs", "")
.build();

p.cargo("build")
p.cargo("check")
.with_stderr(
"\
[COMPILING] bar v0.0.1 ([CWD]/bar)
[COMPILING] foo v0.0.1 ([CWD])
[CHECKING] bar v0.0.1 ([CWD]/bar)
[CHECKING] foo v0.0.1 ([CWD])
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]s
",
)
Expand Down Expand Up @@ -237,7 +237,7 @@ fn registry_incompatible_with_git() {
.file("src/main.rs", "fn main() {}")
.build();

p.cargo("build")
p.cargo("check")
.with_status(101)
.with_stderr_contains(
" dependency (bar) specification is ambiguous. \
Expand Down Expand Up @@ -377,17 +377,17 @@ fn alt_registry_and_crates_io_deps() {
.alternative(true)
.publish();

p.cargo("build")
p.cargo("check")
.with_stderr_unordered(
"\
[UPDATING] `alternative` index
[UPDATING] `dummy-registry` index
[DOWNLOADING] crates ...
[DOWNLOADED] crates_io_dep v0.0.1 (registry `dummy-registry`)
[DOWNLOADED] alt_reg_dep v0.1.0 (registry `alternative`)
[COMPILING] alt_reg_dep v0.1.0 (registry `alternative`)
[COMPILING] crates_io_dep v0.0.1
[COMPILING] foo v0.0.1 ([CWD])
[CHECKING] alt_reg_dep v0.1.0 (registry `alternative`)
[CHECKING] crates_io_dep v0.0.1
[CHECKING] foo v0.0.1 ([CWD])
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]s
",
)
Expand Down Expand Up @@ -580,12 +580,12 @@ fn patch_alt_reg() {
.file("bar/src/lib.rs", "pub fn bar() {}")
.build();

p.cargo("build")
p.cargo("check")
.with_stderr(
"\
[UPDATING] `alternative` index
[COMPILING] bar v0.1.0 ([CWD]/bar)
[COMPILING] foo v0.0.1 ([CWD])
[CHECKING] bar v0.1.0 ([CWD]/bar)
[CHECKING] foo v0.0.1 ([CWD])
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
",
)
Expand Down Expand Up @@ -662,14 +662,14 @@ fn no_api() {
.file("src/lib.rs", "")
.build();

p.cargo("build")
p.cargo("check")
.with_stderr(
"\
[UPDATING] `alternative` index
[DOWNLOADING] crates ...
[DOWNLOADED] bar v0.0.1 (registry `alternative`)
[COMPILING] bar v0.0.1 (registry `alternative`)
[COMPILING] foo v0.0.1 ([CWD])
[CHECKING] bar v0.0.1 (registry `alternative`)
[CHECKING] foo v0.0.1 ([CWD])
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]s
",
)
Expand Down Expand Up @@ -1050,7 +1050,7 @@ fn unknown_registry() {
config.insert(start + start_index, '#');
fs::write(&cfg_path, config).unwrap();

p.cargo("build").run();
p.cargo("check").run();

// Important parts:
// foo -> bar registry = null
Expand Down Expand Up @@ -1212,14 +1212,14 @@ fn registries_index_relative_url() {

Package::new("bar", "0.0.1").alternative(true).publish();

p.cargo("build")
p.cargo("check")
.with_stderr(
"\
[UPDATING] `relative` index
[DOWNLOADING] crates ...
[DOWNLOADED] bar v0.0.1 (registry `relative`)
[COMPILING] bar v0.0.1 (registry `relative`)
[COMPILING] foo v0.0.1 ([CWD])
[CHECKING] bar v0.0.1 (registry `relative`)
[CHECKING] foo v0.0.1 ([CWD])
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]s
",
)
Expand Down Expand Up @@ -1259,7 +1259,7 @@ fn registries_index_relative_path_not_allowed() {

Package::new("bar", "0.0.1").alternative(true).publish();

p.cargo("build")
p.cargo("check")
.with_stderr(&format!(
"\
error: failed to parse manifest at `{root}/foo/Cargo.toml`
Expand Down
Loading