about summary refs log tree commit diff
path: root/src/tools/compiletest
AgeCommit message (Collapse)AuthorLines
2017-02-20Fix #39690: make mir-opt mode for compiletest check timestamps.Felix S. Klock II-0/+14
This version removes prior use of `time` crate, to satisify vendoring requirements. remove extraneous whitespace change
2017-02-20Fix rustdoc test with new file pathGuillaume Gomez-3/+14
2017-02-11Add tested item in the rustdoc --test outputGuillaume Gomez-6/+10
2017-02-08Rollup merge of #39597 - GuillaumeGomez:correct_rustdoc_test_file, ↵Corey Farwell-25/+58
r=alexcrichton Display correct filename with --test option Fixes #39592. With the current files: ```rust pub mod foo; /// This is a Foo; /// /// ``` /// println!("baaaaaar"); /// ``` pub struct Foo; /// This is a Bar; /// /// ``` /// println!("fooooo"); /// ``` pub struct Bar; ``` ```rust // note the whitespaces /// ``` /// println!("foo"); /// ``` pub fn foo() {} ``` It displays: ``` ./build/x86_64-apple-darwin/stage1/bin/rustdoc --test test.rs running 3 tests test test.rs - line 13 ... ok test test.rs - line 5 ... ok test foo.rs - line 2 ... ok test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured ``` ``` ` `` println!("lol"); ` `` asdjnfasd asd ``` It displays: ``` ./build/x86_64-apple-darwin/stage1/bin/rustdoc --test foo.md running 1 test test <input> - line 3 ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured ``` r? @alexcrichton
2017-02-08Add more test for rustdoc --testGuillaume Gomez-25/+58
2017-02-07Rollup merge of #39431 - alexcrichton:no-more-makefiles, r=brsonCorey Farwell-27/+49
Delete the makefile build system This PR deletes the makefile build system in favor of the rustbuild build system. The beta has now been branched so 1.16 will continue to be buildable from the makefiles, but going forward 1.17 will only be buildable with rustbuild. Rustbuild has been the default build system [since 1.15.0](https://github.com/rust-lang/rust/pull/37817) and the makefiles were [proposed for deletion](https://internals.rust-lang.org/t/proposal-for-promoting-rustbuild-to-official-status/4368) at this time back in November of last year. And now with the deletion of these makefiles we can start getting those sweet sweet improvements of using crates.io crates in the compiler!
2017-02-07Rollup merge of #39400 - alexcrichton:arm-cross-test, r=brsonCorey Farwell-1/+52
Add support for test suites emulated in QEMU This commit adds support to the build system to execute test suites that cannot run natively but can instead run inside of a QEMU emulator. A proof-of-concept builder was added for the `arm-unknown-linux-gnueabihf` target to show off how this might work. In general the architecture is to have a server running inside of the emulator which a local client connects to. The protocol between the server/client supports compiling tests on the host and running them on the target inside the emulator. Closes #33114
2017-02-06compiletest: Add caching of test resultsAlex Crichton-1/+48
Don't re-run tests in compiletest if all the inputs haven't changed, manage stamp files in the output directory.
2017-02-06std: Remove cfg(cargobuild) annotationsAlex Crichton-26/+1
These are all now no longer needed that we've only got rustbuild in tree.
2017-02-03Create new flag to test rustdoc --testGuillaume Gomez-47/+49
2017-02-03Move test from bootstrap to compiletestGuillaume Gomez-14/+84
2017-01-31Auto merge of #38847 - michaelwoerister:gate-on-incr-comp, r=alexcrichtonbors-0/+4
travis: Gate on some minimal support for incremental compilation. This commit adds a travis job that 1. builds a stage2 compiler in incremental mode (but with empty incremental compilation cache), and 2. builds and runs the run-pass test suite also in incremental mode. Building incrementally with an empty cache makes sure that the compiler doesn't crash in dependency tracking during bootstrapping. Executing the incrementally built test suite gives some measure of confidence that we generate valid code. Note, however, that the above does not give strong guarantees about the validity of incremental compilation, it just provides a basis for being able to rely on from-scratch incr. comp. builds as reference values in further tests (which then do actual incremental compilation). r? @alexcrichton
2017-01-30compiletest: Clear RUSTFLAGS env-var for run-make tests.Michael Woerister-0/+4
2017-01-29Add support for test suites emulated in QEMUAlex Crichton-1/+52
This commit adds support to the build system to execute test suites that cannot run natively but can instead run inside of a QEMU emulator. A proof-of-concept builder was added for the `arm-unknown-linux-gnueabihf` target to show off how this might work. In general the architecture is to have a server running inside of the emulator which a local client connects to. The protocol between the server/client supports compiling tests on the host and running them on the target inside the emulator. Closes #33114
2017-01-20Rollup merge of #39068 - alexcrichton:more-small-tests, r=brsonAlex Crichton-32/+41
travis: Add i586 linux and i686 musl This commit expands the existing x86_64-musl entry in the Travis matrix to also build/test i586-unknown-linux-gnu and i686-unknown-linux-musl. cc #38531 Closes #35599 Closes #39053
2017-01-16ignore-gdb-version: Address review comments.Michael Woerister-6/+15
2017-01-15travis: Add i586 linux and i686 muslAlex Crichton-32/+41
This commit expands the existing x86_64-musl entry in the Travis matrix to also build/test i586-unknown-linux-gnu and i686-unknown-linux-musl. cc #38531 Closes #39053
2017-01-13compiletest: Allow for ignoring tests if certain GDB version is detected.Michael Woerister-9/+35
2017-01-06compiletest: Fix flaky Android gdb test runsAlex Crichton-42/+39
Local testing showed that I was able to reproduce an error where debuginfo tests on Android would fail with "connection reset by peer". Further investigation turned out that the gdb tests are android with bit of process management: * First an `adb forward` command is run to ensure that the host's port 5039 is the same as the emulator's. * Next an `adb shell` command is run to execute the `gdbserver` executable inside the emulator. This gdb server will attach to port 5039 and listen for remote gdb debugging sessions. * Finally, we run `gdb` on the host (not in the emulator) and then connect to this gdb server to send it commands. The problem was happening when the host's gdb was failing to connect to the remote gdbserver running inside the emulator. The previous test for this was that after `adb shell` executed we'd sleep for a second and then attempt to make a TCP connection to port 5039. If successful we'd run gdb and on failure we'd sleep again. It turns out, however, that as soon as we've executed `adb forward` all TCP connections to 5039 will succeed. This means that we would only ever sleep for at most one second, and if this wasn't enough time we'd just fail later because we would assume that gdbserver had started but it may not have done so yet. This commit fixes these issues by removing the TCP connection to test if gdbserver is ready to go. Instead we read the stdout of the process and wait for it to print that it's listening at which point we start running gdb. I've found that locally at least I was unable to reproduce the failure after these changes. Closes #38710
2016-12-30rustbuild: Compile all support tools in stage0Alex Crichton-1/+5
This commit changes all tools and such to get compiled in stage0, not in later stages. The purpose of this commit is to cut down dependencies on later stages for future modifications to the build system. Notably we're going to be adding builders that produce a full suite of cross-compiled artifacts for a particular host, and that shouldn't compile the `x86_64-unknown-linux-gnu` compiler more than once. Currently dependencies on, for example, the error index end up compiling the `x86_64-unknown-linux-gnu` compiler more than necessary. As a result here we move many dependencies on these tools to being produced by a stage0 compiler, not a stage1+ compiler. None of these tools actually need to be staged at all, so they'll exhibit consistent behavior across the stages.
2016-12-29A few small test fixes and such from rollupAlex Crichton-2/+1
2016-12-29Rollup merge of #38695 - alexcrichton:debug-appveyor, r=brsonAlex Crichton-0/+38
appveyor: Attempt to debug flaky test runs This commit is an attempt to debug #38620 since we're unable to reproduce it locally. It follows the [advice] of those with AppVeyor to use the `handle.exe` tool to try to debug what processes have a handle to the file open. This won't be guaranteed to actually help us, but hopefully it'll diagnose something at some point? [advice]: http://help.appveyor.com/discussions/questions/2898
2016-12-29appveyor: Attempt to debug flaky test runsAlex Crichton-0/+38
This commit is an attempt to debug #38620 since we're unable to reproduce it locally. It follows the [advice] of those with AppVeyor to use the `handle.exe` tool to try to debug what processes have a handle to the file open. This won't be guaranteed to actually help us, but hopefully it'll diagnose something at some point? [advice]: http://help.appveyor.com/discussions/questions/2898
2016-12-27compiletest: Don't limit all suites on AndroidAlex Crichton-1/+18
On Android we only have one test thread for supposed problems with concurrency and the remote debugger. Not all of our suites require one concurrency, however, and suites like compile-fail or pretty can be much faster if they're parallelized on Travis. This commit only sets the test threads to one on Android for suites which actually run code, and other suites aren't tampered with.
2016-12-20mk: Fix compile with makefilesAlex Crichton-4/+10
A tweak was made to dependencies in #38451 but the makefiles weren't updated to accompany this. Instead of trying to integerate the `build_helper` crate into the makefiles (which currently isn't present) this commit takes the approach of just duplicating the required logic, which should be small enough for now.
2016-12-20Rollup merge of #38451 - semarie:openbsd-rustbuild, r=alexcrichtonAlex Crichton-1/+4
adaptation to rustbuild for openbsd Since the switch to rustbuild, the build for openbsd is broken: - [X] `ar` inference based on compiler name is wrong (OpenBSD usually use `egcc`, but `ear` doesn't exist) - [X] `make` isn't GNU-make under OpenBSD (and others BSD platforms) - [x] `stdc++` isn't the right stdc++ library to link with (it should be `estdc++`) - [x] corrects tests that don't pass anymore (problems related to rustbuild) r? @alexcrichton
2016-12-20Rollup merge of #38289 - bluss:mir-verbose-test-fail, r=michaelwoeristerAlex Crichton-5/+19
A more verbose matching failure for mir tests This makes it easier to work with mir test failures during development. - Show which expected line was not found - Show full expected output - Show full actual output
2016-12-17let BSD to use gmake for GNU-makeSébastien Marie-1/+4
the diff extends build_helper to provide an function to return the expected name of GNU-make on the host: "make" or "gmake". Fixes #38429
2016-12-14libtest: add --list option to list tests and benchmarksJeremy Fitzhardinge-0/+1
This option lists all the tests and benchmarks a binary provides. By default the listing is sent to stdout, but if --logfile is also specified, it is written there. If filters are specified, they're applied before the output is emitted.
2016-12-10compiletest: A more verbose matching failure for mir testsUlrik Sverdrup-5/+19
This makes it easier to work with mir test failures during development. - Show which expected line was not found - Show full expected output - Show full actual output
2016-12-05libtest: add --exact to make filter matching exactJeremy Fitzhardinge-0/+7
Filter matching is by substring by default. This makes it impossible to run a single test if its name is a substring of some other test. For example, its not possible to run just "mymod::test" with these tests: mymod::test mymod::test1 mymod::test_module::moretests You could declare by convention that no test has a name that's a substring of another test, but that's not really practical. This PR adds the "--exact" flag, to make filter matching exactly match the complete name.
2016-11-30Update the bootstrap compilerAlex Crichton-8/+0
Now that we've got a beta build, let's use it!
2016-11-17Improved error reporting when target sysroot is missing.Robert Vally-2/+12
2016-11-10compiletest: detect nodejs binary, allow overrideMark-Simulacrum-2/+5
Allow passing a custom nodejs directory in configure.
2016-11-05Merge branch 'gdb-next-gen' of https://github.com/TimNN/rust into rollupAlex Crichton-92/+199
2016-11-05ignore gdb check for androidTim Neumann-5/+6
2016-10-31Changed most vec! invocations to use square bracesiirelu-37/+37
Most of the Rust community agrees that the vec! macro is clearer when called using square brackets [] instead of regular brackets (). Most of these ocurrences are from before macros allowed using different types of brackets. There is one left unchanged in a pretty-print test, as the pretty printer still wants it to have regular brackets.
2016-10-31detect gdb version & rust support in compiletestTim Neumann-76/+162
2016-10-31add gdb_native_rust config to compiletestTim Neumann-16/+36
2016-10-19Rollup merge of #37182 - alexcrichton:appveyor, r=brsonEduard-Mihai Burtescu-0/+5
Add AppVeyor configuration to the repo We hope to move to AppVeyor in the near future off of Buildbot + EC2. This adds an `appveyor.yml` configuration file which is ready to run builds on the auto branch. This is also accompanied with a few minor fixes to the build system and such to accomodate AppVeyor. The intention is that we're not switching over to AppVeyor entirely just yet, but rather we'll watch the builds for a week or so. If everything checks out then we'll start gating on AppVeyor instead of Buildbot!
2016-10-14Add AppVeyor configuration to the repoAlex Crichton-0/+5
We hope to move to AppVeyor in the near future off of Buildbot + EC2. This adds an `appveyor.yml` configuration file which is ready to run builds on the auto branch. This is also accompanied with a few minor fixes to the build system and such to accomodate AppVeyor. The intention is that we're not switching over to AppVeyor entirely just yet, but rather we'll watch the builds for a week or so. If everything checks out then we'll start gating on AppVeyor instead of Buildbot!
2016-10-14Fix make check-stage1 by conditionally activating question_mark feature for ↵Michael Woerister-0/+2
compiletest tool.
2016-10-12Stabilise `?`Nick Cameron-1/+0
cc [`?` tracking issue](https://github.com/rust-lang/rust/issues/31436)
2016-10-08rustbuild: Optimize build times slightlyAlex Crichton-2/+2
As the entry point for building the Rust compiler, a good user experience hinges on this compiling quickly to get to the meat of the problem. To that end use `#[cfg]`-specific dependencies to avoid building Windows crates on Unix and drop the `regex` crate for now which was easily replacable with some string searching.
2016-10-08Rollup merge of #37016 - alexcrichton:workspaces, r=japaricManish Goregaokar-92/+0
Leverage Cargo workspaces in rustbuild This is a continuation of https://github.com/rust-lang/rust/pull/36032 which implements the change to use `cargo metadata` to learn about the crate graph.
2016-10-07Use workspaces and switch to a single Cargo.lock.Ahmed Charles-92/+0
This involves hacking the code used to run cargo test on various packages, because it reads Cargo.lock to determine which packages should be tested. This change implements a blacklist, since that will catch new crates when they are added in the future.
2016-10-06std: Minor cleanup to libtestAlex Crichton-1/+1
* Don't spawn two threads for all tests, just one now that `catch_unwind` is stable. * Remove usage of the unstable `box` keyword * Remove usage of the unstable `FnBox` trait
2016-09-30Update bootstrap and compiletest to use the detected nodejsBrian Anderson-1/+5
2016-09-30Ignore all debuginfo tests on emscriptenBrian Anderson-1/+8
2016-09-30Preliminary wasm32 supportBrian Anderson-5/+5