29 Commits

Author SHA1 Message Date
Scott Schafer
d36c326926
chore(deps): update rust crate annotate-snippets to 0.12.1 2025-09-02 15:43:38 -06:00
Ed Page
539a48452a perf: Update toml 2025-07-08 11:55:41 -05:00
Eric Huss
1ce8023626 Rustfmt 2024 2025-07-05 19:50:36 -07:00
Ross Sullivan
92d9a94d02
chore: Migrated testsuite to testsuite::prelude 2025-06-25 22:37:24 +09:00
Weihang Lo
2bab011078
refactor: separate "global" mode from CompileMode
This separates the concern of two different "mode".

- UserIntent: focus on the overall goal of the build
- CompileMode: the actual compile operation for each unit

This is a preparation of adding `-Zno-link`/`-Zlink-only` support,
which we'll have `CompileMode::Link` but that doesn't make sense to
show up in `UserIntent`.
2025-05-27 11:48:30 -04:00
Ed Page
b0e515aa61 fix(test): Move 'cargo_home' from 'install' to 'paths'
This is used outside of `cargo install` contexts and this makes it more
discoverable for those use cases.
2024-07-19 10:50:42 -05:00
Ed Page
5b9799c6f4 refactor: Migrate from extern crate to test-support prelude
We now include the prelude in so many places, this simplifies how we can
present how `cargo-test-support` works.

Yes, this included some `use` clean ups but its already painful enough
walking through every test file, I didn't want to do it twice.
2024-07-12 15:57:00 -05:00
eth3lbert
0766437804
test: migrate member_errors to snapbox 2024-07-08 14:20:54 +08:00
Ed Page
dc5ac62cab fix(test): Deprecate non-snapbox assertions
While this is noisy and hides other deprecations, I figured deprecations would
make it easier for people to discover what tasks remain and allow us to
divide and conquer this work rather than doing a heroic PR.
In theory, this will be short lived and we'll go back to seeing
deprecations in our tests.
2024-06-10 10:20:52 -05:00
Ed Page
67b5aa4205 refactor(context): Rename config mod to context 2024-02-29 16:08:08 -06:00
Scott Schafer
305efa63cc
chore: Rename Config to GlobalContext 2024-02-20 11:55:15 -07:00
Scott Schafer
0d62ae2fc3
feat: Add rustc style errors for manifest parsing 2023-12-15 13:30:10 -07:00
Scott Schafer
ab18bd40d5 refactor(testsuite): Replace [project] with [package] 2022-09-26 09:51:16 -06:00
Eric Huss
6f8c7d5a87 Normalize raw string indentation. 2020-09-26 17:59:58 -07:00
Eric Huss
83571aee56 Minor testsuite organization. 2019-11-24 18:42:45 -08:00
Alex Crichton
7606f79661 Improve test output with --quiet
We had a few locations where the shell was written to raw instead of
through the test harness or through other captured mechanisms. This
updates the test suite so testing Cargo with `--quiet` provides a nice
and clean report of tests executed.
2019-09-26 11:32:29 -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
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
f01428b647 Fix member_manifest_version_error accessing the network. 2019-03-30 19:12:32 -07:00
Alexander Regueiro
f7c91ba622
Various cosmetic improvements. 2019-02-20 10:58:27 +00:00
Dale Wijnand
04ddd4d0fc
Upgrade to Rust 2018 2018-12-06 20:18:35 +01:00
Eh2406
dae87a2624 PackageId is copy, clippy thinks we dont need &PackageId or PackageId.clone() 2018-11-27 17:43:23 -05:00
Alex Butler
a853efda40
Move ResolveError -> core/resolver/errors.rs
Move activation_error, describe_path -> errors.rs
2018-10-16 15:42:15 +01:00
Alex Butler
b75b7052a4
Add package_path to ResolveError
More useful than just the parent
2018-10-16 08:56:31 +01:00
Alex Butler
50cbb96e06
Rename PackageError -> ResolveError
Rename package_id() -> parent_package_id() for clarity
2018-10-16 00:42:14 +01:00
Alex Butler
20909651bc
Add PackageError wrappers for activation errors 2018-10-15 19:29:53 +01:00
Alex Butler
25b7ad2676
Wrap initial ManifestError in toml module
Filter out ManifestErrors when generating error output
2018-10-12 20:54:40 +01:00
Alex Butler
10b3ebf037
Wrap all, including io, manifest errors 2018-10-12 20:54:40 +01:00
Alex Butler
49ab03e3b0
Expose manifest error chain 2018-10-12 20:54:40 +01:00