summary refs log tree commit diff
path: root/src/libtest
AgeCommit message (Collapse)AuthorLines
2019-10-29Rollup merge of #65898 - hermitcore:rusty-hermit, r=kennytmTyler Mandry-1/+7
add basic HermitCore support within libtest This an extension to #65167. The current pull request extend libtest to support HermitCore as target OS.
2019-10-28removing trailing whitespacesStefan Lankes-1/+1
2019-10-28add basic HermitCore support within libtestStefan Lankes-1/+7
2019-10-25Re-enable Emscripten's exception handling supportThomas Lively-2/+2
Passes LLVM codegen and Emscripten link-time flags for exception handling if and only if the panic strategy is `unwind`. Sets the default panic strategy for Emscripten targets to `unwind`. Re-enables tests that depend on unwinding support for Emscripten, including `should_panic` tests.
2019-10-23Rollup merge of #64178 - mati865:clippy, r=scottmcmMazdak Farrokhzad-4/+4
More Clippy fixes for alloc, core and std Continuation of https://github.com/rust-lang/rust/pull/63805
2019-10-23Public some types for compiletest_rsLzu Tao-3/+4
2019-10-22Apply clippy::needless_return suggestionsMateusz Mikuła-4/+4
2019-10-21Remove unneccessary use under cfg(unix)Igor Aleksanov-12/+2
2019-10-18Add public re-exports for benchesIgor Aleksanov-2/+4
2019-10-17Improve code styleIgor Aleksanov-21/+41
2019-10-17Add more explaining comments to the codeIgor Aleksanov-68/+94
2019-10-17Split options parsing into several functionsIgor Aleksanov-123/+179
2019-10-17Make enum usage explicit and fix testsIgor Aleksanov-161/+289
2019-10-17Extract ConsoleTestStateIgor Aleksanov-286/+317
2019-10-17Split libtest into several smaller modulesIgor Aleksanov-1385/+1462
2019-10-16Upgrade Emscripten targets to use upstream LLVM backendThomas Lively-5/+16
- Compatible with Emscripten 1.38.46-upstream or later upstream. - Refactors the Emscripten target spec to share code with other wasm targets. - Replaces the old incorrect wasm32 C call ABI with the correct one, preserving the old one as wasm32_bindgen_compat for wasm-bindgen compatibility. - Updates the varargs ABI used by Emscripten and deletes the old one. - Removes the obsolete wasm32-experimental-emscripten target. - Uses EMCC_CFLAGS on CI to avoid the timeout problems with #63649.
2019-10-12Auto merge of #64873 - popzxc:prettify-test-time, r=wesleywiserbors-117/+593
Enhance report-time option ## Short overview This PR is a follow-up to a previously closed #64714 PR. ## Changes introduced by this PR * `libtest` now retrieves the type of the test within `TestDesc` (available types are: `UnitTest`, `IntegrationTest`, `DocTest`, `Unknown`). * `--report-time` subcommand of the `libtest` now supports colored output (disabled by default). * Colorized output depends on the threshold values. Default values (proposed by @wesleywiser): - For unit-tests: 50ms warn/100ms critical, - For integration-tests: 500ms warn/1000ms critical, - For doctests: same as for integration tests, - For unknown tests: `TEST_WARN_TIMEOUT_S` warn/ `TEST_WARN_TIMEOUT_S * 2` critical (it will only applied single-threaded mode, because otherwise test will be interrupted after reaching `TEST_WARN_TIMEOUT_S`). - These values can be overrided by setting environment variables (since those thresholds are somewhat constant for every project, it's more flexible to use environment variables than command line arguments). * New optional flag `--ensure-test-time` for `libtest`. With this flag applied, exectuion time limit excesss will cause test failure. ## What have not been done There was a comment that it would be nice to have an entry in the Cargo book about it. However, changes introduced by this PR (and #64663 in which `report-time` flag was added) aren't related directly to `cargo`, it's more about `libtest` itself. I'm considering that [The Unstable Book](https://doc.rust-lang.org/unstable-book/) is more appropriate place, but not sure if I'm right (and if so, how exactly it should be described). As one possible option, this PR may be merged without denoting it in the documentation, and in the next PR adding support of this feature to the `cargo` itself, I'll add a note in the Cargo book. ## Scope of this PR Logical scope of this PR is `libtest` only. However, to get test types, I had to modify also `libsyntax_ext` and `librustdoc` for them to provide information about test type. ## Rationale Rationale for colored output was submitted in #64714 Providing the information about kind of test was also proposed in #64714, and as an additional benefit this information may be useful for the tools using `libtest` (e.g. `cargo`). Adding flag to treat time limits excess seems logical to me, so projects that do care about test execution time won't have to invent a wheel. ## Backward compatibility All the changes are completely backward compatible. ## Demo ![rustc_enhanced_time](https://user-images.githubusercontent.com/12111581/65818381-c04f6800-e219-11e9-9875-322463abe24f.gif) r? @wesleywiser
2019-10-09Follow the styling guideIgor Aleksanov-2/+10
2019-10-09Make interface of the feature more convenientIgor Aleksanov-6/+20
2019-10-09Resolve divergency with masterIgor Aleksanov-26/+54
2019-10-05Revert "Auto merge of #63649 - tlively:emscripten-upstream-upgrade, ↵Tyler Mandry-13/+4
r=alexcrichton" This reverts commit 7870050796e5904a0fc85ecbe6fa6dde1cfe0c91, reversing changes made to 2e7244807a7878f6eca3eb7d97ae9b413aa49014.
2019-10-04Fix ABI, run and fix more tests, re-enable CI for PRsThomas Lively-4/+13
2019-10-02Remove rustdoc warningGuillaume Gomez-1/+1
2019-09-29libtest: encapsulate time-related logic and avoid unnecessary allocationsIgor Aleksanov-19/+39
2019-09-29Enhance report-time optionIgor Aleksanov-95/+501
2019-09-28Spawn one subprocess per unit test when panic=abortTyler Mandry-98/+291
2019-09-26Include message on tests that should panicKenny Goodin-2/+3
2019-09-22libtest: Make --report-time an unstable optionJakob Schikowski-1/+7
2019-09-21libtest: Add --report-time flag to print test execution timeJakob Schikowski-48/+162
2019-08-27Rollup merge of #62600 - emmericp:libtest-add-show-output, r=gnzlbgMazdak Farrokhzad-39/+78
libtest: add --show-output flag to print stdout of successful tests This pull request adds a new flag `--show-output` for tests to show the output of successful tests. For most formatters this was already supported just not exposed via the CLI (apparently only used by `librustdoc`). I've also added support for this option in the JSON formatter. This kind of fixes https://github.com/rust-lang/rust/issues/54669 which wants `--format json` to work with `--nocapture`, which is... well, impossible. What this issue really calls for is `--show-output` as implemented here.
2019-08-23bootstrap: Merge the libtest build step with libstdAlex Crichton-1/+15
Since its inception rustbuild has always worked in three stages: one for libstd, one for libtest, and one for rustc. These three stages were architected around crates.io dependencies, where rustc wants to depend on crates.io crates but said crates don't explicitly depend on libstd, requiring a sysroot assembly step in the middle. This same logic was applied for libtest where libtest wants to depend on crates.io crates (`getopts`) but `getopts` didn't say that it depended on std, so it needed `std` built ahead of time. Lots of time has passed since the inception of rustbuild, however, and we've since gotten to the point where even `std` itself is depending on crates.io crates (albeit with some wonky configuration). This commit applies the same logic to the two dependencies that the `test` crate pulls in from crates.io, `getopts` and `unicode-width`. Over the many years since rustbuild's inception `unicode-width` was the only dependency picked up by the `test` crate, so the extra configuration necessary to get crates building in this crate graph is unlikely to be too much of a burden on developers. After this patch it means that there are now only two build phasese of rustbuild, one for libstd and one for rustc. The libtest/libproc_macro build phase is all lumped into one now with `std`. This was originally motivated by rust-lang/cargo#7216 where Cargo was having to deal with synthesizing dependency edges but this commit makes them explicit in this repository.
2019-08-21revert num_cpus changenewpavlov-1/+6
2019-08-21fix num_cpusArtyom Pavlov-7/+2
2019-08-21fix libtestArtyom Pavlov-2/+1
2019-08-02Remove some more `cfg(test)`sVadim Petrochenkov-22/+21
2019-08-02libtest: Unconfigure tests during normal buildVadim Petrochenkov-95/+89
2019-07-31Remove derives `Encodable`/`Decodable` and unstabilize attribute `#[bench]`Vadim Petrochenkov-1/+1
2019-07-28Remove lint annotations in specific crates that are already enforced by ↵Vadim Petrochenkov-1/+0
rustbuild Remove some random unnecessary lint `allow`s
2019-07-16Add supporting for vxWorksBaoshan Pang-0/+6
r? @alexcrichton
2019-07-12libtest: support display_output in JSON formatterPaul Emmerich-34/+56
2019-07-11libtest: add --show-output optionPaul Emmerich-5/+22
this new flag enables printing the captured stdout of successful tests utilizing the already existing display_output test runner option
2019-06-16Separate libtest modulechansuke-1031/+1029
2019-05-30Make "panic did not include expected string" message consistentvarkor-2/+2
Note messages are typically lowercase.
2019-05-24Use FnOnce instead of FnBox in libtestSimon Sapin-4/+2
2019-05-20Rollup merge of #60895 - chandde:master, r=alexcrichtonMazdak Farrokhzad-4/+5
Enable thumbv7a-pc-windows-msvc target build end to end in rust/master With this PR, plus another commit https://github.com/rust-lang-nursery/compiler-builtins/commit/cf98161da7ed5217b6031796f0f60b4dd07148a4, I'm able to build the target thumbv7a-pc-windows-msvc successfully, and I'm able to use the stage2 artifacts to build arm32 projects. The commit in compiler_builtins is in release 0.1.14, the current cargo.lock in rust master still uses 0.1.12, so I bumped the compiler_builtins version in cargo.lock to 0.1.15 The command I used to build rust ``` c:\python27\python.exe x.py build --host x86_64-pc-windows-msvc --build x86_64-pc-windows-msvc --target thumbv7a-pc-windows-msvc --verbose ``` **Changes** 1. update cargolock to use compiler_builtins 0.1.15 2. handle libunwind in libtest for thumv7a the same as what we have for aarch64 3. in llvm codegen add a field in CodegenContext to carry the arch, so later in create_msvc_imps function, the arch can be used to check against "x86", instead of 32 pointer width. Apparently Thumv7a is handled differently than x86. **Background** I'm from Microsoft working on enabling Azure IoTEdge on ARM32 Windows IoTCore, Azure IoTEdge has a component called IoTEdged written in rust as a NT service running on Windows, so we need to enable rust on thumbv7a in order to have full IoTEdge. My colleague had made some heavy lifting and we've been using our private toolchain to build IoTEdged in our devops pipeline, because at that time we cannot build thumbv7a target end to end successfully. This change is a followup to enable the end to end build for thumbv7a-pc-windows-msvc target. **Next step** I'll submit more changes to have this target built nightly in rust/master, to achieve the same availability for aarch64-pc-windows-msvc, indexed here https://rust-lang.github.io/rustup-components-history/aarch64-pc-windows-msvc.html and can be manually installed. **Please do share what takes to make this happen, is there a formal process I need to follow\?**
2019-05-18fix line lengthchandde-3/+4
2019-05-17optimize the arm64 OR arm32 checkchandde-1/+1
2019-05-14Update lib.rschandde-3/+3
2019-05-13Remove bitrig support from rustMarcel Hellwig-1/+0
2019-05-05Update getopts to 0.2.19varkor-1/+1