1120 Commits

Author SHA1 Message Date
Ed Page
fa5853a397 chore: Bump rustfix 2024-07-25 10:31:21 -05:00
Ed Page
2a104dcb31 chore: Move rustfix's similar dep to workspace 2024-07-25 10:30:40 -05:00
Ed Page
8debb544e4 chore: Update dependencies
I just published all of my packages using Cargo 1.80 and wanted to see
the effect of the enumerating targets during publish (#13849).
2024-07-25 10:04:10 -05:00
Ed Page
922cfe5759 fix(test): Remove unused deprecated function 2024-07-24 16:35:11 -05:00
Ed Page
16448d45d7 doc(test): Document 'with_json' replacement 2024-07-24 10:42:51 -05:00
Weihang Lo
ab8ac44b49
chore: bump cargo-test-support to 0.4.0 2024-07-22 15:37:13 -04:00
bors
ea14e861c7 Auto merge of #14272 - epage:test-docs, r=weihanglo
docs(test): Expand documentation of cargo-test-support

### What does this PR try to resolve?

In wanting to document #14039, I felt it would be good to put that documentation in `cargo-test-support`.  To do so, I wanted a baseline of existing documentation for it to build on top of.

I was tempted to move more of "Writing tests" contrib documentation here, as its more about using `cargo-test-support` but I decided to hold off for now as most of that was long-form documentation and this is mostly focused on reference documentation.

### How should we test and review this PR?

### Additional information
2024-07-22 15:10:08 +00:00
Ed Page
83cbca0141 refactor(test): Document 'registry' mod 2024-07-22 08:58:52 -05:00
Ed Page
b931d98b90 refactor(test): Document 'publish' mod 2024-07-22 08:58:52 -05:00
Ed Page
6d0eea0e33 refactor(test): Document 'paths' mod
I considered hiding `init_root` as an implementation detail of
`#[cargo_test]` but decided to be conservative about that for now.
2024-07-22 08:58:52 -05:00
Ed Page
062652c856 docs(test): Expand 'install' documentation 2024-07-22 08:58:52 -05:00
Ed Page
64a62ff8fe docs(test): Expand 'git' documentation 2024-07-22 08:58:52 -05:00
Ed Page
97ccb653b0 docs(test): Expose git documentation 2024-07-22 08:58:52 -05:00
Ed Page
8f88a8af31 docs(test): Expand 'compare' documentation 2024-07-22 08:58:52 -05:00
Ed Page
cb528403fa docs(test): Expand docs for ProjectBuilder 2024-07-22 08:58:52 -05:00
Ed Page
45f61ccfa8 docs(test): Expand docs for Project 2024-07-22 08:58:52 -05:00
Ed Page
3dff0ec945 docs(test): Document project* functions 2024-07-22 08:58:52 -05:00
Ed Page
e53f2aff55 docs(test): Document panic_error function 2024-07-22 08:58:52 -05:00
Ed Page
c9dddd27c8 docs(test): Document main_file function 2024-07-22 08:58:52 -05:00
Ed Page
170756601c docs(test): Document 'process' 2024-07-22 08:58:52 -05:00
Ed Page
b4b56d4d65 docs(test): Document basic_*manifest functions 2024-07-22 08:58:52 -05:00
Ed Page
1fe8ae6c3e docs(test): Document Execs
I'm intentionally being light as I want to pull in a lot of "lessons
learned" from the port to snapbox into the docs and want that as a
dedicated PR to make it easier for the contributors to that effort to
review it.
2024-07-22 08:58:52 -05:00
Ed Page
4674f2b84d docs(test): Organize docs for Execs 2024-07-22 08:58:52 -05:00
Ed Page
f42ae4c9c1 docs(test): Pull RawOutput from API
Its not used anywhere
2024-07-22 08:58:52 -05:00
Ed Page
7762d1f98c docs(test): Document cargo_exe 2024-07-22 08:58:52 -05:00
Ed Page
fa0e66e738 docs(test): Document git_process 2024-07-22 08:58:52 -05:00
Ed Page
504d377c8e docs(test): Document cargo_process 2024-07-22 08:58:52 -05:00
Ed Page
86945a211e docs(test): Document t! 2024-07-22 08:58:52 -05:00
Ed Page
ca9fc47fe0 docs(test): Add high level example 2024-07-22 08:58:52 -05:00
Ed Page
ad6abb54be docs(test): Verify they work 2024-07-22 08:58:52 -05:00
Ed Page
8e524ae561 docs(test): Link to two different docs builds 2024-07-22 08:58:52 -05:00
Ed Page
83d1c14b4e docs(test): Point to docs, rather than source
I pointed to the nightly docs because I figured that was the most likely
one for users to be looking at.
2024-07-22 08:58:52 -05:00
bors
5f6b9a9220 Auto merge of #14271 - Alexendoo:schemas, r=epage
Add `TomlPackage::new`, `Default` for `TomlWorkspace`

Ran into this when using it to create a `Cargo.toml` rather than consume an existing one
2024-07-19 18:09:17 +00:00
Alex Macleod
9f85086fd2 Add TomlPackage::new, Default for TomlWorkspace 2024-07-19 17:51:38 +00:00
Ed Page
f05eba0ac5 docs(test): Migrate cargo_test docs from contrib to API reference
This will make them more easily discovered and make it easier to
remember to update them.
2024-07-19 12:04:02 -05:00
Ed Page
49deefe477 refactor(test): Reuse 'cargo_home' in more cases 2024-07-19 10:54:17 -05: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
bors
dad331c5ba Auto merge of #14269 - epage:test-ext, r=ehuss
fix(test)!: Clarify extension trait role with rename

When browsing the docs, I feel like this will make it easier to tell the role of these traits within the API.
Or in other words, I can easily tell that these fill a support role and for what, so I know when I care to look into them.

We use this naming pattern for
`cargo_test_support::paths::CargoPathExt`.
2024-07-19 15:11:26 +00:00
Ed Page
a49921f829 fix(test)!: Clarify extension trait role with rename
When browsing the docs, I feel like this will make it easier to tell the
role of these traits within the API.
Or in other words, I can easily tell that these fill a support role and
for what, so I know when I care to look into them.

We use this naming pattern for
`cargo_test_support::paths::CargoPathExt`.
2024-07-18 20:52:22 -05:00
Ed Page
879bc9e3c3 feat(test): Re-export ProcessBuilder
Since its tied heavily into the API, this should make it easier to use
and document.
2024-07-18 20:51:43 -05:00
bors
f10c069629 Auto merge of #14266 - epage:path2url, r=weihanglo
fix(test): Move path2url to CargoPathExt::to_url

### What does this PR try to resolve?

This is a small step, like #14243, to improve the clarity of `cargo-test-support`s API.

Overall, I'm trying to make it more obvious on https://docs.rs/cargo-test-support/latest/cargo_test_support/ which items to reach for when.  I figured this is one that could be demoted to `paths` When doing so, I noticed `CargoPathExt`. I figured if we had any extension traits for `Path`, then this is a
reasonable one to add.

### How should we test and review this PR?

### Additional information
2024-07-18 20:57:05 +00:00
Ed Page
d17322dccb fix(test): Move path2url to CargoPathExt::to_url
I was considering moving this into `paths` and noticed `CargoPathExt`.
I figured if we had any extension traits for `Path`, then this is a
reasonable one to add.
2024-07-18 15:41:26 -05:00
Ed Page
3a615ca9c8 feat(test): Add CargoPathExt to prelude 2024-07-18 15:22:29 -05:00
Ed Page
5d4ac652f5 feat(test): Offer CargPathExt for PathBuf 2024-07-18 14:51:57 -05:00
d1t2
df43a23235
test: Update HASH redaction for registry files 2024-07-16 23:07:06 +08:00
Ed Page
090064cc14 feat(test): Add cargo_test to test-support prelude 2024-07-12 15:56:22 -05:00
Ed Page
7fcd580b3b fix(test): Redact elapsed time in the minutes time frame
This came up in #14231
```
---- expected: tests/testsuite/lto.rs:611:27
++++ actual:   stderr
   1    1 | [FRESH] registry-shared v0.0.1
   2    2 | [FRESH] registry v0.0.1
   3    3 | [COMPILING] bar v0.0.0 ([ROOT]/foo/bar)
   4    4 | [RUNNING] `rustc --crate-name bar [..]-C lto [..]--test [..]`
   5    5 | [RUNNING] `rustc --crate-name b [..]-C lto [..]--test [..]`
   6      - [FINISHED] `release` profile [optimized] target(s) in [ELAPSED]s
   7    6 | [RUNNING] `[ROOT]/foo/target/release/deps/bar-[HASH][EXE]`
   8    7 | [RUNNING] `[ROOT]/foo/target/release/deps/b-[HASH][EXE]`
   9    8 | [DOCTEST] bar
  10    9 | [RUNNING] `rustdoc --edition=2015 --crate-type cdylib --crate-type rlib --crate-name bar --test [..]-C lto [..]
       10 + [FINISHED] `release` profile [optimized] target(s) in 1m 00s

Update with SNAPSHOTS=overwrite
```
2024-07-10 16:42:21 -05:00
Ed Page
5ed63926d3 test(test): Verify elapsed redaction 2024-07-10 16:40:47 -05:00
Ed Page
a10b3ca8b2 refactor(test): Split out 'pure' redactions for testing 2024-07-10 16:37:12 -05:00
Ed Page
c8113d3a1c refactor(test): Move compare tests into a mod 2024-07-10 16:33:14 -05:00