about summary refs log tree commit diff
path: root/src/bootstrap/test.rs
AgeCommit message (Collapse)AuthorLines
2018-06-03impl is_tool on Mode enumCollins Abitekaniza-1/+1
make is_tool inherent prop of mode fix errors from rebase resolve issues from review
2018-06-03refactor mode to ToolRustc for Rls & RustfmtCollins Abitekaniza-2/+2
2018-06-03thread tool modes throughCollins Abitekaniza-10/+18
2018-06-03refactor Mode enumCollins Abitekaniza-11/+11
2018-06-02Rustdoc itself no longer requires proc macros to buildMark Simulacrum-2/+1
This avoids a full compiler build in order to build and/or run tests for rustdoc.
2018-05-30Run rustfmtSantiago Pastorino-150/+241
2018-05-30Add compare-mode to x.pySantiago Pastorino-1/+2
2018-05-17Make `bless` a flag instead of a subcommandOliver Schneider-7/+1
2018-05-17Add `bless` x.py subcommand for easy ui test replacementOliver Schneider-28/+24
2018-05-15Fix run-make wasm testsEric Huss-4/+4
Fixes #50711
2018-05-10Auto merge of #49729 - collin5:b48483, r=Mark-Simulacrumbors-2/+21
./x.py test should be able to run individual tests Allows user to be able to run individual tests by specifying filename i.e `./x.py test src/test/run-pass/foo.rs` Fixes #48483
2018-05-09ignore test-args if user specifies suite_pathCollins Abitekaniza-5/+1
2018-05-07./x.py test should be able to run individual testsCollins Abitekaniza-2/+25
trim and pass relative test paths as test-args use collect for getting test_args move suite_path to ShouldRun and make Option append existing args to test_args use enum for PathSet handle Suites differently from Paths Error out if part of test suite but not file refactor, make requested changes
2018-05-07Auto merge of #50000 - michaelwoerister:cross-lang-lto, r=alexcrichtonbors-4/+4
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-06Auto merge of #50468 - nrc:test-rustfmt, r=alexcrichtonbors-0/+3
Pass a test directory to rustfmt Another attempt to fix the rustfmt tests. `RUSTFMT_TEST_DIR` is consumed by Rustfmt in the latext commit (thus the Rustfmt update) because we need a place to create temp files that won't be read-only. r? @alexcrichton
2018-05-06Pass a test directory to rustfmtNick Cameron-0/+3
2018-05-06s/DocTestsOption/DocTests/gkennytm-4/+4
2018-05-06Added test case.kennytm-7/+7
2018-05-06Added `./x.py test --no-doc` option.kennytm-3/+9
This enables `./x.py test --stage 0 src/libstd --no-doc` and ensures the stage2-rustc and rustdoc need to be built.
2018-05-04bootstrap: Fix LLVM bin path setup for Windows.Michael Woerister-11/+0
2018-05-03Make run-make host_test!().Michael Woerister-1/+1
2018-05-03Add LLVM bin directory to PATH for running run-make tests.Michael Woerister-3/+14
2018-04-27Rollup merge of #49707 - steveklabnik:rustc-book, r=QuietMisdreavuskennytm-0/+1
Add "the Rustc book" This PR introduces a new book into the documentation, "The rustc book". We already have books for Cargo, and for Rustdoc, rustc should have some too. This book is focused on *users* of rustc, and provides a nice place to write documentation for users. I haven't put content here, but plan on scaffolding it out very soon, and wanted this PR open for a few discussions first. One of those is "what exactly should said TOC be?" I plan on having a proposed one up tomorrow, but figured I'd let people know to start thinking about it now. The big one is that we also will want to put https://github.com/rust-lang-nursery/rustc-guide in-tree as well, and the naming is... tough. I'm proposing: * doc.rust-lang.org/rustc is "The Rustc book", to mirror the other tools' books. * doc.rust-lang.org/rustc-contribution is "The Rustc contribution guide", and contains that book @nikomatsakis et al, any thoughts on this? I'm not attached to it in particular, but had to put something together to get this discussion going. I think mirroring the other tools is a good idea for this work, but am not sure where exactly that leaves yours. Fixes https://github.com/rust-docs/team/issues/11
2018-04-21Do not test RLS and rustfmt if build of these failed.kennytm-2/+20
Avoid a tool being simultaneously test-pass and build-fail.
2018-04-18Expand `x.py test` to also run with `--compare-mode=nll` on src/test/ui suite.Felix S. Klock II-3/+42
2018-04-17Remove uses of Build across Builder stepsMark Simulacrum-172/+153
2018-04-16Fix empty testsGuillaume Gomez-3/+1
2018-04-16Fix nitsGuillaume Gomez-2/+0
2018-04-16Add rustdoc-ui test suiteGuillaume Gomez-7/+21
2018-04-16Add warning if a resolution failedGuillaume Gomez-0/+35
2018-04-14Rollup merge of #49922 - f-bro:zmiri, r=oli-obkkennytm-1/+1
Remove -Zmiri debugging option
2018-04-13Remove -Z miri debugging optionFabio B-1/+1
2018-04-12Fix test failure in src/tools/rustdoc-themes when rust.rpath = falseChris Coulson-1/+1
2018-04-09Add rustc book to the build systemsteveklabnik-0/+1
2018-04-03Fix a few accidental expectationsMark Simulacrum-8/+14
2018-04-03Avoid printing output when in dry run modeMark Simulacrum-24/+25
2018-04-03Refactor to use a dry-run config instead of cfg(test)Mark Simulacrum-1/+8
This ensures that each build will support the testing design of "dry running" builds. It's also checked that a dry run build is equivalent step-wise to a "wet" run build; the graphs we generate when running are directly compared node/node and edge/edge, both for order and contents.
2018-04-03Add tests to rustbuildMark Simulacrum-0/+1
In order to run tests, previous commits have cfg'd out various parts of rustbuild. Generally speaking, these are filesystem-related operations and process-spawning related parts. Then, rustbuild is run "as normal" and the various steps that where run are retrieved from the cache and checked against the expected results. Note that this means that the current implementation primarily tests "what" we build, but doesn't actually test that what we build *will* build. In other words, it doesn't do any form of dependency verification for any crate. This is possible to implement, but is considered future work. This implementation strives to cfg out as little code as possible; it also does not currently test anywhere near all of rustbuild. The current tests are also not checked for "correctness," rather, they simply represent what we do as of this commit, which may be wrong. Test cases are drawn from the old implementation of rustbuild, though the expected results may vary.
2018-03-25Rollup merge of #49089 - alexcrichton:fix-timings, r=Mark-Simulacrumkennytm-27/+28
rustbuild: Tweak where timing information goes This commit tweaks where timing and step information is printed out as part of the build, ensuring that we do it as close to the location where work happens as possible. In rustbuild various functions may perform long blocking work as dependencies are assembled, so if we print out timing information early on we may accidentally time more than just the step we were intending to time!
2018-03-23Auto merge of #49311 - SimonSapin:bootstrap-vs-rustflags-the-return, ↵bors-0/+6
r=Mark-Simulacrum Use the same RUSTFLAGS for building and testing `bootstrap` This avoids recompiling the whole dependency graph twice for every `./x.py test` run. Fixes #49215
2018-03-23Use the same RUSTFLAGS for building and testing `bootstrap`Simon Sapin-0/+6
Fixes #49215
2018-03-22rustc: Add a `#[wasm_custom_section]` attributeAlex Crichton-7/+12
This commit is an implementation of adding custom sections to wasm artifacts in rustc. The intention here is to expose the ability of the wasm binary format to contain custom sections with arbitrary user-defined data. Currently neither our version of LLVM nor LLD supports this so the implementation is currently custom to rustc itself. The implementation here is to attach a `#[wasm_custom_section = "foo"]` attribute to any `const` which has a type like `[u8; N]`. Other types of constants aren't supported yet but may be added one day! This should hopefully be enough to get off the ground with *some* custom section support. The current semantics are that any constant tagged with `#[wasm_custom_section]` section will be *appended* to the corresponding section in the final output wasm artifact (and this affects dependencies linked in as well, not just the final crate). This means that whatever is interpreting the contents must be able to interpret binary-concatenated sections (or each constant needs to be in its own custom section). To test this change the existing `run-make` test suite was moved to a `run-make-fulldeps` folder and a new `run-make` test suite was added which applies to all targets by default. This test suite currently only has one test which only runs for the wasm target (using a node.js script to use `WebAssembly` in JS to parse the wasm output).
2018-03-17rustbuild: Tweak where timing information goesAlex Crichton-27/+28
This commit tweaks where timing and step information is printed out as part of the build, ensuring that we do it as close to the location where work happens as possible. In rustbuild various functions may perform long blocking work as dependencies are assembled, so if we print out timing information early on we may accidentally time more than just the step we were intending to time!
2018-03-16Automatically enable the `clippy` feature of `rls` if clippy buildsOliver Schneider-4/+14
2018-03-11Auto merge of #48599 - Mark-Simulacrum:rustbuild-updates-step-1, r=alexcrichtonbors-12/+4
Remove ONLY_BUILD and ONLY_BUILD_TARGETS Primarily removes `ONLY_BUILD` and `ONLY_BUILD_TARGETS`. These aren't actually needed in the new system since we can simply not take the relevant `host` and `target` fields if we don't want to run with them in `Step::make_run`. This PR also includes a few other commits which generally clean up the state of rustbuild, but are not related to the `Step` changes.
2018-03-09rustbuild: Fix MSBuild location of `llvm-config.exe`Alex Crichton-2/+5
For LLD integration the path to `llvm-config` needed to change to inside the build directory itself (for whatever reason) but the build directory is different on MSBuild than it is on `ninja` for MSVC builds, so the path to `llvm-config.exe` was actually wrong and not working! This commit removes the `Build::llvm_config` function in favor of the source of truth, the `Llvm` build step itself. The build step was then updated to find the right build directory for MSBuild as well as `ninja` for where `llvm-config.exe` is located. Closes #48749
2018-03-08Remove ONLY_BUILD.Mark Simulacrum-12/+4
All uses are replaced with not accessing run.target/run.host, and instead directly using run.builder.build.build.
2018-03-05Get the path to cargo from rustbuildMark Mansi-0/+1
2018-03-03rust: Import LLD for linking wasm objectsAlex Crichton-1/+1
This commit imports the LLD project from LLVM to serve as the default linker for the `wasm32-unknown-unknown` target. The `binaryen` submoule is consequently removed along with "binaryen linker" support in rustc. Moving to LLD brings with it a number of benefits for wasm code: * LLD is itself an actual linker, so there's no need to compile all wasm code with LTO any more. As a result builds should be *much* speedier as LTO is no longer forcibly enabled for all builds of the wasm target. * LLD is quickly becoming an "official solution" for linking wasm code together. This, I believe at least, is intended to be the main supported linker for native code and wasm moving forward. Picking up support early on should help ensure that we can help LLD identify bugs and otherwise prove that it works great for all our use cases! * Improvements to the wasm toolchain are currently primarily focused around LLVM and LLD (from what I can tell at least), so it's in general much better to be on this bandwagon for bugfixes and new features. * Historical "hacks" like `wasm-gc` will soon no longer be necessary, LLD will [natively implement][gc] `--gc-sections` (better than `wasm-gc`!) which means a postprocessor is no longer needed to show off Rust's "small wasm binary size". LLD is added in a pretty standard way to rustc right now. A new rustbuild target was defined for building LLD, and this is executed when a compiler's sysroot is being assembled. LLD is compiled against the LLVM that we've got in tree, which means we're currently on the `release_60` branch, but this may get upgraded in the near future! LLD is placed into rustc's sysroot in a `bin` directory. This is similar to where `gcc.exe` can be found on Windows. This directory is automatically added to `PATH` whenever rustc executes the linker, allowing us to define a `WasmLd` linker which implements the interface that `wasm-ld`, LLD's frontend, expects. Like Emscripten the LLD target is currently only enabled for Tier 1 platforms, notably OSX/Windows/Linux, and will need to be installed manually for compiling to wasm on other platforms. LLD is by default turned off in rustbuild, and requires a `config.toml` option to be enabled to turn it on. Finally the unstable `#![wasm_import_memory]` attribute was also removed as LLD has a native option for controlling this. [gc]: https://reviews.llvm.org/D42511
2018-02-24Run the external doc tests in tools job.kennytm-6/+16