about summary refs log tree commit diff
path: root/src/tools/compiletest
AgeCommit message (Collapse)AuthorLines
2022-03-03bootstrap: correct reading of flags for llvmJon Gjengset-2/+13
First, this reverts the `CFLAGS`/`CXXFLAGS` of #93918. Those flags are already read by `cc` and populated into `Build` earlier on in the process. We shouldn't be overriding that based on `CFLAGS`, since `cc` also respects overrides like `CFLAGS_{TARGET}` and `HOST_CFLAGS`, which we want to take into account. Second, this adds the same capability to specify target-specific versions of `LDFLAGS` as we have through `cc` for the `C*` flags: https://github.com/alexcrichton/cc-rs#external-configuration-via-environment-variables Note that this also necessitated an update to compiletest to treat CXXFLAGS separately from CFLAGS.
2022-02-25Switch bootstrap cfgsMark Rousskov-2/+0
2022-02-24Include ignore message in libtest outputAntonio Yang-0/+4
As an example: #[test] #[ignore = "not yet implemented"] fn test_ignored() { ... } Will now render as: running 2 tests test tests::test_ignored ... ignored, not yet implemented test result: ok. 1 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 0.00s
2022-02-21reject compiler-flags as a compiletest attributeMichael Goulet-0/+5
2022-02-20compiletest: Print process output info with less whitespaceNixon Enraght-Moony-15/+19
Before: ``` error: jsondocck failed! status: exit status: 1 command: "/data/ne321/rust/build/x86_64-unknown-linux-gnu/stage0-tools-bin/jsondocck" "--doc-dir" "/data/ne321/rust/build/x86_64-unknown-linux-gnu/test/rustdoc-json/traits/supertrait" "--template" "/data/ne321/rust/src/test/rustdoc-json/traits/supertrait.rs" stdout: ------------------------------------------ ------------------------------------------ stderr: ------------------------------------------ Invalid command: Tried to use the previous path in the first command on line 10 Error: "Jsondocck failed for /data/ne321/rust/src/test/rustdoc-json/traits/supertrait.rs" ------------------------------------------ Rustdoc Output: status: exit status: 0 command: "/data/ne321/rust/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "-L" "/data/ne321/rust/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-L" "/data/ne321/rust/build/x86_64-unknown-linux-gnu/test/rustdoc-json/traits/supertrait/auxiliary" "-o" "/data/ne321/rust/build/x86_64-unknown-linux-gnu/test/rustdoc-json/traits/supertrait" "--deny" "warnings" "/data/ne321/rust/src/test/rustdoc-json/traits/supertrait.rs" "--output-format" "json" "-Zunstable-options" stdout: ------------------------------------------ ------------------------------------------ stderr: ------------------------------------------ ------------------------------------------ ``` After: ``` error: jsondocck failed! status: exit status: 1 command: "/data/ne321/rust/build/x86_64-unknown-linux-gnu/stage0-tools-bin/jsondocck" "--doc-dir" "/data/ne321/rust/build/x86_64-unknown-linux-gnu/test/rustdoc-json/traits/supertrait" "--template" "/data/ne321/rust/src/test/rustdoc-json/traits/supertrait.rs" stdout: none --- stderr ------------------------------- Invalid command: Tried to use the previous path in the first command on line 10 Error: "Jsondocck failed for /data/ne321/rust/src/test/rustdoc-json/traits/supertrait.rs" ------------------------------------------ Rustdoc Output: status: exit status: 0 command: "/data/ne321/rust/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "-L" "/data/ne321/rust/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-L" "/data/ne321/rust/build/x86_64-unknown-linux-gnu/test/rustdoc-json/traits/supertrait/auxiliary" "-o" "/data/ne321/rust/build/x86_64-unknown-linux-gnu/test/rustdoc-json/traits/supertrait" "--deny" "warnings" "/data/ne321/rust/src/test/rustdoc-json/traits/supertrait.rs" "--output-format" "json" "-Zunstable-options" stdout: none stderr: none ```
2022-02-18Rollup merge of #93953 - jackh726:known_bug, r=Mark-SimulacrumMatthias Krüger-221/+186
Add the `known-bug` test directive, use it, and do some cleanup cc rust-lang/compiler-team#476 Now tests can be annotated with `known-bug`, which should indicate that the test *should* pass (or at least that the current output is a bug). Adding it relaxes the requirement to add error annotations to the test (though it is still allowed). In the future, this could be extended with further relaxations - with the goal to make adding these tests need minimal effort. I've used this attribute for the GAT tests added in #93757. Finally, I've also cleaned up `header.rs` in compiletest a bit, by extracting out a bit of common logic. I've also split out some of the directives into their own consts. This removes a lot of very similar functions from `Config` and makes `TestProps::load_from` read nicer. I've split these into separate commits, so I in theory could split these into separate PRs if they're controversial, but I think they're pretty straightforward. r? ``@Mark-Simulacrum``
2022-02-16MemTagSanitizer SupportIvan Lozano-0/+5
Adds support for the LLVM MemTagSanitizer.
2022-02-14Don't allow error annotations in known-bug testsJack Huey-7/+11
2022-02-12Cleanup header parsing by extracting common logicJack Huey-229/+168
2022-02-12Add the known-bug compiletest propJack Huey-1/+23
2022-02-07Rollup merge of #93416 - name1e5s:chore/remove_allow_fail, r=m-ou-seMara Bos-1/+2
remove `allow_fail` test flag close #93345
2022-02-04Rollup merge of #93508 - CraftSpider:jsondocck-runtest-output, r=Mark-SimulacrumMatthias Krüger-5/+12
Add rustdoc info to jsondocck output Makes debugging issues in the generated output simpler by handling emitted logs and etc.
2022-02-01Add rustdoc info to jsondocck outputRune Tynan-5/+12
2022-01-28add allow_fail field in TestDesc to pass checkyuhaixin.hx-0/+2
2022-01-28remove allow_fail test flagyuhaixin.hx-1/+0
2022-01-21Auto merge of #92363 - the8472:less-compiletest-normalization, r=Mark-Simulacrumbors-65/+32
Override rustc version in ui and mir-opt tests to get stable hashes Building a dozen separate regexps for each test in compiletest consumes significant amounts of CPU cycles. UI test timings on my machine: OLD: 39.63s NEW: 30.27s
2022-01-21use lazy_static to compile `Regex::new` instances once instead on each testThe 8472-31/+32
2022-01-21Override rustc version in ui and mir-opt tests to get stable hashesThe 8472-34/+0
Building a dozen separate regexps for each test in compiletest consumes significant amounts of CPU cycles. Using `RUSTC_FORCE_INCR_COMP_ARTIFACT_HEADER` stabilizes hashes calcuated for the individual tests so no test-dependent normalization is needed. Hashes for the standard library still change so some normalizations are still needed.
2022-01-19Support --bless for pp-exact pretty printer testsDavid Tolnay-1/+13
2021-12-29Auto merge of #92309 - ehuss:remove-check_lines, r=Mark-Simulacrumbors-11/+0
compiletest: Remove some vestigial code The `check_lines` header is no longer parsed as a header, but instead inside the debuginfo tests. I believe this was changed in #13726.
2021-12-26compiletest: Remove some vestigial codeEric Huss-11/+0
2021-12-22Upgrade `tracing-subscriber`pierwill-1/+1
2021-12-13Add run-make-fulldeps testpierwill-0/+13
Implement RUSTC_FORCE_INCR_COMP_ARTIFACT_HEADER Also makes minor docs edits.
2021-12-13Include rustc version in `rustc_span::StableCrateId`pierwill-0/+53
Normalize symbol hashes in compiletest. Remove DefId sorting
2021-12-05Rollup merge of #91535 - Aaron1011:stabilize-future-incompat, r=nagisaMatthias Krüger-1/+2
Stabilize `-Z emit-future-incompat` as `--json future-incompat` The FCP was completed in https://github.com/rust-lang/rust/issues/71249
2021-12-04Stabilize `-Z emit-future-incompat` as `--json future-incompat`Aaron Hill-1/+2
2021-12-04Rollup merge of #91209 - camelid:snapshot, r=jyn514Matthias Krüger-6/+6
Implement `@snapshot` check for htmldocck This form of check allows performing snapshot tests (à la `src/test/ui`) on rustdoc HTML output, making it easier to create and update tests. See [this Zulip thread][1] for more information about the motivation for this change. [1]: https://zulip-archive.rust-lang.org/stream/266220-rustdoc/topic/HTML.20snapshot.20tests.html#262651142 r? `@GuillaumeGomez`
2021-12-01Implement `@snapshot` check for htmldocckNoah Lev-6/+6
This form of check allows performing snapshot tests (à la `src/test/ui`) on rustdoc HTML output, making it easier to create and update tests. See this Zulip thread [1] for more information about the motivation for this change. [1]: https://zulip-archive.rust-lang.org/stream/266220-rustdoc/topic/HTML.20snapshot.20tests.html#262651142
2021-11-26Deny warnings in rustdoc non-UI testsNoah Lev-0/+2
These warnings were silently ignored since they did not appear in a `.stderr` file and did not fail the test. With this change, warnings in tests are denied, causing the tests to fail if they have warnings. I will fix all the warnings that are now test failures next.
2021-11-07Auto merge of #90348 - Amanieu:asm_feature_gates, r=joshtriplettbors-2/+4
Add features gates for experimental asm features This PR splits off parts of `asm!` into separate features because they are not ready for stabilization. Specifically this adds: - `asm_const` for `const` operands. - `asm_sym` for `sym` operands. - `asm_experimental_arch` for architectures other than x86, x86_64, arm, aarch64 and riscv. r? `@nagisa`
2021-11-07Restrict tests that use needs-asm-support to non-experimentalAmanieu d'Antras-2/+4
architectures
2021-11-05Rollup merge of #90569 - wesleywiser:fix_only_i686_tests, r=Mark-SimulacrumMatthias Krüger-1/+1
Fix tests using `only-i686` to use the correct `only-x86` directive We translate `i686` to `x86` which means tests marked as `only-i686` never ran. Update those tests to use `only-x86`. We parse the `only-` architecture directive here https://github.com/rust-lang/rust/blob/27143a9094b55a00d5f440b05b0cb4233b300d33/src/tools/compiletest/src/util.rs#L160-L168 and we translate `i686` to `x86` here https://github.com/rust-lang/rust/blob/27143a9094b55a00d5f440b05b0cb4233b300d33/src/tools/compiletest/src/util.rs#L56
2021-11-04Fix tests using `only-i686` to use the correct `only-x86` directiveWesley Wiser-1/+1
We translate `i686` to `x86` which means tests marked as `only-i686` never ran. Update those tests to use `only-x86`.
2021-11-03Clean up some `-Z unstable-options` in tests.Eric Huss-6/+0
2021-10-20Add edition configuration to compiletestAndre Bogus-1/+12
2021-10-17Remove dead code from `compiletest::json`pierwill-2/+0
2021-10-09Simplified 3 ifs found by clippy.Nicholas-Baron-12/+10
2021-10-09Simplified two printlns picked out by clippyNicholas-Baron-2/+2
2021-10-09Move check_debugger_output to the debugger moduleNicholas-Baron-64/+69
2021-10-09Move DebuggerCommands to its own fileNicholas-Baron-48/+71
2021-10-08Move read2_abbreviated function into read2.rsNicholas-Baron-70/+73
2021-10-07Rollup merge of #89082 - smoelius:master, r=kennytmJubilee-0/+2
Implement #85440 (Random test ordering) This PR adds `--shuffle` and `--shuffle-seed` options to `libtest`. The options are similar to the [`-shuffle` option](https://github.com/golang/go/blob/c894b442d1e5e150ad33fa3ce13dbfab1c037b3a/src/testing/testing.go#L1482-L1499) that was recently added to Go. Here are the relevant parts of the help message: ``` --shuffle Run tests in random order --shuffle-seed SEED Run tests in random order; seed the random number generator with SEED ... By default, the tests are run in alphabetical order. Use --shuffle or set RUST_TEST_SHUFFLE to run the tests in random order. Pass the generated "shuffle seed" to --shuffle-seed (or set RUST_TEST_SHUFFLE_SEED) to run the tests in the same order again. Note that --shuffle and --shuffle-seed do not affect whether the tests are run in parallel. ``` Is an RFC needed for this?
2021-10-03Make write_rustdoc_diff a more generic functionNicholas-Baron-8/+21
2021-10-03Extract a portion of diff writing code to separate functionNicholas-Baron-38/+50
2021-10-02Move items related to computing diffs to a separate fileNicholas-Baron-106/+109
2021-09-29Implement #85440Samuel E. Moelius III-0/+2
2021-09-23Support incremental in compiletest for non-incremental modes.Eric Huss-32/+56
2021-09-22Rollup merge of #89170 - rusticstuff:aarch64_macos_disable_leak_sanitizer, ↵the8472-1/+2
r=petrochenkov Disable the leak sanitizer on Macos aarch64 for now It is currently broken, see #88132.
2021-09-22Disable the leak sanitizer on Macos aarch64 for now.Hans Kratz-1/+2
It is currently broken, see #88132.
2021-09-20Migrate to 2021Mark Rousskov-1/+1