about summary refs log tree commit diff
path: root/src/tools/compiletest
AgeCommit message (Collapse)AuthorLines
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
2021-09-17compiletest: Add m68k to ARCH_TABLEJohn Paul Adrian Glaubitz-0/+1
2021-08-26compiletest: allow `.` in remote test paths (can arise from revisions).Eduard-Mihai Burtescu-1/+1
2021-08-22Fix typos “a”→“an”Frank Steffahn-1/+1
2021-08-03Add x.py option to --force-rerun compiletest testsSmitty-7/+15
2021-07-29rfc3052: Remove authors field from Cargo manifestsJade-1/+0
Since RFC 3052 soft deprecated the authors field anyway, hiding it from crates.io, docs.rs, and making Cargo not add it by default, and it is not generally up to date/useful information, we should remove it from crates in this repo.
2021-07-27Auto merge of #83491 - jyn514:remove-pretty, r=pnkfelixbors-2/+2
Remove unstable `--pretty` flag It doesn't do anything `--unpretty` doesn't, and due to a bug, also didn't show up in `--help`. I don't think there's any reason to keep it around, I haven't seen anyone using it. Closes https://github.com/rust-lang/rust/issues/36473.
2021-07-14Add -Zfuture-incompat-test to assist with testing future-incompat reports.Eric Huss-4/+1
2021-07-03Support pretty printing slices using GDBEFanZh-2/+2
2021-06-30Improve debug symbol names to avoid ambiguity and work better with MSVC's ↵Daniel Paoliello-7/+19
debugger There are several cases where names of types and functions in the debug info are either ambiguous, or not helpful, such as including ambiguous placeholders (e.g., `{{impl}}`, `{{closure}}` or `dyn _'`) or dropping qualifications (e.g., for dynamic types). Instead, each debug symbol name should be unique and useful: * Include disambiguators for anonymous `DefPathDataName` (closures and generators), and unify their formatting when used as a path-qualifier vs item being qualified. * Qualify the principal trait for dynamic types. * If there is no principal trait for a dynamic type, emit all other traits instead. * Respect the `qualified` argument when emitting ref and pointer types. * For implementations, emit the disambiguator. * Print const generics when emitting generic parameters or arguments. Additionally, when targeting MSVC, its debugger treats many command arguments as C++ expressions, even when the argument is defined to be a symbol name. As such names in the debug info need to be more C++-like to be parsed correctly: * Avoid characters with special meaning (`#`, `[`, `"`, `+`). * Never start a name with `<` or `{` as this is treated as an operator. * `>>` is always treated as a right-shift, even when parsing generic arguments (so add a space to avoid this). * Emit function declarations using C/C++ style syntax (e.g., leading return type). * Emit arrays as a synthetic `array$<type, size>` type. * Include a `$` in all synthetic types as this is a legal character for C++, but not Rust (thus we avoid collisions with user types).
2021-06-28Update to new bootstrap compilerMark Rousskov-2/+0
2021-06-24compiletest: ignore tests on a per-revision basisSimonas Kazlauskas-343/+296
Otherwise something that ought to seemingly work like `//[x86] needs-llvm-components: x86` or `//[nll_beyond]should-fail` do not get evaluated properly.
2021-06-20compiletest: display the error if rustfix failsEric Huss-2/+5
2021-06-20Update rustfix for compiletest.Eric Huss-1/+1
2021-06-11Auto merge of #85961 - 1000teslas:issue-71519-fix, r=petrochenkovbors-0/+13
MVP for using rust-lld as part of cc Will fix #71519. I need to figure out how to write a test showing that lld is used instead of whatever linker cc normally uses. When I manually run rustc using `echo 'fn main() {}' | RUSTC_LOG=rustc_codegen_ssa::back::link=debug ./rustc -Clinker-flavor=gcc-lld --crate-type bin -Clink-arg=-Wl,-v` (thanks to bjorn3 on Zulip), I can see that lld is used, but I'm not sure how to inspect that output in a test.
2021-06-10Auto merge of #86098 - pietroalbini:test-stable, r=Mark-Simulacrumbors-1/+22
Add the x86_64-gnu-stable builder During the 1.52 release process we had to deal with some commits that passed the test suite on the nightly branch but failed on the beta or stable branch. In that case it was due to some UI tests including the channel name in the output, but other changes might also be dependent on the channel. This commit adds a new CI job that runs the Linux x86_64 test suite with the stable branch, ensuring nightly changes also work as stable. To ensure the new job works the following other changes are present: * The `ui-fulldeps/session-derive-errors.rs` test has been disabled on beta and stable, which required adding support for `// ignore-{channel}` and `// only-{channel}`. * The `rustdoc/intra-doc/field.rs` has been fixed. r? `@Mark-Simulacrum` fixes https://github.com/rust-lang/release-team/issues/11
2021-06-10Auto merge of #82639 - jyn514:stable-options, r=Mark-Simulacrumbors-0/+6
Don't pass -Z unstable-options by default for UI tests Unconditionally passing -Z unstable-options makes it impossible to test whether an option requires unstable-options or not. This uncovered quite a lot of bugs, I'll open issues for each. These don't strictly need to be fixed before this is merged, it just makes the diff much larger because of the changes to diagnostics. - https://github.com/rust-lang/rust/issues/82636 - https://github.com/rust-lang/rust/issues/82637 - https://github.com/rust-lang/rust/issues/82638
2021-06-10gcc-lld mvp1000teslas-0/+13
ignore test if rust-lld not found create ld -> rust-lld symlink at build time instead of run time for testing in ci copy instead of symlinking remove linux check test for linker, suggestions from bjorn3 fix overly restrictive lld matcher use -Zgcc-ld flag instead of -Clinker-flavor refactor code adding lld to gcc path revert ci changes suggestions from petrochenkov rename gcc_ld to gcc-ld in dirs
2021-06-10Rollup merge of #85997 - jyn514:rustdoc-diff, r=Mark-SimulacrumYuki Okushi-9/+21
rustdoc: Print a warning if the diff when comparing to old nightlies is empty This avoids confusing situations where it's unclear whether there's a bug in the diff tool or not: ``` 26: `@has` check failed `XPATH PATTERN` did not match // `@has` - '//code/a[`@href="{{channel}}/std/primitive.i32.html"]'` 'i32' Encountered 6 errors ------------------------------------------ info: generating a diff against nightly rustdoc failures: [rustdoc] rustdoc/primitive-reexport.rs ```
2021-06-07ignore ui-fulldeps/session-derive-errors.rs on beta and stablePietro Albini-1/+22
The session-derive-errors test ensures the internal SessionDiagnostic derive macro outputs the right error messages when misused. The macro relies on the proc_macro2 crate though, which changes its span behavior depending on whether the channel is nightly or not. This caused test failures when bumping the channel from nightly to beta/stable. Since SessionDiagnostic is internal-only we don't care about its diagnostics quality outside of nightly, as the compiler itself is developed on nightly. Thus the easiest solution is to ignore that test on the beta and stable channels. This also implements `// only-{channel}` and `// ignore-{channel}` in compiletest to properly support the change.