about summary refs log tree commit diff
path: root/src/libtest/lib.rs
AgeCommit message (Collapse)AuthorLines
2018-10-14add option to libtest to run all testsEmerentius-46/+104
flag name is --include-ignored requires -Zunstable-options for now
2018-10-14refactor filter_testsEmerentius-43/+23
same behaviour, just shorter
2018-09-27Bump to 1.31.0 and bootstrap from 1.30 betaJosh Stone-1/+1
2018-09-24aarch64-pc-windows-msvc: Don't link libpanic_unwind to libtest.Michael Woerister-1/+9
2018-09-15Revert "Auto merge of #53527 - Emerentius:test_all, r=nrc"Eduard-Mihai Burtescu-119/+81
This reverts commit 9f53c87b4b1f097e111c9525d60470ed22631018, reversing changes made to cba0fdf43c22795822e1d7c751a69e6c85007221.
2018-09-15Auto merge of #53527 - Emerentius:test_all, r=nrcbors-81/+119
Add option to run all tests This adds the "--include-ignored" flag to libtest, which allows running ignored and unignored tests in one go. Closes #50363
2018-09-11stabalize infer outlives requirements (RFC 2093).toidiu-1/+0
Co-authored-by: nikomatsakis
2018-09-05rename option to run all tests and make it unstableEmerentius-12/+20
new name: --include-ignored requires -Zunstable-options
2018-09-04Introduce Custom Test FrameworksJohn Renner-1/+2
2018-08-29Replace usages of 'bad_style' with 'nonstandard_style'.Corey Farwell-1/+1
`bad_style` is being deprecated in favor of `nonstandard_style`: - https://github.com/rust-lang/rust/issues/41646
2018-08-24check that adding infer-outlives requirement to all crates worksNiko Matsakis-0/+1
2018-08-20add option to run all testsEmerentius-46/+96
add --all flag to libtest that runs ignored and not ignored tests
2018-08-20refactor filter_testsEmerentius-43/+23
same behaviour, just shorter
2018-08-15Rollup merge of #52453 - srijs:fix-52436, r=TimNNGuillaume Gomez-1/+8
improve diagnostics for tests with custom return values This is an attempt at getting the ball rolling to improve the diagnostics for test functions that return custom `impl Termination` values (see #52436). An alternative could be to use `eprintln!`, but including this in the panic message felt nicely consistent with how failing test assertions would be reported. Let me know what you think!
2018-08-11improve diagnostics for tests with custom return valuesSam Rijs-1/+8
fixes #52436
2018-08-09[nll] libtest: enable feature(nll) for bootstrapmemoryruins-0/+1
2018-07-30Auto merge of #52805 - ljedrz:format_str_literal, r=petrochenkovbors-1/+1
Don't format!() string literals Prefer `to_string()` to `format!()` take 2, this time targetting string literals. In some cases (`&format!("...")` -> `"..."`) also removes allocations. Occurences of `format!("")` are changed to `String::new()`.
2018-07-29Auto merge of #52764 - sinkuu:cleanup, r=nikomatsakisbors-2/+1
Misc cleanups
2018-07-28Don't format!() string literalsljedrz-1/+1
2018-07-27Use str::repeatShotaro Yamada-2/+1
2018-07-25Deny bare_trait_objects globallyTatsuyuki Ishi-2/+0
2018-07-12Deny bare trait objects in librustc_target and libtestljedrz-6/+9
2018-04-16Add rustdoc-ui test suiteGuillaume Gomez-1/+0
2018-04-08Move deny(warnings) into rustbuildMark Simulacrum-1/+0
This permits easier iteration without having to worry about warnings being denied. Fixes #49517
2018-03-21Cargo fmt libtestSeiichi Uchida-180/+145
2018-03-10add stub for retrieving number of CPUsSebastian Humenda-0/+6
2018-02-23re-export `assert_test_result` for use when testing libtest itselfNiko Matsakis-2/+2
2018-02-22move Termination trait to std::processNiko Matsakis-1/+1
2018-02-22put the "unit test" logic into libtestNiko Matsakis-0/+9
Also make `std::termination` module public and rename feature. The lib feature needs a different name from the language feature.
2018-02-04libtest: Replace panics with error messagesGilad Naaman-4/+13
2018-01-26libtest: Failing benchmarks no longer crash the harness.Gilad Naaman-37/+91
2018-01-26libtest: Split-up formatters.rs into smaller modulesGilad Naaman-24/+22
libtest: Split HumanFormatter into {Pretty,Terse} libtest: Fixed padding of benchmarks when not benchmarking libtest: Fixed benchmarks' names not showing in terse-mode libtest: Formatting
2018-01-26libtest: rustfmt runGilad Naaman-258/+383
libtest: Whoops
2018-01-26libtest: Fixed pretty-printing of test names in single-threaded code.Gilad Naaman-9/+13
2018-01-26libtest: JSON formatting is now only available in unstable buildsGilad Naaman-2/+36
libtest: Added the -Z option for unstable options
2018-01-26Added JSON output to libtest.Gilad Naaman-31/+93
libtest: Json format now outputs failed tests' stdouts. libtest: Json format now outputs failed tests' stdouts. libtest: Json formatter now spews individiual events, not as an array libtest: JSON fixes libtest: Better JSON escaping libtest: Test start event is printed on time
2018-01-26Refactoring needed in order to have test json output.Gilad Naaman-232/+62
2018-01-11Make libtest build on CloudABI.Ed Schouten-8/+9
Just like on UNIX systems, we need to use sysconf() to obtain the number of CPUs. Extend the existing cfg()'s to match CloudABI as well.
2018-01-03Restore a FIXME that was removed by one of my previous changes.Ed Schouten-0/+1
Requested by: kennytm
2018-01-02Provide a copy of stdout_isatty() on CloudABI.Ed Schouten-6/+3
CloudABI doesn't make any distinction between TTYs and ordinary pipes. While there, remove the redundant implementation used by Redox. It can use the same stub function.
2018-01-01Move the TestPaths structure from libtest to compiletest.Ed Schouten-7/+0
This structure doesn't seem to be used by libtest itself. It is used by compiletest, but never passed on to anything externally. This makes it easier to get the testing framework to work for CloudABI crossbuilds, as CloudABI currently lacks PathBuf, which is used by TestPaths.
2017-12-15Replace libtest/lib.rs:FnBox with std::boxed::FnBox.Corey Farwell-30/+20
Fixes https://github.com/rust-lang/rust/issues/41810.
2017-12-10Auto merge of #46620 - bjorn3:remove-test-metric, r=kennytmbors-62/+13
Remove *MetricFn fixes #44808
2017-12-10Remove *MetricFnbjorn3-62/+13
2017-11-19std: Add a new wasm32-unknown-unknown targetAlex Crichton-31/+50
This commit adds a new target to the compiler: wasm32-unknown-unknown. This target is a reimagining of what it looks like to generate WebAssembly code from Rust. Instead of using Emscripten which can bring with it a weighty runtime this instead is a target which uses only the LLVM backend for WebAssembly and a "custom linker" for now which will hopefully one day be direct calls to lld. Notable features of this target include: * There is zero runtime footprint. The target assumes nothing exists other than the wasm32 instruction set. * There is zero toolchain footprint beyond adding the target. No custom linker is needed, rustc contains everything. * Very small wasm modules can be generated directly from Rust code using this target. * Most of the standard library is stubbed out to return an error, but anything related to allocation works (aka `HashMap`, `Vec`, etc). * Naturally, any `#[no_std]` crate should be 100% compatible with this new target. This target is currently somewhat janky due to how linking works. The "linking" is currently unconditional whole program LTO (aka LLVM is being used as a linker). Naturally that means compiling programs is pretty slow! Eventually though this target should have a linker. This target is also intended to be quite experimental. I'm hoping that this can act as a catalyst for further experimentation in Rust with WebAssembly. Breaking changes are very likely to land to this target, so it's not recommended to rely on it in any critical capacity yet. We'll let you know when it's "production ready". --- Currently testing-wise this target is looking pretty good but isn't complete. I've got almost the entire `run-pass` test suite working with this target (lots of tests ignored, but many passing as well). The `core` test suite is still getting LLVM bugs fixed to get that working and will take some time. Relatively simple programs all seem to work though! --- It's worth nothing that you may not immediately see the "smallest possible wasm module" for the input you feed to rustc. For various reasons it's very difficult to get rid of the final "bloat" in vanilla rustc (again, a real linker should fix all this). For now what you'll have to do is: cargo install --git https://github.com/alexcrichton/wasm-gc wasm-gc foo.wasm bar.wasm And then `bar.wasm` should be the smallest we can get it! --- In any case for now I'd love feedback on this, particularly on the various integration points if you've got better ideas of how to approach them!
2017-11-06libtest: Force a newline every 100 dots when testing in quiet mode.kennytm-3/+14
Rationale: We use --quiet mode when testing a PR in the CI. Also, we use `stamp` to prefix every line with a timestamp. Previously, when testing in --quiet mode, we will only print a dot for each test without any line breaks. Combined with `stamp`, this means we'd need to wait for all tests to complete before writing the output. On Travis CI, if we don't print anything within 30 minutes, the job will be forcefully canceled. This makes it very easy to spuriously-timeout when testing non-default images like arm-android using the CI. This commit tries to workaround the issue by printing a new line every 100 dots, forcing `stamp` to emit something to reset Travis's countdown.
2017-10-05Remove nacl from libtestest31-4/+2
2017-08-27Platform gate libc in libtestTatsuyuki Ishi-1/+2
2017-08-25*: remove crate_{name,type} attributesTamir Duberstein-2/+3
Fixes #41701.
2017-08-20Make sure crates not opting in to staged_api don't use staged_apiRalf Jung-0/+1