about summary refs log tree commit diff
path: root/src/bootstrap/test.rs
AgeCommit message (Collapse)AuthorLines
2019-03-29Rollup merge of #59366 - ehuss:update-books, r=QuietMisdreavusMazdak Farrokhzad-0/+1
Update books Update reference, book, rust-by-example, edition-guide, embedded-book ## reference 15 commits in 41493ffce5d0e17d54eaf5ec9a995054e2b9aece..27ad493a10364e907ec476e2ad61e8a1614b57e1 2019-03-05 12:32:22 +0100 to 2019-03-26 02:06:15 +0100 - Document wasm_import_module for #[link]. (rust-lang-nursery/reference#554) - Fix tidy error. (rust-lang-nursery/reference#552) - Some minor contributing updates. (rust-lang-nursery/reference#551) - Document `type_length_limit`. (rust-lang-nursery/reference#546) - Add some terms to the glossary. (rust-lang-nursery/reference#547) - Document `target_feature` and `cfg_target_feature`. (rust-lang-nursery/reference#545) - Remove undocumented page (rust-lang-nursery/reference#539) - Reorg and update attributes (rust-lang-nursery/reference#537) - Fix some minor link errors. (rust-lang-nursery/reference#538) - Add linkchecker. (rust-lang-nursery/reference#521) - Expand docs on Macros By Example. (rust-lang-nursery/reference#511) - document #[panic_handler] (rust-lang-nursery/reference#362) - document #[used] (rust-lang-nursery/reference#361) - Note that UB is program-global (rust-lang-nursery/reference#490) - Fix copy-paste error in procedural-macros.md (rust-lang-nursery/reference#533) ## book 16 commits in 9cffbeabec3bcec42d09432bfe7705125c848889..b93ec30bbc7b1b5c2f44223249ab359bed2ed5a6 2019-03-02 08:22:41 -0500 to 2019-03-26 16:54:10 -0400 - Unignore example that now compiles - Fix code snippet (rust-lang/book#1863) - Fix mdbook link text in readme (rust-lang/book#1881) - Wrap to 80 cols - Make sentence more complete (rust-lang/book#1885) - consistenly use increment and decrement (rust-lang/book#1884) - Fix link to Reference's conditional-compilation. (rust-lang/book#1878) - Fix subject/verb agreement - Remove nostarch snapshot files that have been incorporated and checked - haha teach the dictionary steve's name - Add authorship info to the front page - fix accidental <ol>'s (rust-lang/book#1866) - Edits to Macros (rust-lang/book#1848) - Mention `lock` returns `MutexGuard` wrapped in a `LockResult` - Add an example that illustrates NLL (rust-lang/book#1842) - change the parameter name from `type` to `kind` (rust-lang/book#1845) ## rust-by-example 33 commits in 2ce92beabb912d417a7314d6da83ac9b50dc2afb..f68ef3d0f4959f6a7d92a08d9994b117f0f4d32d 2018-11-20 10:10:23 -0500 to 2019-03-12 15:32:12 -0300 - Fix some broken links. (rust-lang/rust-by-example#1161) - Update links in README (rust-lang/rust-by-example#1167) - Add score/lifetimes/trait.md (rust-lang/rust-by-example#1168) - Fix rust-lang/rust-by-example#1147 - No more `open_mode` method (rust-lang/rust-by-example#1164) - Fix for loop description in list print example (rust-lang/rust-by-example#1162) - Add link to Cargo chapter in the index page (rust-lang/rust-by-example#1159) - Fix grammar in sentence about integer notation (rust-lang/rust-by-example#1157) - Do not use deprecated functions from `std::error::Error` trait (rust-lang/rust-by-example#1151) - Update new_types.md to clarify conversion to base type (rust-lang/rust-by-example#1148) - Fix compatibility with Rust 2018 (rust-lang/rust-by-example#1150) - Hello: Fix hint link in `fmt` chapter. (rust-lang/rust-by-example#1146) - Clarify pub(restricted) example a bit (rust-lang/rust-by-example#1133) - Add "literal" to list of macro designators (rust-lang/rust-by-example#1153) - Minor fixes for the macros chapter (rust-lang/rust-by-example#1113) - Use new book links instead of the old second-edition ones (rust-lang/rust-by-example#1143) - Recommend implementing Display over ToString (rust-lang/rust-by-example#1145) - Remove unused import and format with `rustfmt` (rust-lang/rust-by-example#1144) - fix typo (rust-lang/rust-by-example#1142) - Update syntax for 2018 Edition (rust-lang/rust-by-example#1136) - Added two missing full stops (rust-lang/rust-by-example#1138) - Removed unnecessary spaces before macro designators in macros/dry (rust-lang/rust-by-example#1139) - fix install mdbook command (rust-lang/rust-by-example#1128) - Changed word `function` to `type` in comment of fn area (rust-lang/rust-by-example#1132) - Added two missing backticks in generics/multi_bounds (rust-lang/rust-by-example#1129) - Fixed small logic error in error/option_unwrap/and_then (rust-lang/rust-by-example#1127) - Fix typo (rust-lang/rust-by-example#1125) - The code of conduct link was dead. I fixed it. (rust-lang/rust-by-example#1122) - I added a space in the Display fmt for Complex (rust-lang/rust-by-example#1123) - Fix Rust install link in the index (rust-lang/rust-by-example#1124) - Update cargo conventions section (rust-lang/rust-by-example#1121) - Fixed curly braces in the `To and from Strings` chapter to be parentheses (rust-lang/rust-by-example#1120) - Edit a typo (rust-lang/rust-by-example#1119) - Fixes rust-lang/rust-by-example#1115 by correcting the typo from into_iterator to into_iter (rust-lang/rust-by-example#1118) ## edition-guide 1 commits in aa0022c875907886cae8f3ef8e9ebf6e2a5e728d..b56ddb11548450a6df4edd1ed571b2bc304eb9e6 2019-02-27 22:10:39 -0800 to 2019-03-10 10:23:16 +0100 - Links fixes (rust-lang-nursery/edition-guide#133) ## embedded-book 6 commits in 9e656ead82bfe869493dec82653a52e27fa6a05c..07fd3880ea0874d82b1d9ed30ad3427ec98b4e8a 2019-03-03 16:03:26 +0000 to 2019-03-27 15:40:52 +0000 - Fix test errors. (rust-embedded/book#180) - Update qemu.md (rust-embedded/book#170) - Update no-std.md to remove obsolete FAQ link (rust-embedded/book#177) - We've come a long way :) (rust-embedded/book#176) - Correct link to team (rust-embedded/book#175) - Update some book links to their new homes. (rust-embedded/book#173)
2019-03-27Update booksEric Huss-0/+1
2019-03-24Add a way to track Rustfix UI test coveragePhilipp Hansch-0/+4
This came out of the first Rustfix WG meeting. One of the goals is to enable Rustfix tests for all UI tests that trigger lints with `MachineApplicable` suggestions. In order to do that we first want to create a tracking issue that lists all files with missing `// run-rustfix` headers. This PR adds a `--rustfix-coverage` flag to `./x.py` and compiletest to list the files with the missing headers in `/tmp/rustfix_missing_coverage.txt`. From that file we can create the tracking issue and at some point also enforce the `// run-rustfix` flag on UI tests with `MachineApplicable` lints.
2019-03-20Auto merge of #58897 - Mark-Simulacrum:tool-rework, r=alexcrichtonbors-9/+9
Rework how bootstrap tools are built This makes bootstrap tools buildable and testable in stage 0 with the downloaded bootstrap compiler, futhermore, it makes it such that they cannot be built in any other stage. Notably, this will also mean that compiletest may need to wait a cycle before it can use changes to `libtest`, as it no longer depends on the in-tree libtest.
2019-03-20Auto merge of #58791 - denzp:asm-compile-tests, r=alexcrichtonbors-0/+6
Introduce assembly tests suite The change introduces a new test suite - **Assembly** tests. The motivation behind this is an ability to perform end-to-end codegen testing with LLVM backend. Turned out, NVPTX backend sometimes missing common Rust features (`i128` and libcalls in the past, and still full atomics support) due to different reasons. Prior to this change, basic NVPTX assembly tests were implemented within `run-make` suite. Now, it's easier to write additional and maintain existing tests for the target. cc @gnzlbg @peterhj cc @eddyb I adjusted mangling scheme expectation, so there is no need to change the tests for #57967
2019-03-16Merge remote-tracking branch 'upstream/master' into asm-compile-testsDenys Zariaiev-9/+3
2019-03-16[bootstrap] Remove llvm.enabled configbjorn3-7/+1
2019-03-15rustbuild: remove obsolete fulldeps behavior from src/test/pretty tests, and ↵Eduard-Mihai Burtescu-9/+3
enable them by default.
2019-03-13Merge remote-tracking branch 'upstream/master' into asm-compile-testsDenys Zariaiev-9/+53
2019-03-03Permit getting stage 0 rustdocMark Rousskov-4/+4
This allows us to e.g. test compiletest, including doctests, in stage 0 without building a fresh compiler and rustdoc.
2019-03-03Tools built by the bootstrap compiler must be built by itMark Rousskov-5/+5
This avoids building compilers that we don't need -- most tools will work just fine with the downloaded compiler.
2019-02-28Move rustdoc-js testing into compiletestGuillaume Gomez-49/+13
2019-02-27Introduce assembly testsDenys Zariaiev-0/+6
2019-02-25Update to last updatesGuillaume Gomez-3/+3
2019-02-25Move documentation build into bootstrapGuillaume Gomez-5/+41
2019-02-25Rename rustdoc js test suitesGuillaume Gomez-9/+9
2019-02-25Add rustdoc JS non-std testsGuillaume Gomez-0/+44
2019-02-25bootstrap: deny(rust_2018_idioms)Taiki Endo-75/+75
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`.