| Age | Commit message (Collapse) | Author | Lines |
|
This removes a version check for LLVM >=13, and specifies prefixes as a series
of independent `--check-prefix` flags instead of a single `--check-prefixes`.
|
|
|
|
|
|
Consistently refer to a test's `revision` instead of `cfg`
Compiletest allows a test file to specify multiple “revisions” (`//@ revisions: foo bar`), with each revision running as a separate test, and having the ability to define revision-specific headers (`//`@[foo]` ignore-blah`) and revision-specific code (`#[cfg(foo)]`).
The code that implements this feature sometimes uses the term “cfg” instead of “revision”. This results in two confusingly-different names for the same concept, one of which is ambiguous with other kinds of configuration (such as compiletest's own config).
This PR replaces those occurrences of `cfg` with `revision`, so that one name is used consistently.
|
|
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
```
|
|
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>
|
|
|
|
Compiletest code sometimes refers to a test's revision as its `cfg`. This
results in two different names for the same thing, one of which is ambiguous
with other kinds of configuration (such as compiletest's own config).
This patch replaces those occurrences of `cfg` with `revision`.
|
|
|
|
.fixed file exists
|
|
Move the extra directives for `Mode::CoverageRun` into `iter_header`
When these extra directives were ported over as part of #112300, it made sense to introduce `iter_header_extra` and pass them in as an extra argument.
But now that #120881 has added a `mode` parameter to `iter_header` for its own purposes, it's slightly simpler to move the coverage special-case code directly into `iter_header` as well. This lets us get rid of `iter_header_extra`.
|
|
bump some deps
First commit dedupes darling* crates and remove one more syn 1.* dep
Second one bumps windows crate to 0.52
|
|
|
|
When these extra directives were ported over as part of #112300, it made sense
to introduce `iter_header_extra` and pass them in as an extra argument.
But now that #120881 has added a `mode` parameter to `iter_header` for its own
purposes, it's slightly simpler to move the coverage special-case code directly
into `iter_header` as well. This lets us get rid of `iter_header_extra`.
|
|
|
|
|
|
|
|
compiletest: few naive improvements
Tested on `python x.py --stage=1 t tests/ui/borrowck/ --force-rerun`, see individual commits.
Wall time didn't improved :-) .
|
|
|
|
|
|
|
|
keeping order of inserted Paths having high cost on hot path, collect into HashSet instead and sort afterward.
from 1,858,963,938 to 1,448,975,825 I refs.
|
|
Also add tests for min-system-llvm-version.
|
|
Headers WAY less than 1kb anyway, so this can be improved more?
before
==18725== Total: 429,769,246 bytes in 957,259 blocks
==18725== At t-gmax: 8,058,316 bytes in 3,502 blocks
==18725== At t-end: 3,045,261 bytes in 1,097 blocks
==18725== Reads: 431,872,599 bytes
==18725== Writes: 214,738,653 bytes
after
==49344== Total: 201,418,575 bytes in 957,174 blocks
==49344== At t-gmax: 7,937,250 bytes in 3,310 blocks
==49344== At t-end: 3,035,637 bytes in 1,076 blocks
==49344== Reads: 431,607,448 bytes
==49344== Writes: 210,731,540 bytes
|
|
before:
==8812== Total: 2,374,977,159 bytes in 6,840,026 blocks
==8812== At t-gmax: 8,090,486 bytes in 3,389 blocks
==8812== At t-end: 3,185,454 bytes in 757 blocks
==8812== Reads: 1,873,472,286 bytes
==8812== Writes: 1,249,411,589 bytes
==11212== I refs: 6,370,244,180
after:
==18725== Total: 429,769,246 bytes in 957,259 blocks
==18725== At t-gmax: 8,058,316 bytes in 3,502 blocks
==18725== At t-end: 3,045,261 bytes in 1,097 blocks
==18725== Reads: 431,872,599 bytes
==18725== Writes: 214,738,653 bytes
==20839== I refs: 1,873,010,089
|
|
|
|
mir-opt and custom target fixes
From https://github.com/rust-lang/rust/issues/115642#issuecomment-1879589022
> > Could you please test the last two commits from https://github.com/onur-ozkan/rust/commits/panic-abort-mir-opt when you have the time? The first commit should resolve the error of using the nightly flag with a stable compiler, and the second one should resolve the custom target issue.
> I tested with the two commits and the errors of using nightly flag and custom target specs were not seen.
Testing was completed for the test suites like ui, run-pass-valgrind, coverage, mir-opt, codegen, assembly, incremental.
Fixes #115642
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
The code for anonymizing line numbers in coverage reports now supports the
slightly different line number syntax used by branch regions.
|
|
|
|
|
|
Normally, each test in `tests/coverage` is automatically run in both
`coverage-map` mode and `coverage-run` mode.
This new family of directives allows an individual test to specify that it
should not be run in a particular mode.
|
|
|
|
Switch from using `//~ERROR` annotations with `--error-format` to `error-pattern`
Fixes #118752
As noticed by ```@jyn514``` while working on a patch, tests failed due to `//~ERROR` annotations used in combination with the older `--error-format` which is now `error-pattern`.
|
|
`error-pattern`
Resolves Issue #118752
|
|
|
|
|
|
|
|
Add thinlto support to codegen, assembly and coverage tests
Using `--emit=llvm-ir` with thinlto usually result in multiple IR files.
Resolve test case failure issue reported in #113923.
|
|
|
|
r=wesleywiser
utilize stdlib debug assertion status in compiletest
Implemented a new flag `--with-debug-assertions` on compiletest to pass the stdlib debug assertion status from bootstrap.
Resolves #115171
|
|
|
|
Implemented a new flag, `--with-debug-assertions` on compiletest to pass the stdlib debug
assertion status from bootstrap.
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
Remove asmjs
Fulfills [MCP 668](https://github.com/rust-lang/compiler-team/issues/668).
`asmjs-unknown-emscripten` does not work as-specified, and lacks essential upstream support for generating asm.js, so it should not exist at all.
|
|
|
|
Add `std::hash::{DefaultHasher, RandomState}` exports (needs FCP)
This implements rust-lang/libs-team#267 to move the libstd hasher types to `std::hash` where they belong, instead of `std::collections::hash_map`.
<details><summary>The below no longer applies, but is kept for clarity.</summary>
This is a small refactor for #27242, which moves the definitions of `RandomState` and `DefaultHasher` into `std::hash`, but in a way that won't be noticed in the public API.
I've opened rust-lang/libs-team#267 as a formal ACP to move these directly into the root of `std::hash`, but for now, they're at least separated out from the collections code in a way that will make moving that around easier.
I decided to simply copy the rustdoc for `std::hash` from `core::hash` since I think it would be ideal for the two to diverge longer-term, especially if the ACP is accepted. However, I would be willing to factor them out into a common markdown document if that's preferred.
</details>
|
|
Allow configuring the parent GitHub repository
The git integration in build_helper hardcoded `rust-lang/rust` as the parent GitHub repository, and `master` as the branch name. This works great for `rust-lang/rust`, but causes problems in downstream forks like Ferrocene whenever those functions are invoked (like `./x fmt`).
In `src/stage0.json` there was already a configuration key for the name of the nightly branch, but it wasn't used by build_helper. This PR adds the `github_repository` key to the file, and requires both values to be passed to build_helper whenever a git function is called. This will allow downstream forks to tweak the values.
|
|
|
|
This makes it more consistent with the `coverage-map` mode and the shared
`tests/coverage` test directory.
|
|
coverage: Unify `tests/coverage-map` and `tests/run-coverage` into `tests/coverage`
Ever since the introduction of the `coverage-map` suite, it's been awkward to have to manage two separate coverage test directories containing dozens of mostly-identical files.
However, those two suites were separate for good reasons. They have very different requirements (since only one of them requires actually running the test program), running only one suite is noticeably faster than running both, and having separate suites allows them to be blessed separately if desired. So while unifying them was an obvious idea, actually doing so was non-trivial.
---
Nevertheless, this PR finds a way to merge the two suites into one directory while retaining almost all of the developer-experience benefits of having two suites. This required non-trivial implementations of `Step`, but the end result works very smoothly.
---
The first 5 commits are a copy of #117340, which has been closed in favour of this PR.
|