about summary refs log tree commit diff
path: root/src/libtest
AgeCommit message (Collapse)AuthorLines
2018-05-02Remove leftover tab in libtest outputsPhilipp Hansch-4/+4
Closes #50362
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-233/+182
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-523/+776
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-576/+747
libtest: Whoops
2018-01-26libtest: Fixed pretty-printing of test names in single-threaded code.Gilad Naaman-36/+69
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-50/+312
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/+308
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-02Auto merge of #47106 - EdSchouten:compiletest-cloudabi, r=alexcrichtonbors-7/+0
Tiny fixes to make compiletest work for CloudABI cross builds I'm currently working toward getting a `src/ci/docker` container working to do isolated/automated builds and testing of `x86_64-unknown-cloudabi`. This is working pretty well, but still requires some fixes to `libtest` and `compiletest`. Here is the first set of fixes that I had to apply.
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.
2018-01-01Fix docs for future pulldown migrationMalo Jaffré-9/+9
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
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-19/+19
Like #43008 (f668999), but _much more aggressive_.
2017-07-13Reduce the usage of features in compiletest and libtestOliver Schneider-2/+0
2017-06-25only show allowed failure count if there are allowed failuresPaul Woolcock-3/+13
2017-06-24fix some tests i missedPaul Woolcock-0/+13
2017-06-24Shorten some lines so this can pass the tidy checksPaul Woolcock-8/+10
2017-06-24add `allow_fail` test attributePaul Woolcock-3/+20
This change allows the user to add an `#[allow_fail]` attribute to tests that will cause the test to compile & run, but if the test fails it will not cause the entire test run to fail. The test output will show the failure, but in yellow instead of red, and also indicate that it was an allowed failure.
2017-06-20Switch to the crates.io `getopts` crateAlex Crichton-25/+26
This commit deletes the in-tree `getopts` crate in favor of the crates.io-based `getopts` crate. The main difference here is with a new builder-style API, but otherwise everything else remains relatively standard.
2017-06-15Update older URLs pointing to the first edition of the BookWonwoo Choi-1/+1
`compiler-plugins.html` is moved into the Unstable Book. Explanation is slightly modified to match the change.
2017-05-11Number of filtered out tests in tests summaryMike Lubinets-2/+13
Closes #31905
2017-05-09Don't show the std frames before user code on unwinding.Yamakaky-5/+21
When `RUST_BACKTRACE=1`, remove all frames after `__rust_maybe_catch_panic`. Tested on `main`, threads, tests and benches. Cleaning of the top of the stacktrace is let to a future PR. Fixes #40201 See #41815
2017-05-05Add Options type in libtest and remove argumentGuillaume Gomez-13/+32
2017-05-02Add option to display warnings in rustdocGuillaume Gomez-3/+46
2017-04-04Fix linkssteveklabnik-2/+4
part of https://github.com/rust-lang/rust/issues/40912 []\n() is not actually a link.
2017-02-27fix typoking6cong-2/+2
2017-02-14make more types publicOliver Schneider-1/+1
2017-02-14enable tools to use test runners programmaticallyOliver Schneider-2/+2
2017-02-12Auto merge of #38945 - battisti:fix_thread_num, r=alexcrichtonbors-0/+2
treat setting the number of test-threads to 0 as an error It is currently possible to call `cargo test -- --test-threads=0` which will cause cargo to hang until aborted. This change will fix that and will report an appropriate error to the user.
2017-02-11removed trailing whitespaceAlexander Battisti-1/+1
2017-01-12Auto merge of #38779 - Craig-Macomber:bench, r=alexcrichtonbors-97/+148
Do not run outer setup part of benchmarks multiple times to fix issue 20142 Fix #20142 This is my first real rust code, so I expect the quality is quite bad. Please let me know in which ways it is horrible and I'll fix it. Previously the whole benchmark function was rerun many times, but with this change, only the callback passed to iter is rerun. This improves performances by saving benchmark startup time. The setup used to be called a minimum of 101 times, and now only runs once. I wasn't sure exactly what should be done for the case where iter is never called, so I left a FIXME for that: currently it does not error, and I added tests to cover that. I have left the algorithm and statistics unchanged: I don't like how the minimum number of runs is 301 (that's bad for very slow benchmarks) but I consider such changes out of scope for this fix.