summary refs log tree commit diff
path: root/src/libtest
AgeCommit message (Collapse)AuthorLines
2016-01-19manual fixupsNick Cameron-20/+13
2016-01-19rustfmt libtestNick Cameron-522/+538
2016-01-17Rollup merge of #30959 - bluss:bench-resolution, r=GankroManish Goregaokar-2/+1
test: Increase resolution of MB/s stat for bench runs close to 1 second MB/s was based on the number of iterations performed in a second, when the iteration duration nears 1 second (1e9 ns), the resolution of the MB/s stat decreases.
2016-01-16test: Increase resolution of MB/s stat for bench runs close to 1 secondUlrik Sverdrup-2/+1
MB/s was based on the number of iterations performed in a second, when the iteration duration nears 1 second (1e9 ns), the resolution of the MB/s stat decreases.
2016-01-12HW_AVAILCPU is unavailable under openbsdSébastien Marie-1/+18
define `num_cpus()` function for openbsd that use `HW_NCPU` for grabbing the current number of cpus that could be used.
2015-12-22variable `CPUS_SIZE` should have a snake case name such as `cpus_size`Sébastien Marie-3/+3
2015-12-22explicit use libc to refer to HW_NCPUSébastien Marie-1/+1
2015-12-21std: Remove rust_builtin C support libraryAlex Crichton-3/+38
All these definitions can now be written in Rust, so do so!
2015-12-21Register new snapshotsAlex Crichton-3/+0
Lots of cruft to remove!
2015-12-20Auto merge of #30436 - durka:patch-14, r=alexcrichtonbors-2/+2
Relevant to #30422.
2015-12-17libtest: change CLI usage string to be trueAlex Burka-2/+2
Relevant to #30422.
2015-12-17Remove unused importsJeffrey Seyfried-2/+0
2015-12-05std: Stabilize APIs for the 1.6 releaseAlex Crichton-29/+23
This commit is the standard API stabilization commit for the 1.6 release cycle. The list of issues and APIs below have all been through their cycle-long FCP and the libs team decisions are listed below Stabilized APIs * `Read::read_exact` * `ErrorKind::UnexpectedEof` (renamed from `UnexpectedEOF`) * libcore -- this was a bit of a nuanced stabilization, the crate itself is now marked as `#[stable]` and the methods appearing via traits for primitives like `char` and `str` are now also marked as stable. Note that the extension traits themeselves are marked as unstable as they're imported via the prelude. The `try!` macro was also moved from the standard library into libcore to have the same interface. Otherwise the functions all have copied stability from the standard library now. * The `#![no_std]` attribute * `fs::DirBuilder` * `fs::DirBuilder::new` * `fs::DirBuilder::recursive` * `fs::DirBuilder::create` * `os::unix::fs::DirBuilderExt` * `os::unix::fs::DirBuilderExt::mode` * `vec::Drain` * `vec::Vec::drain` * `string::Drain` * `string::String::drain` * `vec_deque::Drain` * `vec_deque::VecDeque::drain` * `collections::hash_map::Drain` * `collections::hash_map::HashMap::drain` * `collections::hash_set::Drain` * `collections::hash_set::HashSet::drain` * `collections::binary_heap::Drain` * `collections::binary_heap::BinaryHeap::drain` * `Vec::extend_from_slice` (renamed from `push_all`) * `Mutex::get_mut` * `Mutex::into_inner` * `RwLock::get_mut` * `RwLock::into_inner` * `Iterator::min_by_key` (renamed from `min_by`) * `Iterator::max_by_key` (renamed from `max_by`) Deprecated APIs * `ErrorKind::UnexpectedEOF` (renamed to `UnexpectedEof`) * `OsString::from_bytes` * `OsStr::to_cstring` * `OsStr::to_bytes` * `fs::walk_dir` and `fs::WalkDir` * `path::Components::peek` * `slice::bytes::MutableByteVector` * `slice::bytes::copy_memory` * `Vec::push_all` (renamed to `extend_from_slice`) * `Duration::span` * `IpAddr` * `SocketAddr::ip` * `Read::tee` * `io::Tee` * `Write::broadcast` * `io::Broadcast` * `Iterator::min_by` (renamed to `min_by_key`) * `Iterator::max_by` (renamed to `max_by_key`) * `net::lookup_addr` New APIs (still unstable) * `<[T]>::sort_by_key` (added to mirror `min_by_key`) Closes #27585 Closes #27704 Closes #27707 Closes #27710 Closes #27711 Closes #27727 Closes #27740 Closes #27744 Closes #27799 Closes #27801 cc #27801 (doesn't close as `Chars` is still unstable) Closes #28968
2015-12-03libterm: bring across changes from termBryce Van Dyk-1/+1
This brings across changes made to the term library to libterm. This includes removing instances or unwrap, fixing format string handling, and removing a TODO. This fix does not bring all changes across, as term now relies on cargo deps that cannot be brought into the rust build at this stage, but has attempted as best to cross port changes not relying on this. This notably limits extra functionality since implemented int he Terminal trait in Term. This is in partly in response to rust issue #29992.
2015-11-25Remove all uses of `#[staged_api]`Vadim Petrochenkov-1/+1
2015-11-12libtest: deny warnings in doctestsKevin Butler-1/+2
2015-11-09std: Migrate to the new libcAlex Crichton-5/+26
* Delete `sys::unix::{c, sync}` as these are now all folded into libc itself * Update all references to use `libc` as a result. * Update all references to the new flat namespace. * Moves all windows bindings into sys::c
2015-10-28Port the standard crates to PNaCl/NaCl.Richard Diamond-0/+4
2015-10-24Remove bare semicolonsFlorian Hahn-1/+1
2015-09-08Reverted for-loop, it messes up type inferencellogiq-1/+2
2015-09-08fixes/improvements thanks to @ManishearthAndre Bogus-1/+0
2015-09-08some more clippy-based improvementsAndre Bogus-17/+17
2015-08-17test: Don't panic if some tests failedAlex Crichton-1/+1
This commit removes the call to `panic!("Some tests failed")` at the end of all tests run when running with libtest. The panic is replaced with `std::process::exit` to have a nonzero error code, but this change both: 1. Makes the test runner no longer print out the extraneous panic message at the end of a failing test run that some tests failed. (this is already summarized in the output of the test run). 2. When running tests with `RUST_BACKTRACE` set it removes an extraneous backtrace from the output (only failing tests will have their backtraces in the output.
2015-08-15Add issue for the rustc_private feature everywhereAlex Crichton-1/+1
2015-08-11rollup merge of #27622: eefriedman/https-urlAlex Crichton-2/+2
Also fixes a few outdated links.
2015-08-10Stabilize the Duration APISteven Fackler-2/+1
This commit stabilizes the `std::time` module and the `Duration` type. `Duration::span` remains unstable, and the `Display` implementation for `Duration` has been removed as it is still being reworked and all trait implementations for stable types are de facto stable. This is a [breaking-change] to those using `Duration`'s `Display` implementation.
2015-08-09Use https URLs to refer to rust-lang.org where appropriate.Eli Friedman-2/+2
Also fixes a few outdated links.
2015-08-04syntax: Don't assume `std` exists for testsAlex Crichton-9/+10
This commit removes the injection of `std::env::args()` from `--test` expanded code, relying on the test runner itself to call this funciton. This is more hygienic because we can't assume that `std` exists at the top layer all the time, and it meaks the injected test module entirely self contained.
2015-07-27std: Remove msvc/valgrind headersAlex Crichton-8/+1
These aren't really used for anything any more, so there doesn't seem to be much reason to leave them around in the `rt` directory. There was some limiting of threads spawned or tests when run under valgrind, but very little is run under valgrind nowadays so there's also no real use keeping these around.
2015-07-12Auto merge of #26957 - wesleywiser:rename_connect_to_join, r=alexcrichtonbors-1/+1
Fixes #26900
2015-07-12Implement RFC 1058Simonas Kazlauskas-2/+1
2015-07-10Change some instances of .connect() to .join()Wesley Wiser-1/+1
2015-07-02windows: Don't link rust_builtinAlex Crichton-3/+17
This library has no shims which are actually needed on Windows now, so translate that last easy one into Rust and then don't link it at all on Windows.
2015-06-18Auto merge of #26192 - alexcrichton:features-clean, r=aturonbors-11/+10
This commit shards the all-encompassing `core`, `std_misc`, `collections`, and `alloc` features into finer-grained components that are much more easily opted into and tracked. This reflects the effort to push forward current unstable APIs to either stabilization or removal. Keeping track of unstable features on a much more fine-grained basis will enable the library subteam to quickly analyze a feature and help prioritize internally about what APIs should be stabilized. A few assorted APIs were deprecated along the way, but otherwise this change is just changing the feature name associated with each API. Soon we will have a dashboard for keeping track of all the unstable APIs in the standard library, and I'll also start making issues for each unstable API after performing a first-pass for stabilization.
2015-06-18Auto merge of #26340 - bluss:bench-sigfix, r=alexcrichtonbors-4/+4
test: Fix a bug in bench result formatting It would skip the middle part if it was 0, displaying a number a 1000 times too small. The MB/s number next to it gave it away. Fixed it looks like this: ``` test h ... bench: 1,000,129 ns/iter (+/- 4,730) ```
2015-06-17More test fixes and fallout of stability changesAlex Crichton-5/+2
2015-06-17Fallout in tests and docs from feature renamingsAlex Crichton-1/+2
2015-06-17collections: Split the `collections` featureAlex Crichton-1/+1
This commit also deprecates the `as_string` and `as_slice` free functions in the `string` and `vec` modules.
2015-06-17alloc: Split apart the global `alloc` featureAlex Crichton-5/+6
2015-06-16test: Fix a bug in bench result formattingUlrik Sverdrup-4/+4
It would skip the middle part if it was 0, displaying a number a 1000 times too small. The MB/s number next to it gave it away. Fixed it looks like this: ``` test h ... bench: 1,000,129 ns/iter (+/- 4,730) ```
2015-06-10Removed many pointless calls to *iter() and iter_mut()Joshua Landau-1/+1
2015-06-09Auto merge of #26068 - bluss:bench-sigfigs, r=huonwbors-8/+35
test: Display benchmark results with thousands separators Example display: ``` running 9 tests test a ... bench: 0 ns/iter (+/- 0) test b ... bench: 52 ns/iter (+/- 0) test c ... bench: 88 ns/iter (+/- 0) test d ... bench: 618 ns/iter (+/- 111) test e ... bench: 5,933 ns/iter (+/- 87) test f ... bench: 59,280 ns/iter (+/- 1,052) test g ... bench: 588,672 ns/iter (+/- 3,381) test h ... bench: 5,894,227 ns/iter (+/- 303,489) test i ... bench: 59,112,382 ns/iter (+/- 1,500,110) ``` Fixes #10953 Fixes #26109
2015-06-09test: Display benchmark results with thousands separatorsUlrik Sverdrup-8/+35
Example display: ``` running 9 tests test a ... bench: 0 ns/iter (+/- 0) test b ... bench: 52 ns/iter (+/- 0) test c ... bench: 88 ns/iter (+/- 0) test d ... bench: 618 ns/iter (+/- 111) test e ... bench: 5,933 ns/iter (+/- 87) test f ... bench: 59,280 ns/iter (+/- 1,052) test g ... bench: 588,672 ns/iter (+/- 3,381) test h ... bench: 5,894,227 ns/iter (+/- 303,489) test i ... bench: 59,112,382 ns/iter (+/- 1,500,110) ``` Fixes #10953 Fixes #26109
2015-06-08Replace usage of String::from_str with String:fromSimon Sapin-1/+1
2015-05-26Enable colored test output when capturing output of testsJohannes Oertel-1/+1
The output of individual tests can be captured now so it's safe to use colorized output even when running tests in parallel. Closes #782.
2015-05-15libs: Move favicon URLs to HTTPSAlex Crichton-1/+1
Helps prevent mixed content warnings if accessing docs over HTTPS. Closes #25459
2015-05-14Auto merge of #24920 - alexcrichton:duration, r=aturonbors-6/+8
This commit is an implementation of [RFC 1040][rfc] which is a redesign of the currently-unstable `Duration` type. The API of the type has been scaled back to be more conservative and it also no longer supports negative durations. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1040-duration-reform.md The inner `duration` module of the `time` module has now been hidden (as `Duration` is reexported) and the feature name for this type has changed from `std_misc` to `duration`. All APIs accepting durations have also been audited to take a more flavorful feature name instead of `std_misc`. Closes #24874
2015-05-13std: Redesign Duration, implementing RFC 1040Alex Crichton-6/+8
This commit is an implementation of [RFC 1040][rfc] which is a redesign of the currently-unstable `Duration` type. The API of the type has been scaled back to be more conservative and it also no longer supports negative durations. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1040-duration-reform.md The inner `duration` module of the `time` module has now been hidden (as `Duration` is reexported) and the feature name for this type has changed from `std_misc` to `duration`. All APIs accepting durations have also been audited to take a more flavorful feature name instead of `std_misc`. Closes #24874
2015-05-11Auto merge of #25085 - carols10cents:remove-old-tilde, r=steveklabnikbors-2/+2
There were still some mentions of `~[T]` and `~T`, mostly in comments and debugging statements. I tried to do my best to preserve meaning, but I might have gotten some wrong-- I'm happy to fix anything :)
2015-05-09Squeeze the last bits of `task`s in documentation in favor of `thread`Barosl Lee-1/+1
An automated script was run against the `.rs` and `.md` files, subsituting every occurrence of `task` with `thread`. In the `.rs` files, only the texts in the comment blocks were affected.