51 Commits

Author SHA1 Message Date
Weihang Lo
4240e722d4
test: requires attribute accepts string literals for cmds
The new syntax is key-value pair like `requires = "rustfmt"`,
comparing to the previous `requires_<cmd>`.
2024-11-29 22:23:08 -05:00
Ed Page
6da546c9e1 chore: Bump versions 2024-11-29 10:43:19 -06:00
renovate[bot]
1ec49b8947
chore(deps): update msrv 2024-11-29 03:54:45 +00:00
renovate[bot]
341d619f66
chore(deps): update msrv 2024-10-19 01:35:59 -04:00
Ed Page
5c87c14f9a docs: Declare support level for each crate in our Charter / docs
This is to bring us into conformance with the [Rust crate ownership
policy](https://forge.rust-lang.org/policies/crate-ownership.html).

Items of note
- `cargo-credential-1password` is declared as Experimental as it is
  intended for the community but I was unsure if we wanted to commit to
  full support for it.  In my mind, the ideal thing to do would be to
  expatriate this to 1password.
- `home` is declared as Internal despite its wide use within the
  ecosystem.
- `cargo-credential` is declared as Intentional as its an API intended
  for the wider ecosystem and I didn't see a reason to declare it
  experimental.
- `cargo-platform`, `cargo-util-schemas`, and `crates-io` are declared
  as Intentional as they are both used internally and intended for
  others to use for logic that integrates with cargo/registries.
  I wondered about these being Experimental or Internal instead.
2024-09-26 12:43:09 -05:00
Ed Page
1b94fb2326 chore: Bump MSRV to 1.81
This is prep for using `#[expect]`.

Its not clear why RenovateBot didn't do this.
2024-09-23 19:45:57 -05:00
Ed Page
d62fcae81d chore: Bump versions 2024-07-26 16:32:54 -05:00
renovate[bot]
74f01c4b65
chore(deps): update msrv 2024-07-26 12:52:37 +00: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
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
Weihang Lo
f4985827d7
chore: bump cargo-test-{support,macro} due to public API changes 2024-06-17 11:37:21 -04:00
Ed Page
b07e87656f chore: Bump version for internal crates 2024-06-13 13:38:32 -05:00
renovate[bot]
a018e3a946
chore(deps): update msrv (1 version) to v1.79 2024-06-13 17:27:19 +00:00
renovate[bot]
05ba4d8cfe chore(deps): update msrv (1 version) to v1.78 2024-05-02 15:07:25 +00:00
Paul Mabileau
f422e96b31
Docs(crates/cargo-test-*): Add external usage warning
As discussed in #10147.

Signed-off-by: Paul Mabileau <paulmabileau@hotmail.fr>
2024-03-26 11:17:34 +01:00
Paul Mabileau
2879fc0d60
Chore(cargo-test-*/Cargo.toml): Bump MSRVs to make corresponding CI check pass
Signed-off-by: Paul Mabileau <paulmabileau@hotmail.fr>
2024-03-26 11:16:12 +01:00
Paul Mabileau
d691d034c7
Chore(cargo-test-*/Cargo.toml): Bump versions to make ci/validate-version-bump.sh pass
Signed-off-by: Paul Mabileau <paulmabileau@hotmail.fr>
2024-03-26 11:14:14 +01:00
Paul Mabileau
f9b5702755
Chore(cargo-test-*/Cargo.toml): Standardize basic fields for publication
Marks the crates as publishable.

Signed-off-by: Paul Mabileau <paulmabileau@hotmail.fr>
2024-03-26 11:11:51 +01:00
Paul Mabileau
80300763b1
Chore(cargo-test-*): Add license file links
Signed-off-by: Paul Mabileau <paulmabileau@hotmail.fr>
2024-03-26 11:09:32 +01:00
Eric Huss
a82794ec4a Fix path issues for running rustup wrapper on Windows.
Cargo likes to modify PATH, which circumvents the ability to choose the
correct "cargo" executable to run on Windows (because Windows uses PATH
for both binary and shared library searching).
2024-02-20 16:27:04 -08:00
Eric Huss
ccaa118d27 Add workaround for RUSTUP_WINDOWS_PATH_ADD_BIN.
On Windows, rustup has an issue with recursive cargo invocations. This
commit can be removed once
https://github.com/rust-lang/rustup/issues/3036 is resolved.
2024-02-20 13:24:50 -08:00
Eric Huss
8bb62310e5 cargo_test CI macro: add requires_rustup_stable
This adds the `requires_rustup_stable` option to the cargo_test macro to
require `rustup` to exist, and for the `stable` toolchain to be
installed.

It is required that stable be installed in Cargo's CI. On a developer
machine, the tests will be ignored if rustup is not installed. It will
also be ignored on rust-lang/rust's CI since it does not have rustup.
2024-02-20 12:36:03 -08:00
Eric Huss
3c414b5cf1 Fix static_mut_ref warning. 2024-01-19 15:12:37 -08:00
Ed Page
9438f80042 chore: Remove rust-version from private packages
I removed it from `cargo-test-support` and `cargo-test-macro`, despite
people depending on those (via git) because my long term plan is resting
on the `auto` value which won't affect git dependencies.
2024-01-18 15:24:25 -06:00
Weihang Lo
ad2c45bde9
refactor: clean up package metadata
Like PR 12352 but for homepage and repository

Versions for

* `cargo-credential-1password`
* `cargo-util-schemas`
* `home`

are bumped along with the change.
2023-12-18 16:09:03 -05:00
Weihang Lo
5c32fe0432
test(trim-paths): exercise with real world debugger 2023-12-01 08:48:24 -05:00
Weihang Lo
1539b3dfc1
lint: dogfood ourselves lints table in manifest
These lint rules are from src/lib.rs. We aim to remove
them in the source code once `Zlints` hit stable.
2023-11-16 11:35:21 -05:00
Weihang Lo
aef3bd22d3
lint: fix errors for rust 2018 idioms 2023-09-14 13:43:48 +08:00
Ed Page
7a65c826a0 fix: Set MSRV for internal packages
For now, I'm punting on packages we generally expect others to use
2023-08-22 16:46:47 -05:00
Ed Page
5d80aa263d refactor: Provide workspace-level default license 2023-07-17 13:21:41 -05:00
Ed Page
f358359a17 refactor: Provide a workspace-level default edition 2023-07-17 13:21:40 -05:00
Weihang Lo
0bffcbcb8a
chore: publish = false for pkgs not meant to be published
These tree packages are considered to be published something.
To reduce the logic of xtask-unpubilshed, let's flag them false for now.
We can always set it `true` when needed.
2023-05-05 16:24:19 +01:00
Weihang Lo
f3778f9193
Revert "#11738" - Use test name for dir when running tests
This reverts commit 64b0e793cea8542b34504a881f9cfd9444ab5138, reversing
changes made to 958078633ee9ae1af053fbab32ac70ae475b0e7f.
2023-03-08 15:17:48 +00:00
Scott Schafer
019aeedeb4 feat: Use test name for dir when running tests 2023-03-01 11:38:58 -06:00
Eric Huss
9247e8155f Fix unused attribute on Windows. 2023-01-22 14:02:23 -08:00
Eric Huss
4cb9ac35bf Add network container tests 2023-01-14 15:10:16 -08:00
bors
333478d0aa Auto merge of #10929 - ehuss:ignore-reason, r=weihanglo
Add reasons to all ignored tests.

This adds a reason string to all `#[ignore]` attributes. This will be displayed when running the test (since 1.61), which can help quickly see and identify why tests are being ignored. It looks roughly like:

```
test basic ... ignored, requires nightly, CARGO_RUN_BUILD_STD_TESTS must be set
test build::simple_terminal_width ... ignored, --diagnostic-width is stabilized in 1.64
test check_cfg::features_with_cargo_check ... ignored, --check-cfg is unstable
test plugins::panic_abort_plugins ... ignored, requires rustc_private
```
2022-08-03 03:54:05 +00:00
Eric Huss
a8e285aa18 Always allow hg to be missing on CI. 2022-08-02 15:18:16 -07:00
Eric Huss
7eb007ddbf Add reasons to all ignored tests. 2022-08-02 12:24:00 -07:00
Eric Huss
7858bebb0e Remove needless is_not_nightly closure. 2022-07-31 15:28:31 -07:00
Eric Huss
9d43ffc02a Remove CARGO_TEST_DISABLE_GIT_CLI
This appears to no longer be necessary since we have migrated to
GitHub Actions.
2022-07-30 19:36:58 -07:00
Eric Huss
1c3640e05c Add requirements to cargo_test. 2022-07-30 19:36:58 -07:00
Alex Crichton
c687d83ada Remove authors directives from Cargo crates
Most of these are pretty dated and Cargo defaults nowadays to not
emitting an `authors` field so this commit also removes them from the
manifests.
2021-10-22 10:27:20 -07:00
Alex Crichton
cabe1cca0a Upgrade Cargo to the 2021 edition
This didn't actually result in any code changes yet, for now this simply
flips the edition flag for all of our crates and documentation.
2021-10-22 10:25:52 -07:00
Vojtech Kral
53343bc398 Use CARGO_TARGET_TMPDIR in integration tests if available 2021-05-07 00:03:01 +02:00
Igor Makarov
37ec84d09a implement clippy suggestion to remove needless return 2019-11-12 10:21:21 +02:00
Alex Crichton
0dd79670d4 Add back a full integration test for -Zbuild-std
Only run these tests on one CI builder (not all platforms) though. This
is extremely resource intensive since it rebuilds libstd. Currently this
does not share a build directly like before because the number of tests
are supposed to be small, but if necessary we can add that in later too.
2019-09-16 11:47:09 -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
Alex Crichton
8887b67ec5 Optimize runtime of #[cargo_test_macro]
I've noticed recently that the incremental compile time for our test
suite has felt like it's increased quite a bit. I think one reason is
that everything has to go through `#[cargo_test_macro]` unconditionally
on all incremental builds, and wow do we have a lot of tests being
pumped through that macro.

Instrumenting the macro a little bit shows that we spend nearly 2.5
seconds on each compilation simply executing this macro (note that it's
in debug mode as well, not release since we typically don't execute
tests in release mode.

This commit instead drops the usage of `syn` and `quote` in favor of a
"raw procedural macro" which is much more optimized for just our use
case, even in debug mode. This drops the collective time spent in the
macro to 0.2 seconds, even in debug mode!
2019-07-19 11:07:01 -07:00
Matthias Krüger
51a56a452d format crates-io and cargo-test-macro subcrates 2019-06-23 00:29:52 +02:00