Commit Graph

532 Commits

Author SHA1 Message Date
Josh Stone
ce034951fb Bump to 1.31.0 and bootstrap from 1.30 beta 2018-09-27 20:52:53 -07:00
Michael Woerister
f2bf92a4e8 aarch64-pc-windows-msvc: Don't link libpanic_unwind to libtest. 2018-09-24 14:37:09 +02:00
Eduard-Mihai Burtescu
bde0a54737 Revert "Auto merge of #53527 - Emerentius:test_all, r=nrc"
This reverts commit 9f53c87b4b, reversing
changes made to cba0fdf43c.
2018-09-15 22:48:38 +03:00
bors
9f53c87b4b Auto merge of #53527 - Emerentius:test_all, r=nrc
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-15 15:01:51 +00:00
toidiu
731f4efae5 stabalize infer outlives requirements (RFC 2093).
Co-authored-by: nikomatsakis
2018-09-11 11:40:04 -04:00
Emerentius
f6f3228c5f rename option to run all tests and make it unstable
new name: --include-ignored
requires -Zunstable-options
2018-09-05 18:36:20 +02:00
bors
b0297f3043 Auto merge of #53867 - cwndrws:json-test-formatter-test-count-as-num, r=nrc
Make json test output formatter represent "test_count" as num

fixes #53866
2018-09-05 09:57:56 +00:00
John Renner
9b27de41d4 Introduce Custom Test Frameworks 2018-09-04 22:33:00 -07:00
Charlie Andrews
b9de64a0e6
Make json test output formatter represent "filtered_out" as num 2018-08-31 14:57:19 -05:00
Charlie Andrews
347c6b76a0
Make json test output formatter represent "test_count" as num 2018-08-31 14:42:01 -05:00
Corey Farwell
e477a13d63 Replace usages of 'bad_style' with 'nonstandard_style'.
`bad_style` is being deprecated in favor of `nonstandard_style`:

- https://github.com/rust-lang/rust/issues/41646
2018-08-29 09:01:35 -05:00
bors
70a21e89f1 Auto merge of #53441 - toidiu:ak-fix53419, r=nikomatsakis
fix for late-bound regions

Fix for https://github.com/rust-lang/rust/issues/53419

r? @nikomatsakis
2018-08-27 17:42:45 +00:00
Guillaume Gomez
e166e6131a
Rollup merge of #53428 - RalfJung:libtest-terse, r=KodrAus
libtest terse format: show how far in we are

So for example `./x.py test src/libcore` looks like
```
running 881 tests
.................................................................................................... 100/881
.................................................................................................... 200/881
.................................................................................................... 300/881
.............................................................i.i.................................... 400/881
.................................................................................................... 500/881
.................................................................................................... 600/881
.................................................................................................... 700/881
.................................................................................................... 800/881
.................................................................................
test result: ok. 879 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out
```
When I am waiting for 3500 ui tests to complete, I am often missing some sense of how far in these 3500 it is.

Getting the total count in `write_run_start` is a bit hacky; I did that to not change the "public interface" of the formatters. I can also give them an extra argument in their constructor so that they know from the beginning how many tests there will be. Would you prefer that? (I think I would, but I wanted to get feedback first.)
2018-08-26 12:05:23 +02:00
Niko Matsakis
73fb1622b3 check that adding infer-outlives requirement to all crates works 2018-08-24 17:10:50 -04:00
Matthias Krüger
ede1f7d2a5 use String::new() instead of String::from(""), "".to_string(), "".to_owned() or "".into() 2018-08-23 10:14:52 +02:00
Ralf Jung
ffbb407801 comment 2018-08-20 22:03:10 +02:00
Emerentius
9adf26a5d0 add option to run all tests
add --all flag to libtest that runs ignored and not ignored tests
2018-08-20 18:29:56 +02:00
Emerentius
435b0abd49 refactor filter_tests
same behaviour, just shorter
2018-08-20 18:29:44 +02:00
Ralf Jung
67b7b2aa11 libtest terse format: show how far in we are 2018-08-16 15:19:50 +02:00
Guillaume Gomez
d8815cfe7d
Rollup merge of #52453 - srijs:fix-52436, r=TimNN
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-15 19:20:19 +02:00
Sam Rijs
6411aef609 improve diagnostics for tests with custom return values
fixes #52436
2018-08-11 14:36:55 +10:00
memoryruins
9d2c4a3acd [nll] libtest: enable feature(nll) for bootstrap 2018-08-09 09:22:45 -04:00
bors
7bbcd005b3 Auto merge of #52805 - ljedrz:format_str_literal, r=petrochenkov
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-30 06:29:39 +00:00
bors
a5c2d0fffa Auto merge of #52764 - sinkuu:cleanup, r=nikomatsakis
Misc cleanups
2018-07-29 06:32:24 +00:00
ljedrz
421b2ba347 Don't format!() string literals 2018-07-28 17:58:52 +02:00
Shotaro Yamada
3525368a56 Use str::repeat 2018-07-27 23:26:36 +09:00
Tatsuyuki Ishi
e098985939 Deny bare_trait_objects globally 2018-07-25 10:25:29 +09:00
ljedrz
21d9ac1d04 Deny bare trait objects in librustc_target and libtest 2018-07-12 13:26:29 +02:00
Philipp Hansch
4f2cfb57f5
Remove leftover tab in libtest outputs
Closes #50362
2018-05-02 08:35:33 +02:00
Guillaume Gomez
b2192ae157 Add rustdoc-ui test suite 2018-04-16 23:37:11 +02:00
Mark Simulacrum
c115cc655c Move deny(warnings) into rustbuild
This permits easier iteration without having to worry about warnings
being denied.

Fixes #49517
2018-04-08 16:59:14 -06:00
Seiichi Uchida
75dcc61d3c Cargo fmt libtest 2018-03-21 23:12:24 +09:00
Sebastian Humenda
9fd941e847 add stub for retrieving number of CPUs 2018-03-10 15:01:51 +01:00
Niko Matsakis
10f7c11092 re-export assert_test_result for use when testing libtest itself 2018-02-23 10:11:06 -05:00
Niko Matsakis
5f1e78f19a move Termination trait to std::process 2018-02-22 17:57:08 -05:00
Niko Matsakis
e446f706a8 put the "unit test" logic into libtest
Also make `std::termination` module public and rename feature.

The lib feature needs a different name from the language feature.
2018-02-22 17:56:24 -05:00
Gilad Naaman
61ff3ba536 libtest: Replace panics with error messages 2018-02-04 06:10:54 +02:00
Gilad Naaman
cb86f38497 libtest: Failing benchmarks no longer crash the harness. 2018-01-26 19:46:04 +02:00
Gilad Naaman
360b26389c libtest: Split-up formatters.rs into smaller modules
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-26 19:46:04 +02:00
Gilad Naaman
8b3fd98f4c libtest: rustfmt run
libtest: Whoops
2018-01-26 19:46:04 +02:00
Gilad Naaman
94bd1216bb libtest: Fixed pretty-printing of test names in single-threaded code. 2018-01-26 19:46:04 +02:00
Gilad Naaman
e570e9e79a libtest: JSON formatting is now only available in unstable builds
libtest: Added the -Z option for unstable options
2018-01-26 19:46:04 +02:00
Gilad Naaman
588a6a35be Added JSON output to libtest.
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-26 19:46:04 +02:00
Gilad Naaman
d24f9af31c Refactoring needed in order to have test json output. 2018-01-26 19:46:04 +02:00
Ed Schouten
9babb8a863 Make libtest build on CloudABI.
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-11 11:42:33 +01:00
Ed Schouten
3ca407e24b Restore a FIXME that was removed by one of my previous changes.
Requested by: kennytm
2018-01-03 15:40:37 +01:00
Ed Schouten
abced5a6b5 Provide a copy of stdout_isatty() on CloudABI.
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-02 14:22:37 +01:00
bors
b9cf26c38a Auto merge of #47106 - EdSchouten:compiletest-cloudabi, r=alexcrichton
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-02 00:31:07 +00:00
Ed Schouten
7b5543d7b6 Move the TestPaths structure from libtest to compiletest.
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-01 19:30:19 +01:00
Malo Jaffré
cbb32a9418 Fix docs for future pulldown migration 2018-01-01 14:44:12 +01:00