about summary refs log tree commit diff
path: root/src/bootstrap/test.rs
AgeCommit message (Collapse)AuthorLines
2019-02-10rustc: doc commentsAlexander Regueiro-8/+8
2019-02-06Add embedded book to test such that checktools worksMark Rousskov-0/+1
2019-01-31Auto merge of #57514 - michaelwoerister:xlto-tests, r=alexcrichtonbors-3/+21
compiletest: Support opt-in Clang-based run-make tests and use them for testing xLTO. Some cross-language run-make tests need a Clang compiler that matches the LLVM version of `rustc`. Since such a compiler usually isn't available these tests (marked with the `needs-matching-clang` directive) are ignored by default. For some CI jobs we do need these tests to run unconditionally though. In order to support this a `--force-clang-based-tests` flag is added to compiletest. If this flag is specified, `compiletest` will fail if it can't detect an appropriate version of Clang. @rust-lang/infra The PR doesn't yet enable the tests yet. Do you have any recommendation for which jobs to enable them? cc #57438 r? @alexcrichton
2019-01-24Remove quote_*! macros and associated APIsMark Simulacrum-20/+0
2019-01-17compiletest: Simplify handling of Clang-based tests.Michael Woerister-16/+9
2019-01-17Support clang-based run-make tests in rustbuild.Michael Woerister-5/+30
2018-12-28Update cargo, rls, miriEric Huss-7/+0
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-15Auto merge of #56600 - ljedrz:fix_edition, r=Mark-Simulacrumbors-12/+12
bootstrap: fix edition A byproduct of work on https://github.com/rust-lang/rust/pull/56595; done with `cargo fix --edition`.
2018-12-14Bootstrap: Add testsuite for compiletest toolPhilipp Hansch-0/+39
The (currently) single unit test of the compiletest tool was never executed on CI. At least I couldn't find any references of it in the logs. This adds a test suite for compiletest so that our tester is tested, too. The compiletest tests can then also be executed with: ./x.py test src/tools/compiletest
2018-12-11std: Depend directly on crates.io cratesAlex Crichton-4/+1
Ever since we added a Cargo-based build system for the compiler the standard library has always been a little special, it's never been able to depend on crates.io crates for runtime dependencies. This has been a result of various limitations, namely that Cargo doesn't understand that crates from crates.io depend on libcore, so Cargo tries to build crates before libcore is finished. I had an idea this afternoon, however, which lifts the strategy from #52919 to directly depend on crates.io crates from the standard library. After all is said and done this removes a whopping three submodules that we need to manage! The basic idea here is that for any crate `std` depends on it adds an *optional* dependency on an empty crate on crates.io, in this case named `rustc-std-workspace-core`. This crate is overridden via `[patch]` in this repository to point to a local crate we write, and *that* has a `path` dependency on libcore. Note that all `no_std` crates also depend on `compiler_builtins`, but if we're not using submodules we can publish `compiler_builtins` to crates.io and all crates can depend on it anyway! The basic strategy then looks like: * The standard library (or some transitive dep) decides to depend on a crate `foo`. * The standard library adds ```toml [dependencies] foo = { version = "0.1", features = ['rustc-dep-of-std'] } ``` * The crate `foo` has an optional dependency on `rustc-std-workspace-core` * The crate `foo` has an optional dependency on `compiler_builtins` * The crate `foo` has a feature `rustc-dep-of-std` which activates these crates and any other necessary infrastructure in the crate. A sample commit for `dlmalloc` [turns out to be quite simple][commit]. After that all `no_std` crates should largely build "as is" and still be publishable on crates.io! Notably they should be able to continue to use stable Rust if necessary, since the `rename-dependency` feature of Cargo is soon stabilizing. As a proof of concept, this commit removes the `dlmalloc`, `libcompiler_builtins`, and `libc` submodules from this repository. Long thorns in our side these are now gone for good and we can directly depend on crates.io! It's hoped that in the long term we can bring in other crates as necessary, but for now this is largely intended to simply make it easier to manage these crates and remove submodules. This should be a transparent non-breaking change for all users, but one possible stickler is that this almost for sure breaks out-of-tree `std`-building tools like `xargo` and `cargo-xbuild`. I think it should be relatively easy to get them working, however, as all that's needed is an entry in the `[patch]` section used to build the standard library. Hopefully we can work with these tools to solve this problem! [commit]: https://github.com/alexcrichton/dlmalloc-rs/commit/28ee12db813a3b650a7c25d1c36d2c17dcb88ae3
2018-12-10bootstrap: fix editionljedrz-12/+12
2018-12-09Remove compile-fail-fulldeps test suiteVadim Petrochenkov-6/+0
2018-12-08Auto merge of #56578 - alexreg:cosmetic-1, r=alexregbors-2/+2
Various minor/cosmetic improvements to code r? @Centril 😄
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-2/+2
2018-12-07use top level `fs` functions where appropriateAndy Russell-6/+3
This commit replaces many usages of `File::open` and reading or writing with `fs::read_to_string`, `fs::read` and `fs::write`. This reduces code complexity, and will improve performance for most reads, since the functions allocate the buffer to be the size of the file. I believe that this commit will not impact behavior in any way, so some matches will check the error kind in case the file was not valid UTF-8. Some of these cases may not actually care about the error.
2018-11-30ci: Only run compare-mode tests on one builderAlex Crichton-1/+7
The run-pass test suite currently takes 30 minutes on Windows, and that appears to be roughly split between two 15 minute runs of the test suite: one without NLL and one with NLL. In discussion on Discord the platform coverage of the NLL compare mode may not necessarily be worth it, so this commit removes the NLL compare mode from tests by default, and then reenables it on only one builder.
2018-11-30bootstrap: provide host `rust_test_helpers` to compiletest, not just target.Eduard-Mihai Burtescu-1/+7
2018-11-30bootstrap: ensure that `libproc_macro` is available on the host for tests ↵Eduard-Mihai Burtescu-0/+3
even when cross-compiling.
2018-11-30tests: move all proc_macro tests from -fulldeps.Eduard-Mihai Burtescu-6/+0
2018-11-25Try to make top-level Cargo.toml work without __CARGO_TEST_ROOT.Eduard-Mihai Burtescu-1/+0
2018-11-22Move Cargo.{toml,lock} to the repository root directory.Eduard-Mihai Burtescu-0/+1
2018-11-02Remove all jemalloc-related contentAlex Crichton-4/+1
This commit removes all jemalloc related submodules, configuration, etc, from the bootstrap, from the standard library, and from the compiler. This will be followed up with a change to use jemalloc specifically as part of rustc on blessed platforms.
2018-10-26Rollup merge of #55391 - matthiaskrgr:bootstrap_cleanup, r=oli-obkkennytm-10/+10
bootstrap: clean up a few clippy findings remove useless format!()s remove redundant field names in a few struct initializations pass slice instead of a vector to a function use is_empty() instead of comparisons to .len() No functional change intended.
2018-10-26bootstrap: clean up a few clippy findingsMatthias Krüger-10/+10
remove useless format!()s remove redundant field names in a few struct initializations pass slice instead of a vector to a function use is_empty() instead of comparisons to .len() No functional change intended.
2018-10-26Remove redundant cloneShotaro Yamada-1/+1
2018-10-21Remove the parse-fail test suiteVadim Petrochenkov-6/+0
2018-10-20Update Cargo, build curl/OpenSSL statically via featuresAlex Crichton-6/+12
In addition to to updating Cargo's submodule and Cargo's dependencies, this also updates Cargo's build to build OpenSSL statically into Cargo as well as libcurl unconditionally. This removes OpenSSL build logic from the bootstrap code, and otherwise requests that even on OSX we build curl statically.
2018-10-10Run both lldb and gdb testsTom Tromey-14/+6
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-4/+27
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-21Run the newly `ui`-ified run-pass tests under `compare-mode=nll` as well.Felix S. Klock II-2/+3
Fix #53764.
2018-09-14Rollup merge of #53829 - alexcrichton:release-debuginfo, r=michaelwoeristerkennytm-2/+2
Add rustc SHA to released DWARF debuginfo This commit updates the debuginfo that is encoded in all of our released artifacts by default. Currently it has paths like `/checkout/src/...` but these are a little inconsistent and have changed over time. This commit instead attempts to actually define the file paths in our debuginfo to be consistent between releases. All debuginfo paths are now intended to be `/rustc/$sha` where `$sha` is the git sha of the released compiler. Sub-paths are all paths into the git repo at that `$sha`.
2018-09-10Add rustc SHA to released DWARF debuginfoAlex Crichton-2/+2
This commit updates the debuginfo that is encoded in all of our released artifacts by default. Currently it has paths like `/checkout/src/...` but these are a little inconsistent and have changed over time. This commit instead attempts to actually define the file paths in our debuginfo to be consistent between releases. All debuginfo paths are now intended to be `/rustc/$sha` where `$sha` is the git sha of the released compiler. Sub-paths are all paths into the git repo at that `$sha`.
2018-09-09merge cargo changes done by https://github.com/rust-lang/rust/pull/53935/Eric Huss-0/+2
(done by matthiaskrgr, but I authored ehuss)
2018-08-08[CI] run-make/thumb: remove a trailing space.Hideki Sekine-1/+1
2018-08-08[CI] run-make/thumb: remove hacky workaround.Hideki Sekine-1/+11
2018-08-02Update Cargo submoduleAlex Crichton-0/+2
Bring in some fixes for `cargo fix` notably
2018-07-29Copy the test_data/ RLS tests into a writable directory.kennytm-0/+7
See rust-lang-nursery/rls#966 for details.
2018-07-26Refactor is_external_tool into source_typeTatsuyuki Ishi-7/+7
2018-07-25bootstrap: use prepare_tool_cargo everywhereTatsuyuki Ishi-24/+22
In this way, RUSTC_NO_PREFER_DYNAMIC is already specified and not needed.
2018-07-25Deny bare_trait_objects globallyTatsuyuki Ishi-3/+6
2018-07-24Rollup merge of #52627 - Mark-Simulacrum:rustdoc-test-correct, r=alexcrichtonkennytm-0/+1
Compile rustc before building tests for rustdoc r? @alexcrichton
2018-07-22Compile rustc before building tests for rustdocMark Rousskov-0/+1
2018-07-21Treat no_std(target) == None case correctly.Hideki Sekine-1/+1
2018-07-18Fix rust issue #52163Hideki Sekine-1/+3
2018-07-03Compile stage0 tools with the raw bootstrap compilerAlex Crichton-1/+4
This commit updates the stage0 build of tools to use the libraries of the stage0 compiler instead of the compiled libraries by the stage0 compiler. This should enable us to avoid any stage0 hacks (like missing SIMD).
2018-07-03Fixed detection of test-fail for doctests.kennytm-8/+6
2018-06-22Handle current directory prefix for parsing command arguments in bootstrap ↵Steven Laabs-0/+6
test command.
2018-06-19Auto merge of #51367 - oli-obk:silence!_I_test_you, r=Mark-Simulacrumbors-7/+7
Use quiet tests by default r? @eddyb
2018-06-16Prevent Windows filesystem races in bootstrap testsMark Simulacrum-0/+3