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

Rename --all to --workspace #7241

Merged
merged 2 commits into from
Sep 4, 2019
Merged
Changes from 1 commit
Commits
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
6 changes: 3 additions & 3 deletions src/bin/cargo/commands/bench.rs
Original file line number Diff line number Diff line change
@@ -59,9 +59,9 @@ which indicates which package should be benchmarked. If it is not given, then
the current package is benchmarked. For more information on SPEC and its format,
see the `cargo help pkgid` command.
All packages in the workspace are benchmarked if the `--all` flag is supplied. The
`--all` flag is automatically assumed for a virtual manifest.
Note that `--exclude` has to be specified in conjunction with the `--all` flag.
All packages in the workspace are benchmarked if the `--workspace` flag is supplied. The
`--workspace` flag is automatically assumed for a virtual manifest.
Note that `--exclude` has to be specified in conjunction with the `--workspace` flag.
The `--jobs` argument affects the building of the benchmark executable but does
not affect how many jobs are used when running the benchmarks.
6 changes: 3 additions & 3 deletions src/bin/cargo/commands/build.rs
Original file line number Diff line number Diff line change
@@ -42,9 +42,9 @@ pub fn cli() -> App {
.arg_build_plan()
.after_help(
"\
All packages in the workspace are built if the `--all` flag is supplied. The
`--all` flag is automatically assumed for a virtual manifest.
Note that `--exclude` has to be specified in conjunction with the `--all` flag.
All packages in the workspace are built if the `--workspace` flag is supplied. The
`--workspace` flag is automatically assumed for a virtual manifest.
Note that `--exclude` has to be specified in conjunction with the `--workspace` flag.
Compilation can be configured via the use of profiles which are configured in
the manifest. The default profile for this command is `dev`, but passing
6 changes: 3 additions & 3 deletions src/bin/cargo/commands/check.rs
Original file line number Diff line number Diff line change
@@ -40,9 +40,9 @@ which indicates which package should be built. If it is not given, then the
current package is built. For more information on SPEC and its format, see the
`cargo help pkgid` command.
All packages in the workspace are checked if the `--all` flag is supplied. The
`--all` flag is automatically assumed for a virtual manifest.
Note that `--exclude` has to be specified in conjunction with the `--all` flag.
All packages in the workspace are checked if the `--workspace` flag is supplied. The
`--workspace` flag is automatically assumed for a virtual manifest.
Note that `--exclude` has to be specified in conjunction with the `--workspace` flag.
Compilation can be configured via the use of profiles which are configured in
the manifest. The default profile for this command is `dev`, but passing
6 changes: 3 additions & 3 deletions src/bin/cargo/commands/clippy.rs
Original file line number Diff line number Diff line change
@@ -38,9 +38,9 @@ which indicates which package should be built. If it is not given, then the
current package is built. For more information on SPEC and its format, see the
`cargo help pkgid` command.
All packages in the workspace are checked if the `--all` flag is supplied. The
`--all` flag is automatically assumed for a virtual manifest.
Note that `--exclude` has to be specified in conjunction with the `--all` flag.
All packages in the workspace are checked if the `--workspace` flag is supplied. The
`--workspace` flag is automatically assumed for a virtual manifest.
Note that `--exclude` has to be specified in conjunction with the `--workspace` flag.
To allow or deny a lint from the command line you can use `cargo clippy --`
with:
6 changes: 3 additions & 3 deletions src/bin/cargo/commands/test.rs
Original file line number Diff line number Diff line change
@@ -69,9 +69,9 @@ which indicates which package should be tested. If it is not given, then the
current package is tested. For more information on SPEC and its format, see the
`cargo help pkgid` command.
All packages in the workspace are tested if the `--all` flag is supplied. The
`--all` flag is automatically assumed for a virtual manifest.
Note that `--exclude` has to be specified in conjunction with the `--all` flag.
All packages in the workspace are tested if the `--workspace` flag is supplied. The
`--workspace` flag is automatically assumed for a virtual manifest.
Note that `--exclude` has to be specified in conjunction with the `--workspace` flag.
The `--jobs` argument affects the building of the test executable but does
not affect how many jobs are used when running the tests. The default value
9 changes: 7 additions & 2 deletions src/cargo/util/command_prelude.rs
Original file line number Diff line number Diff line change
@@ -31,7 +31,11 @@ pub trait AppExt: Sized {
exclude: &'static str,
) -> Self {
self.arg_package_spec_simple(package)
._arg(opt("all", all))
._arg(opt(
"all",
"Will be changed to 'workspace' option (deprecated)",
))
._arg(opt("workspace", all))
._arg(multi_opt("exclude", "SPEC", exclude))
}

@@ -290,7 +294,8 @@ pub trait ArgMatchesExt {
workspace: Option<&Workspace<'a>>,
) -> CargoResult<CompileOptions<'a>> {
let spec = Packages::from_flags(
self._is_present("all"),
// TODO Integrate into 'workspace'
self._is_present("workspace") || self._is_present("all"),
self._values_of("exclude"),
self._values_of("package"),
)?;
8 changes: 4 additions & 4 deletions src/doc/man/generated/cargo-bench.html
Original file line number Diff line number Diff line change
@@ -78,7 +78,7 @@ <h3 id="cargo_bench_package_selection">Package Selection</h3>
<p>The default members of a workspace can be set explicitly with the
<code>workspace.default-members</code> key in the root manifest. If this is not set, a
virtual workspace will include all workspace members (equivalent to passing
<code>--all</code>), and a non-virtual workspace will include only the root crate itself.</p>
<code>--workspace</code>), and a non-virtual workspace will include only the root crate itself.</p>
</div>
<div class="dlist">
<dl>
@@ -88,14 +88,14 @@ <h3 id="cargo_bench_package_selection">Package Selection</h3>
<p>Benchmark only the specified packages. See <a href="cargo-pkgid.html">cargo-pkgid(1)</a> for the
SPEC format. This flag may be specified multiple times.</p>
</dd>
<dt class="hdlist1"><strong>--all</strong></dt>
<dt class="hdlist1"><strong>--workspace</strong></dt>
<dd>
<p>Benchmark all members in the workspace.</p>
</dd>
<dt class="hdlist1"><strong>--exclude</strong> <em>SPEC</em>&#8230;&#8203;</dt>
<dd>
<p>Exclude the specified packages. Must be used in conjunction with the
<code>--all</code> flag. This flag may be specified multiple times.</p>
<code>--workspace</code> flag. This flag may be specified multiple times.</p>
</dd>
</dl>
</div>
@@ -501,4 +501,4 @@ <h2 id="cargo_bench_see_also">SEE ALSO</h2>
<p><a href="index.html">cargo(1)</a>, <a href="cargo-test.html">cargo-test(1)</a></p>
</div>
</div>
</div>
</div>
8 changes: 4 additions & 4 deletions src/doc/man/generated/cargo-build.html
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ <h3 id="cargo_build_package_selection">Package Selection</h3>
<p>The default members of a workspace can be set explicitly with the
<code>workspace.default-members</code> key in the root manifest. If this is not set, a
virtual workspace will include all workspace members (equivalent to passing
<code>--all</code>), and a non-virtual workspace will include only the root crate itself.</p>
<code>--workspace</code>), and a non-virtual workspace will include only the root crate itself.</p>
</div>
<div class="dlist">
<dl>
@@ -44,14 +44,14 @@ <h3 id="cargo_build_package_selection">Package Selection</h3>
<p>Build only the specified packages. See <a href="cargo-pkgid.html">cargo-pkgid(1)</a> for the
SPEC format. This flag may be specified multiple times.</p>
</dd>
<dt class="hdlist1"><strong>--all</strong></dt>
<dt class="hdlist1"><strong>--workspace</strong></dt>
<dd>
<p>Build all members in the workspace.</p>
</dd>
<dt class="hdlist1"><strong>--exclude</strong> <em>SPEC</em>&#8230;&#8203;</dt>
<dd>
<p>Exclude the specified packages. Must be used in conjunction with the
<code>--all</code> flag. This flag may be specified multiple times.</p>
<code>--workspace</code> flag. This flag may be specified multiple times.</p>
</dd>
</dl>
</div>
@@ -464,4 +464,4 @@ <h2 id="cargo_build_see_also">SEE ALSO</h2>
<p><a href="index.html">cargo(1)</a>, <a href="cargo-rustc.html">cargo-rustc(1)</a></p>
</div>
</div>
</div>
</div>
8 changes: 4 additions & 4 deletions src/doc/man/generated/cargo-check.html
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ <h3 id="cargo_check_package_selection">Package Selection</h3>
<p>The default members of a workspace can be set explicitly with the
<code>workspace.default-members</code> key in the root manifest. If this is not set, a
virtual workspace will include all workspace members (equivalent to passing
<code>--all</code>), and a non-virtual workspace will include only the root crate itself.</p>
<code>--workspace</code>), and a non-virtual workspace will include only the root crate itself.</p>
</div>
<div class="dlist">
<dl>
@@ -48,14 +48,14 @@ <h3 id="cargo_check_package_selection">Package Selection</h3>
<p>Check only the specified packages. See <a href="cargo-pkgid.html">cargo-pkgid(1)</a> for the
SPEC format. This flag may be specified multiple times.</p>
</dd>
<dt class="hdlist1"><strong>--all</strong></dt>
<dt class="hdlist1"><strong>--workspace</strong></dt>
<dd>
<p>Check all members in the workspace.</p>
</dd>
<dt class="hdlist1"><strong>--exclude</strong> <em>SPEC</em>&#8230;&#8203;</dt>
<dd>
<p>Exclude the specified packages. Must be used in conjunction with the
<code>--all</code> flag. This flag may be specified multiple times.</p>
<code>--workspace</code> flag. This flag may be specified multiple times.</p>
</dd>
</dl>
</div>
@@ -455,4 +455,4 @@ <h2 id="cargo_check_see_also">SEE ALSO</h2>
<p><a href="index.html">cargo(1)</a>, <a href="cargo-build.html">cargo-build(1)</a></p>
</div>
</div>
</div>
</div>
8 changes: 4 additions & 4 deletions src/doc/man/generated/cargo-doc.html
Original file line number Diff line number Diff line change
@@ -54,7 +54,7 @@ <h3 id="cargo_doc_package_selection">Package Selection</h3>
<p>The default members of a workspace can be set explicitly with the
<code>workspace.default-members</code> key in the root manifest. If this is not set, a
virtual workspace will include all workspace members (equivalent to passing
<code>--all</code>), and a non-virtual workspace will include only the root crate itself.</p>
<code>--workspace</code>), and a non-virtual workspace will include only the root crate itself.</p>
</div>
<div class="dlist">
<dl>
@@ -64,14 +64,14 @@ <h3 id="cargo_doc_package_selection">Package Selection</h3>
<p>Document only the specified packages. See <a href="cargo-pkgid.html">cargo-pkgid(1)</a> for the
SPEC format. This flag may be specified multiple times.</p>
</dd>
<dt class="hdlist1"><strong>--all</strong></dt>
<dt class="hdlist1"><strong>--workspace</strong></dt>
<dd>
<p>Document all members in the workspace.</p>
</dd>
<dt class="hdlist1"><strong>--exclude</strong> <em>SPEC</em>&#8230;&#8203;</dt>
<dd>
<p>Exclude the specified packages. Must be used in conjunction with the
<code>--all</code> flag. This flag may be specified multiple times.</p>
<code>--workspace</code> flag. This flag may be specified multiple times.</p>
</dd>
</dl>
</div>
@@ -416,4 +416,4 @@ <h2 id="cargo_doc_see_also">SEE ALSO</h2>
<p><a href="index.html">cargo(1)</a>, <a href="cargo-rustdoc.html">cargo-rustdoc(1)</a>, <a href="https://doc.rust-lang.org/rustdoc/index.html">rustdoc(1)</a></p>
</div>
</div>
</div>
</div>
8 changes: 4 additions & 4 deletions src/doc/man/generated/cargo-fix.html
Original file line number Diff line number Diff line change
@@ -109,7 +109,7 @@ <h3 id="cargo_fix_package_selection">Package Selection</h3>
<p>The default members of a workspace can be set explicitly with the
<code>workspace.default-members</code> key in the root manifest. If this is not set, a
virtual workspace will include all workspace members (equivalent to passing
<code>--all</code>), and a non-virtual workspace will include only the root crate itself.</p>
<code>--workspace</code>), and a non-virtual workspace will include only the root crate itself.</p>
</div>
<div class="dlist">
<dl>
@@ -119,14 +119,14 @@ <h3 id="cargo_fix_package_selection">Package Selection</h3>
<p>Fix only the specified packages. See <a href="cargo-pkgid.html">cargo-pkgid(1)</a> for the
SPEC format. This flag may be specified multiple times.</p>
</dd>
<dt class="hdlist1"><strong>--all</strong></dt>
<dt class="hdlist1"><strong>--workspace</strong></dt>
<dd>
<p>Fix all members in the workspace.</p>
</dd>
<dt class="hdlist1"><strong>--exclude</strong> <em>SPEC</em>&#8230;&#8203;</dt>
<dd>
<p>Exclude the specified packages. Must be used in conjunction with the
<code>--all</code> flag. This flag may be specified multiple times.</p>
<code>--workspace</code> flag. This flag may be specified multiple times.</p>
</dd>
</dl>
</div>
@@ -534,4 +534,4 @@ <h2 id="cargo_fix_see_also">SEE ALSO</h2>
<p><a href="index.html">cargo(1)</a>, <a href="cargo-check.html">cargo-check(1)</a></p>
</div>
</div>
</div>
</div>
8 changes: 4 additions & 4 deletions src/doc/man/generated/cargo-test.html
Original file line number Diff line number Diff line change
@@ -84,7 +84,7 @@ <h3 id="cargo_test_package_selection">Package Selection</h3>
<p>The default members of a workspace can be set explicitly with the
<code>workspace.default-members</code> key in the root manifest. If this is not set, a
virtual workspace will include all workspace members (equivalent to passing
<code>--all</code>), and a non-virtual workspace will include only the root crate itself.</p>
<code>--workspace</code>), and a non-virtual workspace will include only the root crate itself.</p>
</div>
<div class="dlist">
<dl>
@@ -94,14 +94,14 @@ <h3 id="cargo_test_package_selection">Package Selection</h3>
<p>Test only the specified packages. See <a href="cargo-pkgid.html">cargo-pkgid(1)</a> for the
SPEC format. This flag may be specified multiple times.</p>
</dd>
<dt class="hdlist1"><strong>--all</strong></dt>
<dt class="hdlist1"><strong>--workspace</strong></dt>
<dd>
<p>Test all members in the workspace.</p>
</dd>
<dt class="hdlist1"><strong>--exclude</strong> <em>SPEC</em>&#8230;&#8203;</dt>
<dd>
<p>Exclude the specified packages. Must be used in conjunction with the
<code>--all</code> flag. This flag may be specified multiple times.</p>
<code>--workspace</code> flag. This flag may be specified multiple times.</p>
</dd>
</dl>
</div>
@@ -563,4 +563,4 @@ <h2 id="cargo_test_see_also">SEE ALSO</h2>
<p><a href="index.html">cargo(1)</a>, <a href="cargo-bench.html">cargo-bench(1)</a></p>
</div>
</div>
</div>
</div>
6 changes: 3 additions & 3 deletions src/doc/man/options-packages.adoc
Original file line number Diff line number Diff line change
@@ -7,16 +7,16 @@ by the manifest will be selected.
The default members of a workspace can be set explicitly with the
`workspace.default-members` key in the root manifest. If this is not set, a
virtual workspace will include all workspace members (equivalent to passing
`--all`), and a non-virtual workspace will include only the root crate itself.
`--workspace`), and a non-virtual workspace will include only the root crate itself.

*-p* _SPEC_...::
*--package* _SPEC_...::
{actionverb} only the specified packages. See man:cargo-pkgid[1] for the
SPEC format. This flag may be specified multiple times.

*--all*::
*--workspace*::
{actionverb} all members in the workspace.

*--exclude* _SPEC_...::
Exclude the specified packages. Must be used in conjunction with the
`--all` flag. This flag may be specified multiple times.
`--workspace` flag. This flag may be specified multiple times.
4 changes: 2 additions & 2 deletions src/doc/src/reference/manifest.md
Original file line number Diff line number Diff line change
@@ -658,7 +658,7 @@ manifest*.
#### Package selection

In a workspace, package-related cargo commands like [`cargo build`] apply to
packages selected by `-p` / `--package` or `--all` command-line parameters.
packages selected by `-p` / `--package` or `--workspace` command-line parameters.
When neither is specified, the optional `default-members` configuration is used:

```toml
@@ -670,7 +670,7 @@ default-members = ["path/to/member2", "path/to/member3/foo"]
When specified, `default-members` must expand to a subset of `members`.

When `default-members` is not specified, the default is the root manifest
if it is a package, or every member manifest (as if `--all` were specified
if it is a package, or every member manifest (as if `--workspace` were specified
on the command-line) for virtual workspaces.

### The project layout
2 changes: 1 addition & 1 deletion tests/testsuite/bad_config.rs
Original file line number Diff line number Diff line change
@@ -780,7 +780,7 @@ fn unused_keys_in_virtual_manifest() {
.file("bar/Cargo.toml", &basic_manifest("bar", "0.0.1"))
.file("bar/src/lib.rs", r"")
.build();
p.cargo("build --all")
p.cargo("build --workspace")
.with_stderr(
"\
[WARNING] [..]/foo/Cargo.toml: unused manifest key: workspace.bulid
6 changes: 3 additions & 3 deletions tests/testsuite/bench.rs
Original file line number Diff line number Diff line change
@@ -1382,7 +1382,7 @@ fn bench_all_workspace() {
)
.build();

p.cargo("bench --all")
p.cargo("bench --workspace")
.with_stderr_contains("[RUNNING] target/release/deps/bar-[..][EXE]")
.with_stdout_contains("test bench_bar ... bench: [..]")
.with_stderr_contains("[RUNNING] target/release/deps/foo-[..][EXE]")
@@ -1430,7 +1430,7 @@ fn bench_all_exclude() {
)
.build();

p.cargo("bench --all --exclude baz")
p.cargo("bench --workspace --exclude baz")
.with_stdout_contains(
"\
running 1 test
@@ -1484,7 +1484,7 @@ fn bench_all_virtual_manifest() {
.build();

// The order in which bar and baz are built is not guaranteed
p.cargo("bench --all")
p.cargo("bench --workspace")
.with_stderr_contains("[RUNNING] target/release/deps/baz-[..][EXE]")
.with_stdout_contains("test bench_baz ... bench: [..]")
.with_stderr_contains("[RUNNING] target/release/deps/bar-[..][EXE]")
18 changes: 9 additions & 9 deletions tests/testsuite/build.rs
Original file line number Diff line number Diff line change
@@ -129,7 +129,7 @@ fn incremental_config() {
fn cargo_compile_with_workspace_excluded() {
let p = project().file("src/main.rs", "fn main() {}").build();

p.cargo("build --all --exclude foo")
p.cargo("build --workspace --exclude foo")
.with_stderr_does_not_contain("[..]virtual[..]")
.with_stderr_contains("[..]no packages to compile")
.with_status(101)
@@ -3390,7 +3390,7 @@ fn build_all_workspace() {
.file("bar/src/lib.rs", "pub fn bar() {}")
.build();

p.cargo("build --all")
p.cargo("build --workspace")
.with_stderr(
"[..] Compiling bar v0.1.0 ([..])\n\
[..] Compiling foo v0.1.0 ([..])\n\
@@ -3420,7 +3420,7 @@ fn build_all_exclude() {
.file("baz/src/lib.rs", "pub fn baz() { break_the_build(); }")
.build();

p.cargo("build --all --exclude baz")
p.cargo("build --workspace --exclude baz")
.with_stderr_contains("[..]Compiling foo v0.1.0 [..]")
.with_stderr_contains("[..]Compiling bar v0.1.0 [..]")
.with_stderr_does_not_contain("[..]Compiling baz v0.1.0 [..]")
@@ -3456,7 +3456,7 @@ fn build_all_workspace_implicit_examples() {
.file("bar/examples/h.rs", "fn main() {}")
.build();

p.cargo("build --all --examples")
p.cargo("build --workspace --examples")
.with_stderr(
"[..] Compiling bar v0.1.0 ([..])\n\
[..] Compiling foo v0.1.0 ([..])\n\
@@ -3490,7 +3490,7 @@ fn build_all_virtual_manifest() {
.build();

// The order in which bar and baz are built is not guaranteed
p.cargo("build --all")
p.cargo("build --workspace")
.with_stderr_contains("[..] Compiling baz v0.1.0 ([..])")
.with_stderr_contains("[..] Compiling bar v0.1.0 ([..])")
.with_stderr(
@@ -3580,7 +3580,7 @@ fn build_all_virtual_manifest_implicit_examples() {
.build();

// The order in which bar and baz are built is not guaranteed
p.cargo("build --all --examples")
p.cargo("build --workspace --examples")
.with_stderr_contains("[..] Compiling baz v0.1.0 ([..])")
.with_stderr_contains("[..] Compiling bar v0.1.0 ([..])")
.with_stderr(
@@ -3625,7 +3625,7 @@ fn build_all_member_dependency_same_name() {

Package::new("a", "0.1.0").publish();

p.cargo("build --all")
p.cargo("build --workspace")
.with_stderr(
"[UPDATING] `[..]` index\n\
[DOWNLOADING] crates ...\n\
@@ -3695,7 +3695,7 @@ fn run_proper_alias_binary_from_src() {
.file("src/bar.rs", r#"fn main() { println!("bar"); }"#)
.build();

p.cargo("build --all").run();
p.cargo("build --workspace").run();
p.process(&p.bin("foo")).with_stdout("foo\n").run();
p.process(&p.bin("bar")).with_stdout("bar\n").run();
}
@@ -3719,7 +3719,7 @@ fn run_proper_alias_binary_main_rs() {
.file("src/main.rs", r#"fn main() { println!("main"); }"#)
.build();

p.cargo("build --all").run();
p.cargo("build --workspace").run();
p.process(&p.bin("foo")).with_stdout("main\n").run();
p.process(&p.bin("bar")).with_stdout("main\n").run();
}
4 changes: 2 additions & 2 deletions tests/testsuite/check.rs
Original file line number Diff line number Diff line change
@@ -396,7 +396,7 @@ fn check_all() {
.file("b/src/lib.rs", "")
.build();

p.cargo("check --all -v")
p.cargo("check --workspace -v")
.with_stderr_contains("[..] --crate-name foo src/lib.rs [..]")
.with_stderr_contains("[..] --crate-name foo src/main.rs [..]")
.with_stderr_contains("[..] --crate-name b b/src/lib.rs [..]")
@@ -429,7 +429,7 @@ fn check_virtual_all_implied() {
#[cargo_test]
fn exclude_warns_on_non_existing_package() {
let p = project().file("src/lib.rs", "").build();
p.cargo("check --all --exclude bar")
p.cargo("check --workspace --exclude bar")
.with_stdout("")
.with_stderr(
r#"[WARNING] excluded package(s) bar not found in workspace `[CWD]`
4 changes: 2 additions & 2 deletions tests/testsuite/features.rs
Original file line number Diff line number Diff line change
@@ -1397,7 +1397,7 @@ fn combining_features_and_package() {
)
.build();

p.cargo("build -Z package-features --all --features main")
p.cargo("build -Z package-features --workspace --features main")
.masquerade_as_nightly_cargo()
.with_status(101)
.with_stderr_contains("[ERROR] cannot specify features for more than one package")
@@ -1419,7 +1419,7 @@ fn combining_features_and_package() {
.with_stderr_contains("[ERROR] cannot specify features for packages outside of workspace")
.run();

p.cargo("build -Z package-features --all --all-features")
p.cargo("build -Z package-features --workspace --all-features")
.masquerade_as_nightly_cargo()
.run();
p.cargo("run -Z package-features --package bar --features main")
2 changes: 1 addition & 1 deletion tests/testsuite/freshness.rs
Original file line number Diff line number Diff line change
@@ -1134,7 +1134,7 @@ fn reuse_shared_build_dep() {
.file("bar/build.rs", "fn main() {}")
.build();

p.cargo("build --all").run();
p.cargo("build --workspace").run();
// This should not recompile!
p.cargo("build -p foo -v")
.with_stderr(
4 changes: 2 additions & 2 deletions tests/testsuite/metabuild.rs
Original file line number Diff line number Diff line change
@@ -409,7 +409,7 @@ fn metabuild_workspace() {
)
.build();

p.cargo("build -vv --all")
p.cargo("build -vv --workspace")
.masquerade_as_nightly_cargo()
.with_stdout_contains("[member1 0.0.1] Hello mb1 [..]member1")
.with_stdout_contains("[member1 0.0.1] Hello mb2 [..]member1")
@@ -613,7 +613,7 @@ fn metabuild_two_versions() {
)
.build();

p.cargo("build -vv --all")
p.cargo("build -vv --workspace")
.masquerade_as_nightly_cargo()
.with_stdout_contains("[member1 0.0.1] Hello mb1 [..]member1")
.with_stdout_contains("[member2 0.0.1] Hello mb2 [..]member2")
18 changes: 9 additions & 9 deletions tests/testsuite/test.rs
Original file line number Diff line number Diff line change
@@ -2797,7 +2797,7 @@ fn test_all_workspace() {
.file("bar/src/lib.rs", "#[test] fn bar_test() {}")
.build();

p.cargo("test --all")
p.cargo("test --workspace")
.with_stdout_contains("test foo_test ... ok")
.with_stdout_contains("test bar_test ... ok")
.run();
@@ -2824,7 +2824,7 @@ fn test_all_exclude() {
.file("baz/src/lib.rs", "#[test] pub fn baz() { assert!(false); }")
.build();

p.cargo("test --all --exclude baz")
p.cargo("test --workspace --exclude baz")
.with_stdout_contains(
"running 1 test
test bar ... ok",
@@ -2848,7 +2848,7 @@ fn test_all_virtual_manifest() {
.file("b/src/lib.rs", "#[test] fn b() {}")
.build();

p.cargo("test --all")
p.cargo("test --workspace")
.with_stdout_contains("test a ... ok")
.with_stdout_contains("test b ... ok")
.run();
@@ -2902,7 +2902,7 @@ fn test_all_member_dependency_same_name() {

Package::new("a", "0.1.0").publish();

p.cargo("test --all")
p.cargo("test --workspace")
.with_stdout_contains("test a ... ok")
.run();
}
@@ -3037,7 +3037,7 @@ fn doctest_and_registry() {

Package::new("b", "0.1.0").publish();

p.cargo("test --all -v").run();
p.cargo("test --workspace -v").run();
}

#[cargo_test]
@@ -3075,7 +3075,7 @@ fn test_order() {
.file("tests/z.rs", "#[test] fn test_z() {}")
.build();

p.cargo("test --all")
p.cargo("test --workspace")
.with_stdout_contains(
"
running 1 test
@@ -3117,7 +3117,7 @@ fn cyclic_dev() {
.file("tests/foo.rs", "extern crate foo;")
.build();

p.cargo("test --all").run();
p.cargo("test --workspace").run();
}

#[cargo_test]
@@ -3228,7 +3228,7 @@ fn find_dependency_of_proc_macro_dependency_with_target() {
.dep("bar", "0.1")
.file("src/lib.rs", "extern crate bar;")
.publish();
p.cargo("test --all --target").arg(rustc_host()).run();
p.cargo("test --workspace --target").arg(rustc_host()).run();
}

#[cargo_test]
@@ -3310,7 +3310,7 @@ fn test_hint_workspace_nonvirtual() {
.file("a/src/lib.rs", "#[test] fn t1() {assert!(false)}")
.build();

p.cargo("test --all")
p.cargo("test --workspace")
.with_stderr_contains("[ERROR] test failed, to rerun pass '-p a --lib'")
.with_status(101)
.run();
2 changes: 1 addition & 1 deletion tests/testsuite/workspaces.rs
Original file line number Diff line number Diff line change
@@ -1862,7 +1862,7 @@ fn dep_used_with_separate_features() {
let p = p.build();

// Build the entire workspace.
p.cargo("build --all")
p.cargo("build --workspace")
.with_stderr(
"\
[..]Compiling feat_lib v0.1.0 ([..])