Weihang Lo
9c0d865389
fix: more error context for missing dep of workspace member
2021-04-17 14:24:29 +08:00
Weihang Lo
832fff8dd1
fix: more context when failed to load workspace member
2021-04-17 13:56:39 +08:00
Jade
de45c6f97a
Delete uses of the USER env var from tests
2021-03-22 13:39:18 -07:00
Eric Huss
fdb8ea1e03
Add some extra help to cargo new
and invalid package names.
2021-01-24 13:21:25 -08:00
Eduardo Broto
fb02ade261
Rework tests to avoid using -vv
...
Environment variables are represented differently in differents OSes in
the output.
Add tests checking if the variable is set instead.
2020-10-15 00:44:04 +02:00
Eduardo Broto
c12aed2fe4
Add tests for CARGO_PRIMARY_PACKAGE (workspaces)
2020-10-14 23:35:00 +02:00
Eric Huss
6f8c7d5a87
Normalize raw string indentation.
2020-09-26 17:59:58 -07:00
Thom Chiovoloni
b377c4bb17
Check for quux
binary in excluded_default_members_crate_glob
test (review feedback)
2020-07-20 09:38:20 -07:00
Thom Chiovoloni
b70a5962c3
Apply workspace.exclude to workspace.default-members.
2020-07-14 13:58:42 -07:00
Julian Wollersberger
d6a1428609
Rephrased error message for disallowed sections in virtual workspace
2020-05-14 10:26:20 +02:00
Eric Huss
4ae79d2ffd
Use fs helpers instead of File functions.
2020-04-17 07:56:16 -07:00
Eric Huss
b64d0f3645
Don't use debug display for error object.
2020-04-15 17:29:19 -07:00
Eric Huss
1eca786d7f
Add path to the failure to load a dependency.
2020-02-27 08:17:18 -08:00
Eric Huss
a07fec1b7b
Provide extra context on a query failure.
2020-02-25 10:17:11 -08:00
Alex Crichton
3a18c89a55
Migrate from the failure
crate to anyhow
...
The `anyhow` crate interoperates with the `std::error::Error` trait
rather than a custom `Fail` trait, and this is the general trend of
error handling in Rust as well.
Note that this is mostly mechanical (sed) and intended to get the test
suite passing. As usual there's still more idiomatic cleanup that can
happen, but that's left to later commits.
2020-01-07 16:50:09 -08:00
Eric Huss
83571aee56
Minor testsuite organization.
2019-11-24 18:42:45 -08:00
Alex Crichton
d7d8ca1e12
Consolidate build
key configuration
...
Add a typed structure which lists all `build` key configuration
throughout Cargo.
2019-10-07 17:12:03 -07:00
Alex Crichton
ebd10526f3
Run rustfmt
2019-09-16 12:00:12 -07:00
Alex Crichton
9115b2c326
Extract support
directory to its own crate
...
Extract out all our test support code to its own standalone crate so it
can be shared between multiple test suites if necessary.
2019-09-16 11:47:09 -07:00
k-nasa
7176df01d6
Change --all to --workspace
2019-09-03 17:14:34 -07:00
Wim Looman
53e84c571d
Only apply default-members when building root manifest
2019-08-19 14:47:02 -07:00
bors
85a52ce20e
Auto merge of #7242 - ehuss:vendor-ignore-dot, r=alexcrichton
...
`cargo vendor`: Don't delete hidden top-level files.
`cargo vendor` (without `--no-delete`) will delete all files in the `vendor/` directory when it starts. This changes it so that it will skip any entries starting with a dot. This allows one to track the vendor directory with a source control system like git.
Closes #7109
(Note: two commits, one is a test change.)
2019-08-13 22:47:50 +00:00
Eric Huss
b41c209af3
Bump toml 0.5.3
2019-08-13 14:56:22 -07:00
Eric Huss
3c20a24335
Clean up some git test support functions.
2019-08-12 22:25:36 -07:00
Alex Crichton
bdb0ce84e2
Don't suppress error messages with -q
...
If we're printing an error, make sure we always print it regardless of
verbosity settings!
2019-07-10 10:01:09 -07:00
Jethro Beekman
0e0d968825
Update #[test] attribute on all tests in the testsuite
...
sed -i 's/^#\[test\]/#[cargo_test]/' $(rg -l '^#\[test\]')
Manual fixes:
* proc_macro::proc_macro_doctest
2019-06-07 12:41:26 -07:00
Eric Huss
03932d610d
Fix new_warning_with_corrupt_ws missing "USER".
...
Also removed USER in all invocations to avoid this in the future.
2019-04-16 08:35:58 -07:00
Eric Huss
3c0626270d
Improve warning in cargo new
with parse error.
...
If `cargo new` fails to load a parent manifest (for whatever reason), it as not
displaying the reason why. Add the causes to provide more context.
2019-04-11 13:01:46 -07:00
Eric Huss
d7a9212409
Add more suggestions on how to deal with excluding a package from a workspace.
2019-03-31 17:52:36 -07:00
Eric Huss
e7124ba262
Testsuite: Make cwd()
relative to project root.
...
It's a fairly common pattern, and it seemed natural to me.
2019-03-20 16:34:56 -07:00
Alexander Regueiro
f7c91ba622
Various cosmetic improvements.
2019-02-20 10:58:27 +00:00
Dale Wijnand
37df042ba8
Test cleanup: remove unnecessary with_status(0)
2019-02-04 18:52:33 +01:00
Eric Huss
f58d107e7c
testsuite: Require failing commands to check output.
2018-12-28 17:59:36 -08:00
Alex Crichton
fecb724643
Format with cargo fmt
2018-12-08 03:19:47 -08:00
Dale Wijnand
04ddd4d0fc
Upgrade to Rust 2018
2018-12-06 20:18:35 +01:00
Eric Huss
6ad7794027
Include path to manifest in workspace warnings.
2018-11-07 11:17:29 -08:00
Eric Huss
5b2b5f9598
Warn/err on some unused manifest keys in workspaces.
2018-11-07 09:00:54 -08:00
Zach Lute
3492a3905c
Replace 'project' with 'package' in many strings and comments.
2018-09-20 23:47:09 -07:00
Alex Crichton
e2637b6599
Review comments!
2018-09-18 11:33:18 -07:00
Zach Lute
b020d3789a
Resolve merge conflicts with test string changes.
2018-09-09 16:48:57 -07:00
bors
5984312202
Auto merge of #5990 - dwijnand:no-crates.io-index-url, r=alexcrichton
...
Don't print crates.io-index URL when Updating
Following the lead from PackageId's Display, only display the registry's
URL if it's not the default registry (aka crates.io).
Before:
$ cargo install lazy_static
Updating registry `https://github.com/rust-lang/crates.io-index `
After:
$ dcargo install lazy_static
Updating crates.io index
Fixes #4208
2018-09-09 21:06:13 +00:00
Dale Wijnand
41aa6fbab4
Update tests to new Updating msg format
2018-09-08 10:23:57 +01:00
Zach Lute
89f43938fe
Print file paths instead of file:// URLs.
...
This change ensures cargo will output file paths in the expected format
(C:\foo\... on Windows, /foo/... elsewhere). Previously it would output
file:// URLs instead.
To support this change, additional changes were made to the test suite
string processing such that [ROOT] is now replaced with the appropriate
file path root for the platform.
The CWD template was also updated to use [CWD] like other replacement
templates and to do the replacement on the expected value rather than
the actual value to avoid replacing things we don't expect with CWD.
2018-09-07 19:42:59 -07:00
Dale Wijnand
4415c72828
Remove/reworksome redundant .cwd(p.root()) in tests
2018-09-06 01:12:53 +01:00
Dale Wijnand
d5fc8dc3a7
Introduce the CWD macro in test output asserting
...
Avoids dealing with things like CWD changing.
2018-08-30 11:05:29 +02:00
Dale Wijnand
570fe8927d
Remove hamcrest existing_file()
2018-08-29 10:26:12 +02:00
Dale Wijnand
6fd1b54c65
Remove hamcrest existing_dir()
2018-08-29 07:53:01 +02:00
Dale Wijnand
85984a8700
Migrate from tests fom assert_that/execs to .run()
2018-08-28 15:08:12 +02:00
Dale Wijnand
0152f26405
Move .env/.masquerade_as_nightly_cargo to collapse some more p.cargo calls
2018-08-18 21:34:09 +01:00
Dale Wijnand
af4f1392f7
Collapse ProcessBuilder::arg calls in tests
...
.. with mutliple calls of:
fastmod --accept-all '\.cargo\("([^"]+)"\)\.arg\("([^"]+)"\)' '.cargo("${1} ${2}")' tests/testsuite/
until no changes are left.
2018-08-18 15:05:45 +01:00