about summary refs log tree commit diff
path: root/mk/tests.mk
AgeCommit message (Collapse)AuthorLines
2017-02-06Delete the `mk` folderAlex Crichton-1057/+0
This commit deletes the old build system located in the `mk` folder as it's now been obsoleted for two cycles and is replaced by rustbuild.
2016-12-14mk: Fix `make check`Alex Crichton-1/+1
When the rustc-unicode crate was renamed to std-unicode we just need to continue to filter it out of the crates being tested.
2016-11-30Rename 'librustc_unicode' crate to 'libstd_unicode'.Corey Farwell-1/+1
Fixes #26554.
2016-11-18Don't build the lexer verifier during tidyBrian Anderson-2/+1
Tidy is not the right place to do this. Tidy is for running lints. We should instead be running the lexer/grammar tests as part of the test suite. This may fix nightly breakage, but I don't know why.
2016-11-16Fix grammar verificationStefan Schindler-1/+2
* Use `make check-lexer` to verify the grammar. * Extend grammar/README * Add make clean-grammar rule * Add target `check-build-lexer-verifier` to `make tidy`, so it will build the verifier with every build and catch future errors * Search for antlr4 with configure and find
2016-11-11Move all Linux/OSX CI infastructure to TravisAlex Crichton-0/+2
This commit configures our `.travis.yml` to test the full suite of tests we have on Buildbot right now. A whole mess of docker images are added to the `src/ci` directory which represent all the build environments for each configuration. Each of these environments is then configured in `.travis.yml` to run on the auto branch. Note that the full matrix of tests aren't intended to be run on all PRs. Instead, we continue to run only one entry in the matrix, forcing all others to finish quickly. Only the `auto` branch should run the full matrix of builds. Also note that the infrastructure hasn't quite been allocated yet to the rust-lang/rust repository, so everything is disabled for now except for the one build that happens on PRs. Once that infrastructure is allocated though we can enable this and let it fly! Notable modifications from the current test suite today: * Android tests are run in rustbuild instead of the makefiles, for whatever reason I couldn't get the makefiles to work on Travis. * A debuginfo test was updated to work with the current version of the Android NDK. * Some dependencies in `mk/tests.mk` were fixed to allow running tests in parallel.
2016-10-31detect gdb version & rust support in compiletestTim Neumann-1/+1
2016-10-23mk: Filter debuginfo=1 from test flagsAlex Crichton-0/+1
Fixes tests with `--enable-debuginfo-lines`.
2016-09-20Remove librbml and the RBML-tagged auto-encoder/decoder.Eduard Burtescu-1/+1
2016-09-01test: Add a min-llvm-version directiveAlex Crichton-0/+1
We've got tests which require a particular version of LLVM to run as they're testing bug fixes. Our build system, however, supports multiple LLVM versions, so we can't run these tests on all LLVM versions. This adds a new `min-llvm-version` directive for tests so they can opt out of being run on older versions of LLVM. This then namely applies that logic to the `issue-36023.rs` test case and... Closes #36138
2016-07-20add mir optimization tests, dump-mir-dir optionScott A Carr-2/+12
2016-06-10Check error index in `make check`Seo Sanghyeon-0/+1
2016-05-13add UI testing frameworkNiko Matsakis-2/+13
2016-05-09rustc: Implement custom panic runtimesAlex Crichton-1/+2
This commit is an implementation of [RFC 1513] which allows applications to alter the behavior of panics at compile time. A new compiler flag, `-C panic`, is added and accepts the values `unwind` or `panic`, with the default being `unwind`. This model affects how code is generated for the local crate, skipping generation of landing pads with `-C panic=abort`. [RFC 1513]: https://github.com/rust-lang/rfcs/blob/master/text/1513-less-unwinding.md Panic implementations are then provided by crates tagged with `#![panic_runtime]` and lazily required by crates with `#![needs_panic_runtime]`. The panic strategy (`-C panic` value) of the panic runtime must match the final product, and if the panic strategy is not `abort` then the entire DAG must have the same panic strategy. With the `-C panic=abort` strategy, users can expect a stable method to disable generation of landing pads, improving optimization in niche scenarios, decreasing compile time, and decreasing output binary size. With the `-C panic=unwind` strategy users can expect the existing ability to isolate failure in Rust code from the outside world. Organizationally, this commit dismantles the `sys_common::unwind` module in favor of some bits moving part of it to `libpanic_unwind` and the rest into the `panicking` module in libstd. The custom panic runtime support is pretty similar to the custom allocator support with the only major difference being how the panic runtime is injected (takes the `-C panic` flag into account).
2016-05-07Rollup merge of #33314 - alexcrichton:fix-enable-ccache, r=pnkfelixSteve Klabnik-2/+2
mk: Fix building with --enable-ccache We will no longer use `ccache` in the makefiles for our local dependencies like miniz, but they're so small anyway it doesn't really matter. Closes #33285
2016-05-06Auto merge of #33228 - nikomatsakis:compiletest-gut, r=acrichtobors-1/+0
Move auxiliary directories to live with the tests This is a step for enabling testing of cross-crate incremental compilation. The idea is that instead of having a central auxiliary directory, when you have a `// aux-build:foo.rs` annotation in the test `run-pass/bar.rs`, it will look in (e.g.) `run-pass/aux/foo.rs`. In general, it looks for an `aux` directory in the same directory as the test. We also ignore the `aux` directories when enumerating the set of tests. As part of this PR, also refactor `runtest.rs` to use methods on a context, which means we can stop passing around context everywhere. r? @alexcrichton
2016-05-06kill the old auxiliary directoryNiko Matsakis-1/+0
2016-05-06mk: Try to fix nightlies againAlex Crichton-3/+3
Looks like the real bug on nightlies is that the `llvm-pass` run-make test is not actually getting the value of `LLVM_CXXFLAGS` correct. Namely, it's blank! Now the only change #33093 which actually affected this is that the argument `$(LLVM_CXXFLAGS_$(2))` was moved up from a makefile rule into the definition of a variable. Sounds innocuous? Turns out the variable this was moved into is defined with `:=`, which means that it's not recursively expanded, which basically means that it's expanded immediately. Unfortunately part of this expansion involves running `llvm-config`, which doesn't exist at the start of distcheck build! This didn't show up on the bots because they run `make` *then* `make check`, and the first step builds llvm-config so the next time `make` is loaded everything is available. The distcheck bots, however, run just a plain `distcheck` so `make` doesn't exist ahead of time. You can see this in action where the distcheck bots start out with a bunch of "llvm-config not found" error messages. This commit just changes a few variables to be defined with `=` which essentially means they're lazily expanded. I did not run a full distcheck locally, but this makes the initial "llvm-config not found" error messages go away so I suspect that this is the fix. Closes #33379
2016-05-05mk: Fix building with --enable-ccacheAlex Crichton-2/+2
We will no longer use `ccache` in the makefiles for our local dependencies like miniz, but they're so small anyway it doesn't really matter. Closes #33285
2016-05-03mk: Pass CFLAGS for target, not hostAlex Crichton-5/+5
This changes the CFLAGS and related variables passed to compiletest to be passed for the target, not the host, so we can correctly test 32-bit cross compiles on 64-bit host machines. Hopefuly fixes #33379
2016-04-28test: Move run-make tests into compiletestAlex Crichton-68/+21
Forcing them to be embedded in makefiles precludes being able to run them in rustbuild, and adding them to compiletest gives us a great way to leverage future enhancements to our "all encompassing test suite runner" as well as just moving more things into Rust. All tests are still Makefile-based in the sense that they rely on `make` being available to run them, but there's no longer any Makefile-trickery to run them and rustbuild can now run them out of the box as well.
2016-04-25mk: Fix use of deprecated configure varAlex Crichton-1/+1
The `--android-cross-path` has been deprecated for some time now, we should use `CFG_ARM_LINUX_ANDROIDEABI_NDK` instead. Ideally this would use the right triple, but we're only testing ARM for now.
2016-04-23Auto merge of #33084 - alexcrichton:osx-python-sanity, r=michaelwoeristerbors-1/+2
Sanity check Python on OSX for LLDB tests Two primary changes: * Don't get past the configure stage if `python` isn't coming from `/usr/bin` * Call `debugger.Terminate()` to prevent segfaults on newer versions of LLDB. Closes #32994
2016-04-19mk: Bootstrap from stable instead of snapshotsAlex Crichton-2/+5
This commit removes all infrastructure from the repository for our so-called snapshots to instead bootstrap the compiler from stable releases. Bootstrapping from a previously stable release is a long-desired feature of distros because they're not fans of downloading binary stage0 blobs from us. Additionally, this makes our own CI easier as we can decommission all of the snapshot builders and start having a regular cadence to when we update the stage0 compiler. A new `src/etc/get-stage0.py` script was added which shares some code with `src/bootstrap/bootstrap.py` to read a new file, `src/stage0.txt`, which lists the current stage0 compiler as well as cargo that we bootstrap from. This script will download the relevant `rustc` package an unpack it into `$target/stage0` as we do today. One problem of bootstrapping from stable releases is that we're not able to compile unstable code (e.g. all the `#![feature]` directives in libcore/libstd). To overcome this we employ two strategies: * The bootstrap key of the previous compiler is hardcoded into `src/stage0.txt` (enabled as a result of #32731) and exported by the build system. This enables nightly features in the compiler we download. * The standard library and compiler are pinned to a specific stage0, which doesn't change, so we're guaranteed that we'll continue compiling as we start from a known fixed source. The process for making a release will also need to be tweaked now to continue to cadence of bootstrapping from the previous release. This process looks like: 1. Merge `beta` to `stable` 2. Produce a new stable compiler. 3. Change `master` to bootstrap from this new stable compiler. 4. Merge `master` to `beta` 5. Produce a new beta compiler 6. Change `master` to bootstrap from this new beta compiler. Step 3 above should involve very few changes as `master` was previously bootstrapping from `beta` which is the same as `stable` at that point in time. Step 6, however, is where we benefit from removing lots of `#[cfg(stage0)]` and get to use new features. This also shouldn't slow the release too much as steps 1-5 requires little work other than waiting and step 6 just needs to happen at some point during a release cycle, it's not time sensitive. Closes #29555 Closes #29557
2016-04-19mk: Force system python for LLDB tests on OSXAlex Crichton-1/+2
Force usage of /usr/bin/python whenever we run LLDB tests on OSX because it looks like no other Python will work.
2016-04-18rustbuild: Add support for compiletest test suitesAlex Crichton-1/+1
This commit adds support in rustbuild for running all of the compiletest test suites as part of `make check`. The `compiletest` program was moved to `src/tools` (like `rustbook` and others) and is now just compiled like any other old tool. Each test suite has a pretty standard set of dependencies and just tweaks various parameters to the final compiletest executable. Note that full support is lacking in terms of: * Once a test suite has passed, that's not remembered. When a test suite is requested to be run, it's always run. * The arguments to compiletest probably don't work for every possible combination of platforms and testing environments just yet. There will likely need to be future updates to tweak various pieces here and there. * Cross compiled test suites probably don't work just yet, support for that will come in a follow-up patch.
2016-04-12tidy: Add a check to ensure Cargo.toml is in syncAlex Crichton-2/+2
This verifies that the crates listed in the `[dependencies]` section of `Cargo.toml` are a subset of the crates listed in `lib.rs` for our in-tree crates. This should help ensure that when we refactor crates over time we keep these dependency lists in sync.
2016-04-12rustbuild: Migrate tidy checks to RustAlex Crichton-45/+9
This commit rewrites all of the tidy checks we have, namely: * featureck * errorck * tidy * binaries into Rust under a new `tidy` tool inside of the `src/tools` directory. This at the same time deletes all the corresponding Python tidy checks so we can be sure to only have one source of truth for all the tidy checks. cc #31590
2016-04-06Address nits.Niko Matsakis-1/+1
2016-04-06add incremental test runner and some testsNiko Matsakis-1/+11
2016-04-03mk: Add configure option for disabling codegen testsAlex Crichton-2/+6
Our `codegen` test suite requires the LLVM `FileCheck` utility but unfortunately this isn't always available in all custom LLVM roots (e.g. those specified via `--llvm-root`). This commit adds a `./configure` option called `--disable-codegen-tests` which will manually disable running these tests. In the case that this option is passed we can forgo the need for the `FileCheck` executable. Note that we still require `FileCheck` by default as we will attempt to run these tests. Closes #28667
2016-03-25Salt test crates in buildsystem.Michael Woerister-1/+1
2016-03-07mk: Distribute fewer TARGET_CRATESAlex Crichton-5/+9
Right now everything in TARGET_CRATES is built by default for all non-fulldeps tests and is distributed by default for all target standard library packages. Currenly this includes a number of unstable crates which are rarely used such as `graphviz` and `rbml`> This commit trims down the set of `TARGET_CRATES`, moves a number of tests to `*-fulldeps` as a result, and trims down the dependencies of libtest so we can distribute fewer crates in the `rust-std` packages.
2016-02-26Auto merge of #31846 - alexcrichton:better-disable-jemallc, r=brsonbors-2/+2
The `--disable-jemalloc` configure option has a failure mode where it will create a distribution that is not compatible with other compilers. For example the nightly for Linux will assume that it will link to jemalloc by default as an allocator for executable crates. If, however, a standard library is used which was built via `./configure --disable-jemalloc` then this will fail because the jemalloc crate wasn't built. While this seems somewhat reasonable as a niche situation, the same mechanism is used for disabling jemalloc for platforms that just don't support it. For example if the rumprun target is compiled then the sibiling Linux target *also* doesn't have jemalloc. This is currently a problem for our cross-build nightlies which build many targets. If rumprun is also built, it will disable jemalloc for all targets, which isn't desired. This commit moves the platform-specific disabling of jemalloc as hardcoded logic into the makefiles that is scoped per-platform. This way when configuring multiple targets **without the `--disable-jemalloc` option specified** all targets will get jemalloc as they should.
2016-02-25mk: Move disable-jemalloc logic into makefilesAlex Crichton-2/+2
The `--disable-jemalloc` configure option has a failure mode where it will create a distribution that is not compatible with other compilers. For example the nightly for Linux will assume that it will link to jemalloc by default as an allocator for executable crates. If, however, a standard library is used which was built via `./configure --disable-jemalloc` then this will fail because the jemalloc crate wasn't built. While this seems somewhat reasonable as a niche situation, the same mechanism is used for disabling jemalloc for platforms that just don't support it. For example if the rumprun target is compiled then the sibiling Linux target *also* doesn't have jemalloc. This is currently a problem for our cross-build nightlies which build many targets. If rumprun is also built, it will disable jemalloc for all targets, which isn't desired. This commit moves the platform-specific disabling of jemalloc as hardcoded logic into the makefiles that is scoped per-platform. This way when configuring multiple targets **without the `--disable-jemalloc` option specified** all targets will get jemalloc as they should.
2016-02-24Recurse to find test files in any subdirectory of the base path. If aNiko Matsakis-15/+16
subdirectory contains `compiletest-ignore-dir`, then ignore it.
2016-02-16pass CXX to run-makeSébastien Marie-1/+2
use CXX value found at configure time inside run-make tests. it permits OpenBSD to pass llvm-module-pass test (which use CXX variable).
2016-02-14Auto merge of #31391 - frewsxcv:test, r=alexcrichtonbors-1/+2
Part of #31185
2016-02-13Add LLVM ModulePass regression test using run-make.Corey Farwell-1/+2
Part of #31185
2016-02-09Update MakefileGuillaume Gomez-10/+33
2016-02-01Revert "mk: fix some undefined variable warnings"Alex Crichton-14/+10
This reverts commit d03712977d7c913044f2b863269c4491d7fa7c36.
2016-02-01mk: fix some undefined variable warningsTamir Duberstein-10/+14
Some of this is scary stuff. Probably time to lint against this. Found with `make --warn-undefined-variables`.
2016-01-30Auto merge of #31274 - brson:nobench, r=nikomatsakisbors-18/+4
I don't believe these test cases have served any purpose in years. The shootout benchmarks are now upstreamed. A new benchmark suite should rather be maintained out of tree. r? @nikomatsakis
2016-01-30Auto merge of #30448 - alexcrichton:llvmup, r=nikomatsakisbors-0/+2
These commits perform a few high-level changes with the goal of enabling i686 MSVC unwinding: * LLVM is upgraded to pick up the new exception handling instructions and intrinsics for MSVC. This puts us somewhere along the 3.8 branch, but we should still be compatible with LLVM 3.7 for non-MSVC targets. * All unwinding for MSVC targets (both 32 and 64-bit) are implemented in terms of this new LLVM support. I would like to also extend this to Windows GNU targets to drop the runtime dependencies we have on MinGW, but I'd like to land this first. * Some tests were fixed up for i686 MSVC here and there where necessary. The full test suite should be passing now for that target. In terms of landing this I plan to have this go through first, then verify that i686 MSVC works, then I'll enable `make check` on the bots for that target instead of just `make` as-is today. Closes #25869
2016-01-29Get tests working on MSVC 32-bitAlex Crichton-0/+2
2016-01-29Remove src/test/benchBrian Anderson-18/+4
I don't believe these test cases have served any purpose in years. The shootout benchmarks are now upstreamed. A new benchmark suite should rather be maintained out of tree.
2016-01-26Implement the translation item collector.Michael Woerister-1/+11
The purpose of the translation item collector is to find all monomorphic instances of functions, methods and statics that need to be translated into LLVM IR in order to compile the current crate. So far these instances have been discovered lazily during the trans path. For incremental compilation we want to know the set of these instances in advance, and that is what the trans::collect module provides. In the future, incremental and regular translation will be driven by the collector implemented here.
2016-01-21mk: Remove all perf-related targetsAlex Crichton-25/+2
I don't believe these have been used at all recently, and I doubt many of them still work, so remove the stale support.
2015-12-20remove specific code for OpenBSD that define STDCPP_LIBDIR_RUSTFLAGSSébastien Marie-4/+3
it isn't the good way to process, as it makes conflicts when building rustc while another version of rustc in installed system-wide.
2015-12-13Better support for `--llvm-root`.Richard Diamond-1/+3
This handles cases when the LLVM used isn't configured will the 'usual' targets. Also, cases where LLVM is shared are also handled (ie with `LD_LIBRARY_PATH` etc).