Commit Graph

545 Commits

Author SHA1 Message Date
Jethro Beekman 972bba7071 Stabilize cfg_target_vendor, #29718 2019-01-14 14:33:04 +05:30
Yu Ding d04f5208ba Bound sgx target_env with fortanix as target_vendor
Signed-off-by: Yu Ding <dingelish@gmail.com>
2018-12-31 16:32:56 -08:00
Mark Rousskov 2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00
bors 3499575282 Auto merge of #56243 - RalfJung:test-deterministic, r=alexcrichton
libtest: Use deterministic HashMap, avoid spawning thread if there is no concurrency

It seems desirable to make a test and bench runner deterministic, which this achieves by using a deterministic hasher. Also, we we only have 1 thread, we don't bother spawning one and just use the main thread.

The motivation for this is to be able to run the test harness in miri, where we can neither access the OS RNG, nor spawn threads.
2018-12-11 14:04:15 +00:00
Ralf Jung c28c28779c use an enum instead of bool 2018-12-11 11:02:23 +01:00
Alexander Regueiro ee89c088b0 Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
Jethro Beekman 4a3505682e Add x86_64-fortanix-unknown-sgx target to libstd and dependencies
The files src/libstd/sys/sgx/*.rs are mostly copied/adapted from
the wasm target.

This also updates the dlmalloc submodule to the very latest version.
2018-12-07 11:26:50 +05:30
Eduard-Mihai Burtescu 67afeef9e4 proc_macro: move to a dependency of libtest. 2018-11-30 06:15:20 +02:00
Ralf Jung 3e9cf3303e fix libtest test suite 2018-11-27 13:59:19 +01:00
Ralf Jung e9caa8ed91 Do not spawn a thread if we do not use concurrency 2018-11-27 13:59:19 +01:00
Ralf Jung f460eac66e use deterministic HashMap in libtest 2018-11-27 13:59:19 +01:00
Emerentius 420541bc78 add option to libtest to run all tests
flag name is --include-ignored
requires -Zunstable-options for now
2018-10-14 00:58:17 +02:00
Emerentius 68b596408d refactor filter_tests
same behaviour, just shorter
2018-10-14 00:57:50 +02:00
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