summary refs log tree commit diff
path: root/src/tools/compiletest
AgeCommit message (Collapse)AuthorLines
2018-09-12Really make CGU names unique across crates.Michael Woerister-13/+21
2018-09-04Breaking change upgradesMark Rousskov-1/+1
2018-08-23use String::new() instead of String::from(""), "".to_string(), "".to_owned() ↵Matthias Krüger-1/+1
or "".into()
2018-08-21Normalize source line and column numbers.David Wood-0/+7
This commit adds a normalization for line and column numbers in stderr files where the line/col is from the source directory rather than the test itself - thereby removing the need to update tests as compiler source changes.
2018-08-19Auto merge of #52972 - RalfJung:from_raw_parts_align, r=alexcrichtonbors-2/+4
debug_assert to ensure that from_raw_parts is only used properly aligned This does not help nearly as much as I would hope because everybody uses the distributed libstd which is compiled without debug assertions. For this reason, I am not sure if this is even worth it. OTOH, this would have caught the misalignment fixed by https://github.com/rust-lang/rust/issues/42789 *if* there had been any tests actually using ZSTs with alignment >1 (we have a CI runner which has debug assertions in libstd enabled), and it seems to currently [fail in the rg testsuite](https://ci.appveyor.com/project/rust-lang/rust/build/1.0.8403/job/v7dfdcgn8ay5j6sb). So maybe it is worth it, after all. I have seen the attribute `#[rustc_inherit_overflow_checks]` in some places, does that make it so that the *caller's* debug status is relevant? Is there a similar attribute for `debug_assert!`? That could even subsume `rustc_inherit_overflow_checks`: Something like `rustc_inherit_debug_flag` could affect *all* places that change the generated code depending on whether we are in debug or release mode. In fact, given that we have to keep around the MIR for generic functions anyway, is there ever a reason *not* to handle the debug flag that way? I guess currently we apply debug flags like `cfg` so this is dropped early during the MIR pipeline? EDIT: I learned from @eddyb that because of how `debug_assert!` works, this is not realistic. Well, we could still have it for the rustc CI runs and then maybe, eventually, when libstd gets compiled client-side and there is both a debug and a release build... then this will also benefit users.^^
2018-08-17Auto merge of #53356 - michaelwoerister:itlto, r=alexcrichtonbors-5/+28
Preliminary work for incremental ThinLTO (CGU name edition) Bring back the first half of #52266 but hopefully without the performance regression.
2018-08-15Fix compiletest JSON error messageashtneoi-2/+2
2018-08-15Adapt codegen-unit tests to new CGU naming scheme.Michael Woerister-5/+28
2018-08-14Rollup merge of #53229 - varkor:rlimits_min, r=nikomatsakiskennytm-7/+9
Make sure rlimit is only ever increased `libc::setrlimit` will fail if we try to set the rlimit to a value lower than it is currently, so make sure we're never trying to do this. Fixes #52801.
2018-08-14Fix no-link-with-link-args by introducing another normalization.David Wood-0/+5
2018-08-14Normalize test build directory and root build directory.David Wood-0/+9
2018-08-14Check error-patterns on UI tests. Fixes #52531.David Wood-21/+24
Previously, even if no expected errors were supplied, if a test execution failed then supplied error patterns would not be checked. This commit modifies the conditional that determines whether error patterns or expected errors are checked to remedy this. Further, this commit modifies the error pattern checking logic so that each pattern is checked against all lines of the string. This is required for UI tests as the stderr is in JSON format - all on one line - so in the previous implementation when the first pattern was found on the first line (which was actually the entire error) then no other patterns would be found on subsequent lines (as there weren't any).
2018-08-09Add a safety check for compiletest rlimitvarkor-7/+9
2018-08-06inore some codegen tests when debug assertions are enabledRalf Jung-2/+4
2018-08-05Fix stage 2 testsvarkor-1/+0
2018-08-01Auto merge of #52937 - pietroalbini:rollup, r=pietroalbinibors-0/+1
Rollup of 30 pull requests Successful merges: - #52340 (Document From trait implementations for OsStr, OsString, CString, and CStr) - #52628 (Cleanup some rustdoc code) - #52732 (Remove unstable and deprecated APIs) - #52745 (Update clippy to latest master) - #52771 (Clarify thread::park semantics) - #52778 (Improve readability of serialize.rs) - #52810 ([NLL] Don't make "fake" match variables mutable) - #52821 (pretty print for std::collections::vecdeque) - #52822 (Fix From<LocalWaker>) - #52824 (Fix -Wpessimizing-move warnings in rustllvm/PassWrapper) - #52825 (Make sure #47772 does not regress) - #52831 (remove references to AUTHORS.txt file) - #52842 (update comment) - #52846 (Add timeout to use of `curl` in bootstrap.py.) - #52851 (Make the tool_lints actually usable) - #52853 (Improve bootstrap help on stages) - #52859 (Use Vec::extend in SmallVec::extend when applicable) - #52861 (Add targets for HermitCore (https://hermitcore.org) to the Rust compiler and port libstd to it.) - #52867 (releases.md: fix 2 typos) - #52870 (Implement Unpin for FutureObj and LocalFutureObj) - #52876 (run-pass/const-endianness: negate before to_le()) - #52878 (Fix wrong issue number in the test name) - #52883 (Include lifetime in mutability suggestion in NLL messages) - #52888 (Use suggestions for shell format arguments) - #52904 (NLL: sort diagnostics by span) - #52905 (Fix a typo in unsize.rs) - #52907 (NLL: On "cannot move out of type" error, print original before rewrite) - #52914 (Only run the sparc-abi test on sparc) - #52918 (Backport 1.27.2 release notes) - #52929 (Update compatibility note for 1.28.0 to be correct) Failed merges: r? @ghost
2018-07-30rustc: Disallow machine applicability in foreign macrosAlex Crichton-2/+17
Recent changes to lints disallowed lints from being emitted against code located in foreign macros, except for future-incompatible lints. For a future incompatible lint, however, the automatic suggestions may not be applicable! This commit updates this code path to force all applicability suggestions made to foreign macros to never be `MachineApplicable`. This should avoid rustfix actually attempting fixing these suggestions, causing non-compiling code to be produced. Closes rust-lang/cargo#5799
2018-07-30Add targets for HermitCore (https://hermitcore.org) to the Rust compiler and ↵Colin Finck-0/+1
port libstd to it. As a start, the port uses the simplest possible configuration (no jemalloc, abort on panic) and makes use of existing Unix-specific code wherever possible. It adds targets for x86_64 (current main HermitCore platform) and aarch64 (HermitCore platform under development). Together with the patches to "liblibc" and "llvm", this enables HermitCore applications to be written in Rust.
2018-07-28Update the Cargo submodule and rustfixAlex Crichton-3/+7
Should hopefully bring in a few more `cargo fix`-related fixes.
2018-07-27Auto merge of #52336 - ishitatsuyuki:dyn-rollup, r=Mark-Simulacrumbors-4/+4
Rollup of bare_trait_objects PRs All deny attributes were moved into bootstrap so they can be disabled with a line of config. Warnings for external tools are allowed and it's up to the tool's maintainer to keep it warnings free. r? @Mark-Simulacrum cc @ljedrz @kennytm
2018-07-26compiletest: Add support for ignoring certain tests under `--compare-mode=...`Felix S. Klock II-2/+7
2018-07-25Add missing dynTatsuyuki Ishi-4/+4
2018-07-24Auto merge of #52181 - QuietMisdreavus:panicked-tester, r=GuillaumeGomezbors-5/+7
rustdoc: set panic output before starting compiler thread pool When the compiler was updated to run on a thread pool, rustdoc's processing of compiler/doctest stderr/stdout was moved into each compiler thread. However, this caused output of the test to be lost if the test failed at *runtime* instead of compile time. This change sets up the `set_panic` call and output bomb before starting the compiler thread pool, so that the `Drop` call that writes back to the test's stdout happens after the test runs, not just after it compiles. Fixes https://github.com/rust-lang/rust/issues/51162
2018-07-23Match errors using the callsite of macro expansionsFederico Poli-6/+32
2018-07-20compiletest: don't overwrite failure-status if it was previously setQuietMisdreavus-5/+7
2018-07-18rustc: distinguish compilation failure from ICEAndy Russell-9/+11
This commit changes the exit status of rustc to 1 in the presence of compilation errors. In the event of an unexpected panic (ICE) the standard panic error exit status of 101 remains. A run-make test is added to ensure that the exit code does not regress, and compiletest is updated to check for an exit status of 1 or 101, depending on the mode and suite. This is a breaking change for custom drivers. Fixes #51971.
2018-07-16Revert "Adapt codegen-unit tests to new CGU naming scheme."Michael Woerister-28/+5
This reverts commit 94b32adb71a75a3f5b53a39c52c62c2ce1a7cc56.
2018-07-13Auto merge of #52266 - michaelwoerister:incr-thinlto-preliminaries, ↵bors-5/+28
r=alexcrichton Preliminary work for incremental ThinLTO. Since implementing incremental ThinLTO is a bit more involved than I initially thought, I'm splitting out some of the things that already work. This PR (1) adds a way accessing some ThinLTO information in `rustc` and (2) does some cleanup around CGU/object file naming (which makes things quite a bit nicer). This is probably best reviewed one commit at a time.
2018-07-12Adapt codegen-unit tests to new CGU naming scheme.Michael Woerister-5/+28
2018-07-11make pretty source comparison check be fatal (fixes #52255)Tinco Andringa-4/+3
2018-07-06Dedupe filetimeBastien Orivel-1/+1
2018-06-26add edition compiletest header + fix testsmark-3/+12
2018-06-08compiletest: autoremove duplicate .nll.* files (#51204)Kyle Simpson-8/+51
UI tests in bless mode should now check to see if `.nll.*` files have a matching `.*` file. If a match is found, it will be deleted. This should be extensible to other modes (i.e., Polonius). On running with `--bless`, the two files removed in #51186 are, in turn, removed automatically.
2018-05-31compiletest: escape CXX the same way as CC for MSVCJohannes Nixdorf-1/+1
2018-05-30Run rustfmtSantiago Pastorino-45/+79
2018-05-30Add polonius compare modeSantiago Pastorino-2/+14
2018-05-24Auto merge of #50943 - oli-obk:cleanups, r=estebankbors-0/+9
impl Trait diagnostic/test cleanups
2018-05-22Update compiltest to use rustfix 0.3.1Pascal Hertleif-2/+4
2018-05-22Prevent local paths into libstd from leaking into ui testsOliver Schneider-0/+9
2018-05-19Auto merge of #50709 - alexcrichton:revert-musl, r=sfacklerbors-1/+1
Revert #50105 until regression is fixed Discovered at https://github.com/rust-lang/rust/pull/50105#issuecomment-388630750 it looks like this caused a regression with i686 musl, so let's revert in the meantime while a fix is worked out
2018-05-17Rollup merge of #50806 - oli-obk:gesundheit, r=ehussMark Simulacrum-34/+71
Add `bless` x.py subcommand for easy ui test replacement fixes #49815 r? @nikomatsakis
2018-05-17Revert "compiletest: escape CXX the same way as CC for MSVC"Alex Crichton-1/+1
This reverts commit 490d05055abd36521abc41c2e551ac789820e80f.
2018-05-17Update docs and diagnosticsOliver Schneider-5/+3
2018-05-17`bless` also produces `.nll` files nowOliver Schneider-1/+6
2018-05-17Add `bless` x.py subcommand for easy ui test replacementOliver Schneider-30/+64
2018-05-17Rename trans to codegen everywhere.Irina Popa-18/+18
2018-05-16Fix running multiple targets.Eric Huss-3/+4
The aux dir, which previously had the `stage_id` embedded in it, was picking up remnants from previous runs.
2018-05-16compiletest: Run revisions as independent tests.Eric Huss-155/+222
- The output of each test is now in its own directory. - "auxiliary" output is now under the respective test directory. - `stage_id` removed from filenames, and instead placed in the stamp file as a hash. This helps keep path lengths down for Windows. In brief, the new layout looks like this: ``` <build_base>/<relative_dir>/<testname>.<revision>.<mode>/ stamp <testname>.err <testname>.out a (binary) auxiliary/lib<auxname>.dylib auxiliary/<auxname>/<auxname>.err auxiliary/<auxname>/<auxname>.out ``` (revision and mode are optional)
2018-05-16compiletest: rustfmtEric Huss-232/+247
2018-05-15Fix run-make wasm testsEric Huss-1/+1
Fixes #50711