Skip to content

Commit

Permalink
Merge pull request #301 from tgross35/move-libm-test
Browse files Browse the repository at this point in the history
Move `musl-reference-tests` to a new `libm-test` crate
  • Loading branch information
tgross35 authored Oct 5, 2024
2 parents 9c2dee9 + a4837bd commit 0e4cdba
Show file tree
Hide file tree
Showing 9 changed files with 494 additions and 471 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
in `src/lib.rs`.
- Write some simple tests in your module (using `#[test]`)
- Run `cargo test` to make sure it works
- Run `cargo test --features musl-reference-tests` to compare your
- Run `cargo test --features libm-test/musl-reference-tests` to compare your
implementation against musl's
- Send us a pull request! Make sure to run `cargo fmt` on your code before
sending the PR. Also include "closes #42" in the PR description to close the
Expand Down Expand Up @@ -88,7 +88,7 @@ If you'd like to run tests with randomized inputs that get compared against musl
itself, you'll need to be on a Linux system and then you can execute:

```
cargo test --features musl-reference-tests
cargo test --features libm-test/musl-reference-tests
```

Note that you may need to pass `--release` to Cargo if there are errors related
Expand Down
11 changes: 5 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,23 @@ default = []
# that it should activate any useful Nightly things accordingly.
unstable = []

# Generate tests which are random inputs and the outputs are calculated with
# musl libc.
musl-reference-tests = ['rand']

# Used to prevent using any intrinsics or arch-specific code.
force-soft-floats = []

[workspace]
members = [
"crates/compiler-builtins-smoke-test",
"crates/libm-bench",
"crates/libm-test",
]
default-members = [
".",
"crates/libm-test",
]

[dev-dependencies]
no-panic = "0.1.8"

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

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

0 comments on commit 0e4cdba

Please sign in to comment.