about summary refs log tree commit diff
path: root/src/tools/compiletest
AgeCommit message (Collapse)AuthorLines
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
2018-05-11Auto merge of #50105 - mixi:crt-included, r=alexcrichtonbors-1/+1
Use the correct crt*.o files when linking musl targets. This is supposed to support optionally using the system copy of musl libc instead of the included one if supported. This currently only affects the start files, which is enough to allow building rustc on musl targets. Most of the changes are analogous to crt-static. Excluding the start files is something musl based distributions usually patch into their copy of rustc: - https://github.com/alpinelinux/aports/blob/eb064c8/community/rust/musl-fix-linux_musl_base.patch - https://github.com/voidlinux/void-packages/blob/77400fc/srcpkgs/rust/patches/link-musl-dynamically.patch For third-party distributions that not yet carry those patches it would be nice if it was supported without the need to patch upstream sources. ## Reasons ### What breaks? Some start files were missed when originally writing the logic to swap in musl start files (gcc comes with its own start files, which are suppressed by -nostdlib, but not manually included later on). This caused #36710, which also affects rustc with the internal llvm copy or any other system libraries that need crtbegin/crtend. ### How is it fixed? The system linker already has all the logic to decide which start files to include, so we can just defer to it (except of course if it doesn't target musl). ### Why is it optional? In #40113 it was first tried to remove the start files, which broke compiling musl-targeting static binaries with a glibc-targeting compiler. This is why it eventually landed without removing the start files. Being an option side-steps the issue. ### Why are the start files still installed? This has the nice side-effect, that the produced rust-std-* binaries can still be used by on a glibc-targeting system with a rustc built against glibc. ## Does it work? With the following build script (using [musl-cross-make](https://github.com/richfelker/musl-cross-make)): https://shadowice.org/~mixi/rust-musl/build.sh, I was able to cross-compile a musl-host musl-targeting rustc on a glibc-based system. The resulting binaries are at https://shadowice.org/~mixi/rust-musl/binaries/. This also requires #50103 and #50104 (which are also applied to the branch the build script uses).
2018-05-11compiletest: escape CXX the same way as CC for MSVCJohannes Nixdorf-1/+1
2018-05-07Auto merge of #50000 - michaelwoerister:cross-lang-lto, r=alexcrichtonbors-7/+22
Add some groundwork for cross-language LTO. Implements part of #49879: - Adds a `-Z cross-lang-lto` flag to rustc - Makes sure that bitcode is embedded in object files if the flag is set. This should already allow for using cross language LTO for staticlibs (where one has to invoke the linker manually anyway). However, `rustc` will not try to enable LTO for its own linker invocations yet. r? @alexcrichton
2018-05-05Misc tweaksJohn Kåre Alsaker-2/+38
2018-05-04Fold rustfix tests back into the UI test suiteAlex Crichton-62/+44