summary refs log tree commit diff
path: root/src/tools/compiletest
AgeCommit message (Collapse)AuthorLines
2024-01-23Remove support for no-system-llvmNikita Popov-12/+12
Also add tests for min-system-llvm-version.
2024-01-18Warn when no profiler runtime means coverage tests won't be run/blessedZalathar-0/+9
2024-01-09Rollup merge of #119619 - onur-ozkan:panic-abort-mir-opt, r=oli-obkMatthias Krüger-12/+33
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
2024-01-08detect user-specified custom targets in compiletestonur-ozkan-12/+33
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-01-07coverage: Anonymize line numbers in branch viewsZalathar-3/+93
The code for anonymizing line numbers in coverage reports now supports the slightly different line number syntax used by branch regions.
2024-01-05Allow coverage tests to enable `llvm-cov --use-color`Zalathar-0/+11
2024-01-05Extract a `split_flags` helper in header directive parsingZalathar-9/+16
2024-01-05Allow tests to ignore individual test modesZalathar-3/+36
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.
2024-01-05Check for profiler support via a flag, instead of an environment varZalathar-1/+26
2024-01-04Rollup merge of #119184 - Rajveer100:branch-for-issue-118752, r=davidtwcoMatthias Krüger-11/+17
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`.
2023-12-21Switch from using `//~ERROR` annotations with `--error-format` to ↵Rajveer-11/+17
`error-pattern` Resolves Issue #118752
2023-12-21Enable -Zlint-mir by default for mir-opt testsTomasz Miąsko-0/+1
2023-12-14update use of feature flagslcnr-2/+2
2023-12-07also print 'immutable' flagRalf Jung-2/+5
2023-11-30Auto merge of #118036 - DianQK:thinlto-tests, r=tmiaskobors-15/+55
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.
2023-11-30Add thinlto support to codegen, assembly and coverage testsDianQK-15/+55
2023-11-29Auto merge of #118132 - onur-ozkan:stdlib-assertion-status-to-compiletest, ↵bors-2/+8
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
2023-11-24Replace `option.map(cond) == Some(true)` with `option.is_some_and(cond)`David Tolnay-1/+1
2023-11-21utilize stdlib debug assertion status in compiletestonur-ozkan-2/+8
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>
2023-11-17Rollup merge of #117338 - workingjubilee:asmjs-meets-thanatos, r=b-naberMatthias Krüger-15/+1
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.
2023-11-15Re-format code with new rustfmtMark Rousskov-3/+1
2023-11-11Auto merge of #115694 - clarfonthey:std-hash-private, r=dtolnaybors-2/+1
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>
2023-11-09Auto merge of #117122 - ferrocene:pa-configure-git-diff, r=albertlarsan68bors-3/+20
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.
2023-11-09fmtPietro Albini-4/+1
2023-11-08coverage: Rename the `run-coverage` test mode to `coverage-run`Zalathar-11/+11
This makes it more consistent with the `coverage-map` mode and the shared `tests/coverage` test directory.
2023-11-08Auto merge of #117484 - Zalathar:tests, r=cjgillotbors-5/+15
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.
2023-11-07coverage: Give each coverage test mode a separate output directoryZalathar-2/+12
When multiple test modes share the same test directory, this will allow them to avoid interfering with each others' files and timestamps.
2023-11-07coverage: Copy all remaining run-coverage tests into coverage-mapZalathar-1/+1
These multi-file tests were not copied over in #114843 because they weren't working, but it turns out that they just need the correct crate-type.
2023-11-07coverage: Use `-Copt-level=2` by default in run-coverage testsZalathar-2/+2
This is a step towards being able to unify the two coverage test directories. There are two tests that require adjustment: - `overflow.rs` requires an explicit `-Coverflow-checks=yes` - `sort_groups.rs` is sensitive to provably unused instantiations
2023-11-06Allow tests with rust-rustfix and revisionsMatthew Jasper-1/+1
2023-11-06rename github_repository to git_repositoryPietro Albini-5/+5
2023-11-02Add insta-stable std::hash::{DefaultHasher, RandomState} exportsltdk-2/+1
2023-10-28Remove asmjs from toolsJubilee Young-15/+1
2023-10-27Don't provide `rust-demangler` to run-make testsZalathar-4/+0
The demangler was only needed by coverage tests, but those tests were migrated into their own custom test mode in #112300. This avoids having to build the demangler just for run-make tests. It will still be built as needed by run-coverage tests or for other purposes.
2023-10-25compiletest: Display compilation errors in mir-opt testsTomasz Miąsko-1/+1
2023-10-24allow configuring the parent GitHub repositoryPietro Albini-3/+23
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 commit 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.
2023-10-23Fix comment: coverage-map tests compile to LLVM IR, not MIRZalathar-1/+1
2023-10-19Allow to run filecheck in mir-opt tests.Camille GILLOT-39/+26
2023-10-16Stop trying to preserve pretty-printing.Camille GILLOT-17/+17
2023-10-16Elaborate comment.Camille GILLOT-0/+2
2023-10-16Motivate renumbering and avoid underflow.Camille GILLOT-3/+6
2023-10-16Normalize alloc-id in tests.Camille GILLOT-0/+29
2023-10-14Auto merge of #116407 - Mark-Simulacrum:bootstrap-bump, r=onur-ozkanbors-11/+8
Bump bootstrap compiler to just-released beta https://forge.rust-lang.org/release/process.html#master-bootstrap-update-t-2-day-tuesday
2023-10-08compiletest: add a way to specify params with spacesMichael Howell-1/+9
This use single quotes, because those aren't used in params, while double quotes are and would be tougher to parse.
2023-10-08Bump to latest betaMark Rousskov-11/+8
2023-10-08linker: Remove `-Zgcc-ld` optionVadim Petrochenkov-2/+2
It is subsumed by `-Clinker-flavor=*-lld-cc -Clink-self-contained=+linker` options now
2023-09-29add needs-relocation-model-pic to compiletestPietro Albini-0/+11
2023-09-21compiletest: load supports-xray from target specTomasz Miąsko-15/+3
2023-09-21compiletest: load supported sanitizers from target specTomasz Miąsko-101/+31
2023-09-21compiletest: use builder pattern to construct Config in testsTomasz Miąsko-93/+141