about summary refs log tree commit diff
path: root/src/tools/compiletest
AgeCommit message (Collapse)AuthorLines
2020-07-19Extract closure to functionLzu Tao-4/+8
2020-07-19Use Option::as_derefLzu Tao-5/+3
2020-07-19Fix panic as passing wrong format to `extract_gdb_version`Lzu Tao-11/+8
2020-07-19compiletest: Rewrite extract_gdb_version functionLzu Tao-63/+28
2020-07-19compiletest: Rewrite extract_lldb_version functionLzu Tao-76/+50
This makes extract_lldb_version has the same version type like extract_gdb_version. This is technically a breaking change for rustc-dev users. But note that rustc-dev is a nightly component.
2020-07-19Auto merge of #74091 - richkadel:llvm-coverage-map-gen-4, r=tmandrybors-0/+12
Generating the coverage map @tmandry @wesleywiser rustc now generates the coverage map and can support (limited) coverage report generation, at the function level. Example commands to generate a coverage report: ```shell $ BUILD=$HOME/rust/build/x86_64-unknown-linux-gnu $ $BUILD/stage1/bin/rustc -Zinstrument-coverage \ $HOME/rust/src/test/run-make-fulldeps/instrument-coverage/main.rs $ LLVM_PROFILE_FILE="main.profraw" ./main called $ $BUILD/llvm/bin/llvm-profdata merge -sparse main.profraw -o main.profdata $ $BUILD/llvm/bin/llvm-cov show --instr-profile=main.profdata main ``` ![rust coverage report only 20200706](https://user-images.githubusercontent.com/3827298/86697299-1cbe8f80-bfc3-11ea-8955-451b48626991.png) r? @wesleywiser Rust compiler MCP rust-lang/compiler-team#278 Relevant issue: #34701 - Implement support for LLVMs code coverage instrumentation
2020-07-17Generating the coverage mapRich Kadel-0/+12
rustc now generates the coverage map and can support (limited) coverage report generation, at the function level. Example: $ BUILD=$HOME/rust/build/x86_64-unknown-linux-gnu $ $BUILD/stage1/bin/rustc -Zinstrument-coverage \ $HOME/rust/src/test/run-make-fulldeps/instrument-coverage/main.rs $ LLVM_PROFILE_FILE="main.profraw" ./main called $ $BUILD/llvm/bin/llvm-profdata merge -sparse main.profraw -o main.profdata $ $BUILD/llvm/bin/llvm-cov show --instr-profile=main.profdata main 1| 1|pub fn will_be_called() { 2| 1| println!("called"); 3| 1|} 4| | 5| 0|pub fn will_not_be_called() { 6| 0| println!("should not have been called"); 7| 0|} 8| | 9| 1|fn main() { 10| 1| let less = 1; 11| 1| let more = 100; 12| 1| 13| 1| if less < more { 14| 1| will_be_called(); 15| 1| } else { 16| 1| will_not_be_called(); 17| 1| } 18| 1|}
2020-07-17Allow matching test by target and envMateusz Mikuła-0/+1
2020-07-08Avoid "blacklist"Tamir Duberstein-5/+1
Other terms are more inclusive and precise. Clippy still has a lint named "blacklisted-name", but renaming it would be a breaking change, so is left for future work. The target configuration option "abi-blacklist" has been depreciated and renamed to "unsupported-abis". The old name continues to work.
2020-06-28allow aux builds in rustdoc-ui modeAndy Russell-2/+4
2020-06-27Rollup merge of #73525 - cuviper:llvm11, r=nikicManish Goregaokar-1/+1
Prepare for LLVM 11 These are just the code changes needed to build with the current LLVM master (version 11). r? @nikic
2020-06-25Support configurable deny-warnings for all in-tree crates.Eric Huss-1/+0
2020-06-25Prepare for LLVM 11Josh Stone-1/+1
2020-06-23Remove unused crate imports in 2018 edition cratesyuqio-5/+0
2020-06-21Auto merge of #72936 - jackh726:chalk-more, r=nikomatsakisbors-0/+7
Upgrade Chalk Things done in this PR: - Upgrade Chalk to `0.11.0` - Added compare-mode=chalk - Bump rustc-hash in `librustc_data_structures` to `1.1.0` to match Chalk - Removed `RustDefId` since the builtin type support is there - Add a few more `FIXME(chalk)`s for problem spots I hit when running all tests with chalk - Added some more implementation code for some newer builtin Chalk types (e.g. `FnDef`, `Array`) - Lower `RegionOutlives` and `ObjectSafe` predicates - Lower `Dyn` without the region - Handle `Int`/`Float` `CanonicalVarKind`s - Uncomment some Chalk tests that actually work now - Remove the revisions in `src/test/ui/coherence/coherence-subtyping.rs` since they aren't doing anything different r? @nikomatsakis
2020-06-20Rollup merge of #73539 - LukasKalbertodt:deprecate-vec-remove-item, ↵Ralf Jung-1/+0
r=Mark-Simulacrum Deprecate `Vec::remove_item` In #40062 we decided to remove that method. In #71834 it was said that we want to deprecate it for a few cycles before removing it. That's what this PR does.
2020-06-20Remove uses of `Vec::remove_item`Lukas Kalbertodt-1/+0
2020-06-20Support sanitizers on aarch64-unknown-linux-gnuTomasz Miąsko-5/+11
2020-06-19Add compare-mode=chalk and add a little bit more implementations and fixmesJack Huey-0/+7
2020-06-19Rollup merge of #73044 - tmiasko:compiletest-san, r=nikomatsakisRalf Jung-5/+53
compiletest: Add directives to detect sanitizer support Add needs-sanitizer-{address,leak,memory,thread} directive indicating that test requires target with support for specific sanitizer. This is an addition to the existing needs-sanitizer-support directive indicating that test requires a sanitizer runtime library. The existing needs-sanitizer-support directive could be incorporated into the new ones, but I decided to retain it, since it enables running sanitizer codegen tests even when building of sanitizer runtime libraries is disabled.
2020-06-15Auto merge of #72357 - ortem:new-dbg-pretty-printers, r=pnkfelixbors-7/+32
Implement new gdb/lldb pretty-printers Reopened #60826 This PR replaces current gdb and lldb pretty-printers with new ones that were originally written for [IntelliJ Rust](https://github.com/intellij-rust/intellij-rust/tree/master/prettyPrinters). The current state of lldb pretty-printers is poor, because [they don't use synthetic children](https://github.com/rust-lang/rust/issues/55586#issuecomment-436610063). When I started to reimplement lldb pretty-printers with synthetic children support, I've found current version strange and hard to support. I think `debugger_pretty_printers_common.py` is overkill, so I got rid of it. The new pretty-printers have to support all types supported by current pretty-printers, and also support `Rc`, `Arc`, `Cell`, `Ref`, `RefCell`, `RefMut`, `HashMap`, `HashSet`. Fixes #56252
2020-06-13compiletest: Add directives to detect sanitizer supportTomasz Miąsko-5/+53
Add needs-sanitizer-{address,leak,memory,thread} directive indicating that test requires target with support for specific sanitizer. This is an addition to the existing needs-sanitizer-support directive indicating that test requires a sanitizer runtime library.
2020-06-09Implement new gdb/lldb pretty-printersortem-7/+32
Replace old GDB and LLDB pretty-printers with new ones which were originally written for IntelliJ Rust. New LLDB pretty-printers support synthetic children. New GDB/LLDB pretty-printers support all Rust types supported by old pretty-printers, and also support: Rc, Arc, Cell, Ref, RefCell, RefMut, HashMap, HashSet.
2020-06-09[AVR] Update the compiletest library to recognize AVR as a 16-bit targetDylan McKay-0/+8
2020-06-09[AVR] Add AVR platform supportJake Goulding-0/+1
2020-06-02compiletest: Add name directive for remote runnersTom Eccles-0/+1
Allow tests to use // ignore-remote to ignore the test when using remote-test-{client,server}. In most situations this would be covered by // ignore-cross-compile but I see no reason that a non-cross compiled remote test runner shouldn't work.
2020-05-31Make `remote-test-client` work as cargo runner againDennis Duda-2/+1
Since cargo appends executable/args, the support_lib count parameter has to come first.
2020-05-31Make remote-test-client and remote-test-server compatible with windowsDennis Duda-8/+14
`compiletest` and `remote-test-client`: The command line for `remote-test-client` was changed slightly to allow cross-platform compatible paths. The old way of supplying the support libs was by joining their paths with the executable path with `:`. This caused Windows-style paths to be split after the directory letter. Now, the number of support libs is provided as a parameter as well, and the support lib paths are split off from the regular args in the client. `remote-test-server`: - Marked Unix-only parts as such and implemented Windows alternatives - On Windows `LD_LIBRARY_PATH` doesn't exist. Libraries are loaded from `PATH` though, so that's the way around it. - Tiny cleanup: `Command::args`/`envs` instead of manually looping over them - The temp path for Windows has to be set via environment variable, since there isn't a global temp directory that would work on every machine (as a static string)
2020-05-10Fail if I/O error occurs during testingMark Rousskov-1/+4
2020-04-28Rollup merge of #71456 - mzohreva:mz/sgx-no-dylib, r=nikomatsakisDylan DPC-0/+1
Use lib crate type for SGX in `fn build_auxiliary` since SGX does not support `dylib` cc @Goirad
2020-04-25Auto merge of #71439 - Mark-Simulacrum:stage0-next, r=jonas-schievinkbors-1/+1
Bump bootstrap compiler This bumps the bootstrap compiler and the rustfmt that x.py fmt uses.
2020-04-25Bump bootstrap compilerMark Rousskov-1/+1
2020-04-24Rollup merge of #71428 - tromey:gdb-10-parsing, r=tromeyDylan DPC-5/+21
Let compiletest recognize gdb 10.x git gdb has moved to version 10. My build prints this as its --version: GNU gdb (GDB) 10.0.50.20200420-git Unfortunately this conflicts with this comment in compiletest: // We limit major to 1 digit, otherwise, on openSUSE, we parse the openSUSE version This patch changes the version parsing to follow the GNU coding standard, which accounts for both the openSUSE case as well as handling gdb 10. My debuginfo test run now says: NOTE: compiletest thinks it is using GDB with native rust support NOTE: compiletest thinks it is using GDB version 10000050 ... where previously it failed to find that gdb 10 had rust support.
2020-04-23Fix ui test blessing when a test has an empty stderr file after having had ↵Oliver Scherer-1/+5
content there before the current changes
2020-04-22Use lib crate type for SGX in `fn build_auxiliary`Mohsen Zohrevandi-0/+1
2020-04-22Fix compiletest version-parsing testsTom Tromey-2/+2
The compiletest version-parsing tests failed after the previous patch. However, I don't believe these tests are correct, in that I don't think RHEL or CentOS ever put the gdb version number into parentheses. Instead they display like: GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-119.el7
2020-04-22Let compiletest recognize gdb 10.xTom Tromey-3/+19
git gdb has moved to version 10. My build prints this as its --version: GNU gdb (GDB) 10.0.50.20200420-git Unfortunately this conflicts with this comment in compiletest: // We limit major to 1 digit, otherwise, on openSUSE, we parse the openSUSE version This patch changes the version parsing to follow the GNU coding standard, which accounts for both the openSUSE case as well as handling gdb 10. My debuginfo test run now says: NOTE: compiletest thinks it is using GDB with native rust support NOTE: compiletest thinks it is using GDB version 10000050 ... where previously it failed to find that gdb 10 had rust support.
2020-04-16Rollup merge of #71145 - pfmooney:illumos-triple, r=nagisaDylan DPC-0/+1
Add illumos triple This fixes rust-lang/rust#55553 and adds support for `illumos` as a `target_os` on `x86_64`. In addition to the compile spec and libstd additions, several library dependencies have been bumped in order to permit working builds of cargo and rustup for the new target. Work originally started by @jasonbking, with subsequent additions by @pfmooney and @jclulow.
2020-04-16Rollup merge of #70774 - GuillaumeGomez:clean-rustdoc-js-tools, r=ollie27Dylan DPC-1/+7
End cleanup on rustdoc-js tools Fixes #70689. It removes a lot of code, which is pretty nice. :3 We now only have one entry point and a small set of options. r? @ollie27
2020-04-14Add illumos triplePatrick Mooney-0/+1
Co-Authored-By: Jason King <jason.brian.king@gmail.com> Co-Authored-By: Joshua M. Clulow <jmc@oxide.computer>
2020-04-14Improve rustdoc js testers codeGuillaume Gomez-1/+5
2020-04-13Auto merge of #70989 - eddyb:mir-opt-32-pr-ci, r=Mark-Simulacrumbors-8/+15
ci: run mir-opt tests on PR CI also as 32-bit (for `EMIT_MIR_FOR_EACH_BIT_WIDTH`). Background: #69916 and [`src/test/mir-opt/README.md`](https://github.com/rust-lang/rust/blob/master/src/test/mir-opt/README.md): > By default 32 bit and 64 bit targets use the same dump files, which can be problematic in the presence of pointers in constants or other bit width dependent things. In that case you can add > > ``` > // EMIT_MIR_FOR_EACH_BIT_WIDTH > ``` > > to your test, causing separate files to be generated for 32bit and 64bit systems. However, if you change the output of such a test (intentionally or not), or if you add a test and it varies between 32-bit and 64-bit platforms, you have to run this command (for a x64 linux host): `./x.py test --stage 1 --target x86_64-unknown-linux-gnu --target i686-unknown-linux-gnu --bless src/test/mir-opt` Otherwise, bors trying to merge the PR will fail, since we test 32-bit targets there. But we don't on PR CI, which means there's no way the PR author would know (unless they were burnt by this already and know what to look for). This PR resolves that by running `mir-opt` tests for ~~`i686-unknown-linux-gnu`~~, on PR CI. **EDIT**: switched to `armv5te-unknown-linux-gnueabi` to work around LLVM 7 crashes (see https://github.com/rust-lang/compiler-builtins/pull/311#issuecomment-612270089), found during testing. cc @rust-lang/wg-mir-opt @rust-lang/infra
2020-04-11End cleanup on rustdoc-js toolsGuillaume Gomez-0/+2
2020-04-11compiletest: support --pass=check and --pass=build for mir-opt tests.Eduard-Mihai Burtescu-7/+14
2020-04-11compiletest: diff direction should be (-)expected -> (+)actual.Eduard-Mihai Burtescu-1/+1
2020-04-10compiletest: let config flags overwrite -A unusedRalf Jung-4/+6
2020-04-07Remove old mir-opt test format.Ana-Maria Mihalache-164/+0
2020-04-07Normalize away pairs of line:col numbers.Ana-Maria Mihalache-1/+1
2020-04-03Auto merge of #70156 - michaelwoerister:incr-cgus, r=nikomatsakisbors-1/+11
Make the rustc respect the `-C codegen-units` flag in incremental mode. This PR implements (the as of yet unapproved) major change proposal at https://github.com/rust-lang/compiler-team/issues/245. See the description there for background and rationale. The changes are pretty straightforward and should be easy to rebase if the proposal gets accepted at some point. r? @nikomatsakis cc @pnkfelix
2020-04-01compiletest: don't use `std::io::stdout()`, as it bypasses `set_print`.Eduard-Mihai Burtescu-8/+4