16 Commits

Author SHA1 Message Date
Ross Sullivan
92d9a94d02
chore: Migrated testsuite to testsuite::prelude 2025-06-25 22:37:24 +09:00
Ed Page
af3cfd5abe fix(test): Un-deprecate contains assertions 2024-11-07 15:55:35 -06:00
Ed Page
e72ef0b10f test: Migrate remaining with_stdout/with_stderr calls 2024-09-23 20:44:14 -05:00
Ed Page
a6cf1be655 test: Switch from allow to expect deprecated
This caught a couple of lingering items.
2024-09-23 20:44:06 -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
Esteban Küber
af3f95d3a3 Change tests to support rustc wording changes
Between https://github.com/rust-lang/rust/pull/126810 and https://github.com/rust-lang/rust/pull/126810
the output of `rustc` for resolution errors is going to change in such a
way that some existing cargo tests will fail. Change them to support
both the current and future output, so that those PRs can land in
`rustc`.
2024-06-25 01:16:48 +00:00
Heng-Yi Wu
efbcbb0af7
test: migrate testsuite message_format to snapbox
This reverts commit 2fbba5300c94237960540e176cdc9b0c829d0022.
2024-06-20 19:59:53 +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
Scott Schafer
8f4f77e894 chore: update message_format tests to use check 2023-02-20 12:21:27 -06:00
Eric Huss
d774f1f331 Bump to 0.54.0 2021-03-26 12:28:47 -07:00
Alexis Bourget
83b353bc9b Test the passing of --error-format to rustdoc 2021-02-14 18:01:50 +01:00
Eric Huss
c889bbfba8 Add "build-finished" JSON message. 2020-04-04 18:56:50 -07:00
Eric Huss
83571aee56 Minor testsuite organization. 2019-11-24 18:42:45 -08:00
Alex Crichton
61fb34b0c0 Allow a number of tests to run on stable
These tests all relied on support which has now ridden to stable at this
point, so let's let them run on stable!
2019-09-26 11:31:57 -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
45699e9f21 Add support for customizing JSON diagnostics from Cargo
Cargo has of #7143 enabled pipelined compilation by default which
affects how the compiler is invoked, especially with respect to JSON
messages. This, in some testing, has proven to cause quite a few issues
with rustbuild's current integration with Cargo. This commit is aimed at
adding features to Cargo to solve this issue.

This commit adds the ability to customize the stream of JSON messages
coming from Cargo. The new feature for Cargo is that it now also mirrors
rustc in how you can configure the JSON stream. Multiple
`--message-format` arguments are now supported and the value specified
is a comma-separated list of directives. In addition to the existing
`human`, `short`, and `json` directives these new directives have been
added:

* `json-render-diagnostics` - instructs Cargo to render rustc
  diagnostics and only print out JSON messages for artifacts and Cargo
  things.

* `json-diagnostic-short` - indicates that the `rendered` field of rustc
  diagnostics should use the "short" rendering.

* `json-diagnostic-rendered-ansi` - indicates that the `rendered` field of rustc
  diagnostics should embed ansi color codes.

The first option here, `json-render-diagnostics`, will be used by
rustbuild unconditionally. Additionally `json-diagnostic-short` will be
conditionally used based on the input to rustbuild itself.

This should be enough for external tools to customize how Cargo is
invoked and how all kinds of JSON diagnostics get printed, and it's
thought that we can relatively easily tweak this as necessary to extend
it and such.
2019-08-05 12:49:51 -07:00