Skip to content

Commit 0e4cdba

Browse files
authored
Merge pull request rust-lang#301 from tgross35/move-libm-test
Move `musl-reference-tests` to a new `libm-test` crate
2 parents 9c2dee9 + a4837bd commit 0e4cdba

File tree

9 files changed

+494
-471
lines changed

9 files changed

+494
-471
lines changed

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
in `src/lib.rs`.
88
- Write some simple tests in your module (using `#[test]`)
99
- Run `cargo test` to make sure it works
10-
- Run `cargo test --features musl-reference-tests` to compare your
10+
- Run `cargo test --features libm-test/musl-reference-tests` to compare your
1111
implementation against musl's
1212
- Send us a pull request! Make sure to run `cargo fmt` on your code before
1313
sending the PR. Also include "closes #42" in the PR description to close the
@@ -88,7 +88,7 @@ If you'd like to run tests with randomized inputs that get compared against musl
8888
itself, you'll need to be on a Linux system and then you can execute:
8989

9090
```
91-
cargo test --features musl-reference-tests
91+
cargo test --features libm-test/musl-reference-tests
9292
```
9393

9494
Note that you may need to pass `--release` to Cargo if there are errors related

Cargo.toml

+5-6
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,23 @@ default = []
1919
# that it should activate any useful Nightly things accordingly.
2020
unstable = []
2121

22-
# Generate tests which are random inputs and the outputs are calculated with
23-
# musl libc.
24-
musl-reference-tests = ['rand']
25-
2622
# Used to prevent using any intrinsics or arch-specific code.
2723
force-soft-floats = []
2824

2925
[workspace]
3026
members = [
3127
"crates/compiler-builtins-smoke-test",
3228
"crates/libm-bench",
29+
"crates/libm-test",
30+
]
31+
default-members = [
32+
".",
33+
"crates/libm-test",
3334
]
3435

3536
[dev-dependencies]
3637
no-panic = "0.1.8"
3738

38-
[build-dependencies]
39-
rand = { version = "0.6.5", optional = true }
4039

4140
# This is needed for no-panic to correctly detect the lack of panics
4241
[profile.release]

0 commit comments

Comments
 (0)