Commit Graph

19 Commits

Author SHA1 Message Date
Zalathar
59c4dfe59d Forbid //@ compile-flags: -Cincremental= in tests
Tests should not try to manually enable incremental compilation with
`-Cincremental`, because that typically results in stray directories being
created in the repository root.

Instead, use the `//@ incremental` directive, which instructs compiletest to
handle the details of passing `-Cincremental` with a fresh directory.
2025-10-02 11:16:03 +10:00
Mads Marquart
37be93497e Fix test suite in iOS/tvOS/watchOS/visionOS simulator 2025-09-19 13:55:03 +02:00
Scott Schafer
aa9767290e feat: Right align line numbers 2025-07-28 16:32:11 -06:00
dianqk
0952f86de3 Rollup merge of #143118 - Kivooeo:tf15, r=tgross35
`tests/ui`: A New Order [15/N]

> [!NOTE]
>
> Intermediate commits are intended to help review, but will be squashed prior to merge.

Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895.

r? `@jieyouxu`
2025-06-30 19:23:17 +08:00
Kivooeo
580bc12844 cleaned up some tests 2025-06-30 11:16:18 +05:00
Trevor Gross
74657a4a1a Move some UI tests to more apropriate directories
Prepare for rework done in the rest of [PR143118].

[PR143118]: https://www.github.com/rust-lang/rust/pull/143118

Co-authored-by: Kivooeo <Kivooeo123@gmail.com>
2025-06-28 19:07:29 -05:00
Vadim Petrochenkov
7a4f09c224 compiletest: Improve diagnostics for line annotation mismatches 2025-06-23 21:30:56 +03:00
Vadim Petrochenkov
56d6b4e427 compiletest: Support matching on non-json lines in compiler output
and migrate most of remaining `error-pattern`s to it.
2025-05-04 18:27:45 +03:00
xizheyin
d054690049 Unify the format of rustc cli flags
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-04-24 12:54:40 +08:00
Zalathar
34e97592f4 compiletest: Trim whitespace from environment variable names 2025-04-08 21:31:53 +10:00
Zalathar
ef19017f7c compiletest: Self-test for normalize-* with revisions 2024-12-28 13:57:13 +11:00
许杰友 Jieyou Xu (Joe)
0bbe07e8ff tests/ui: add minicore compiletest self-test 2024-10-31 18:20:11 +08:00
George Bateman
ae75a9b33a Update expectations 2024-08-11 09:58:11 +01:00
许杰友 Jieyou Xu (Joe)
5dc276c0da compiletest: properly handle revisioned run-rustfix tests 2024-04-07 17:06:15 +00:00
Martin Nordholts
a2a2f30415 test-aux-bin.rs: Clarify that it is aux-bin that blocks cross-compile run-pass 2024-03-25 06:23:35 +01:00
Martin Nordholts
3a5eb35577 compiletest: Add support for //@ aux-bin: foo.rs
Which enables ui tests to use auxiliary binaries. See the added
self-test for an example.
2024-03-19 16:37:34 +01:00
David Wood
a2aa9672f6 compiletest: support auxiliaries with auxiliaries
To test behaviour that depends on the extern options of intermediate
crates, compiletest auxiliaries must have their own auxiliaries.

Auxiliary compilation previously did not trigger compilation of any
auxiliaries in the auxiliary's headers. In addition, those auxiliaries
would need to be in an `auxiliary/auxiliary` directory, which is
unnecessary and makes some crate graphs harder to write tests for,
such as when A depends on B and C, and B depends on C.

For a test `tests/ui/$path/root.rs`, with the following crate graph:

```
root
|-- grandparent
`-- parent
    `-- grandparent
```

then the intermediate outputs from compiletest will be:

```
build/$target/test/ui/$path/
|-- auxiliary
|   |-- libgrandparent.dylib
|   |-- libparent.dylib
|   |-- grandparent
|   |   |-- grandparent.err
|   |   `-- grandparent.out
|   `-- parent
|       |-- parent.err
|       `-- parent.out
|-- libroot.rmeta
|-- root.err
`-- root.out
```

Signed-off-by: David Wood <david@davidtw.co>
2024-02-21 14:37:13 +00:00
许杰友 Jieyou Xu (Joe)
ec2cc761bc [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
Albert Larsan
cf2dff2b1e Move /src/test to /tests 2023-01-11 09:32:08 +00:00