summary refs log tree commit diff
path: root/src/tools/compiletest
AgeCommit message (Collapse)AuthorLines
2018-10-21Remove the parse-fail test suiteVadim Petrochenkov-8/+5
2018-10-18Rollup merge of #54964 - tromey:run-both-gdb-and-lldb-tests, r=nikomatsakiskennytm-47/+176
Run both lldb and gdb tests Currently lldb tests are run only on macOS, and gdb tests are only run elsewhere. This patch changes this to run tests depending on what is available. One test is changed, as it was previously marked as failing on macOS, whereas really it is a generic failure with lldb. Closes #54721
2018-10-17Change NLL compare mode to borrowck=migrate.David Wood-1/+1
This commit changes the NLL compare mode to pass `-Z borrowck=migrate` rather than `-Z borrowck=nll` to better test what will be deployed. It does not include the test output updates, as separation of these commits makes reviewing simpler.
2018-10-10Run both lldb and gdb testsTom Tromey-47/+176
Currently lldb tests are run only on macOS, and gdb tests are only run elsewhere. This patch changes this to run tests depending on what is available. One test is changed, as it was previously marked as failing on macOS, whereas really it is a generic failure with lldb. Closes #54721
2018-10-08Run debuginfo tests against rust-enabled lldb, when possibleTom Tromey-7/+44
If the rust-enabled lldb was built, then use it when running the debuginfo tests. Updating the lldb submodule was necessary as this needed a way to differentiate the rust-enabled lldb, so I added a line to the --version output. This adds compiletest commands to differentiate between the rust-enabled and non-rust-enabled lldb, as is already done for gdb. A new "rust-lldb" header directive is also added, but not used in this patch; I plan to use it in #54004. This updates all the tests.
2018-09-29Rollup merge of #54645 - tromey:android-gdb-version, r=alexcrichtonkennytm-203/+225
Compute Android gdb version in compiletest compiletest has special code for running gdb for Android targets. In particular it computes a different path to gdb. However, this gdb is not used for the version test, which results in some tests being run when they should not be. You can see this in #54004. This patch moves the special case to analyze_gdb and a new helper function to decide whether the case applies. This causes the version check to work properly. Note that the bulk of the runtest.rs change is just reindentation caused by moving from a "match" to an "if" -- but there is a (small) change buried in there.
2018-09-29Rollup merge of #54567 - tromey:paths-in-stamp-hashes, r=Mark-Simulacrumkennytm-0/+13
Include path in stamp hash for debuginfo tests The debuginfo tests are exposed to the environment in a couple of ways: the path to the gdb executable matters, as does the Python path used when loading lldb. This patch incorporates these paths into the hash that is written to the stamp file, so that changing the path will cause the tests to be re-run.
2018-09-28Compute Android gdb version in compiletestTom Tromey-203/+225
compiletest has special code for running gdb for Android targets. In particular it computes a different path to gdb. However, this gdb is not used for the version test, which results in some tests being run when they should not be. You can see this in #54004. This patch moves the special case to analyze_gdb and a new helper function to decide whether the case applies. This causes the version check to work properly. Note that the bulk of the runtest.rs change is just reindentation caused by moving from a "match" to an "if" -- but there is a (small) change buried in there.
2018-09-27Auto merge of #52319 - tinco:issue_12590, r=pnkfelixbors-5/+25
Track whether module declarations are inline (fixes #12590) To track whether module declarations are inline I added a field `inline: bool` to `ast::Mod`. The main use case is for pretty to know whether it should render the items associated with the module, but perhaps there are use cases for this information to not be forgotten in the AST.
2018-09-25Include path in stamp hash for debuginfo testsTom Tromey-0/+13
The debuginfo tests are exposed to the environment in a couple of ways: the path to the gdb executable matters, as does the Python path used when loading lldb. This patch incorporates these paths into the hash that is written to the stamp file, so that changing the path will cause the tests to be re-run.
2018-09-21Added comment above `Mode::RunPass` noting that it now behaves like `Mode::Ui`.Felix S. Klock II-0/+1
2018-09-21Make the `// skip-codegen` property apply to ui tests too.Felix S. Klock II-3/+4
2018-09-21you can have `// compile-pass` markers in headers of `compile-fail/` tests.Felix S. Klock II-1/+1
(It seems only `compile-fail-fulldeps/` exercises this functionality, unfortunately.)
2018-09-21Similar to above, failed to notice that `Mode::Incremental` delegates to ↵Felix S. Klock II-0/+12
`run_{rpass,rfail,cfail}_test`. (Also, maybe we should revise the names to make it clear that sometimes "cfail" means "cpass"...)
2018-09-21Mark `ParseFail` as tests that are not expected to compile.Felix S. Klock II-1/+1
(I did not notice earlier that `ParseFail` delegates to `fn run_cfail_test`.)
2018-09-21Provide way for ui tests to opt out of having their output checked.Felix S. Klock II-2/+28
Namely, this adds support for: * `// dont-check-compiler-stdout`, and * `// dont-check-compiler-stderr`. Obviously almost all ui tests wont want to opt into these, since the whole point of a ui test is to check the compiler ui. However, since this PR is converting run-pass into (another set of) ui tests, these header options make sense in that context. (Also this puts us into a better position for eventually turning *every* test suite into a ui test suite, by making ui-ness the default and forcing tests to opt out explicitly.)
2018-09-21Support `// skip-codegen` in header of ui testsFelix S. Klock II-1/+1
(just like how they behaved under previous run-pass semantics)
2018-09-21Make `src/test/run-pass/` act like an alternative `ui` test suite.Felix S. Klock II-6/+22
2018-09-12Really make CGU names unique across crates.Michael Woerister-13/+21
2018-09-10refactor so that it's no longer possible to call print_source incorrectlyTinco Andringa-11/+14
2018-09-10dont pass in src if we are not reading from stdin in compiletestTinco Andringa-1/+6
2018-09-10Update `compiletest` so that the pretty tests only read from stdin when they ↵Felix S. Klock II-4/+16
*have* to. This allows us to test expansion of files that use `mod foo;` syntax.
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