Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit e3becce

Browse files
authored
Merge pull request #319 from tgross35/test-feature
Rename the `musl-bitwise-tests` feature to `test-musl-serialized`
2 parents 0559ebc + 2df2813 commit e3becce

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

libm/CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
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 libm-test/musl-bitwise-tests` to compare your
10+
- Run `cargo test --features libm-test/test-musl-serialized` 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
@@ -80,15 +80,15 @@ let x1p127 = f32::from_bits(0x7f000000); // 0x1p127f === 2 ^ 12
8080

8181
Normal tests can be executed with:
8282

83-
```
83+
```sh
8484
cargo test
8585
```
8686

8787
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

90-
```
91-
cargo test --features libm-test/musl-bitwise-tests
90+
```sh
91+
cargo test --features libm-test/test-musl-serialized
9292
```
9393

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

libm/ci/run.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ $cmd --features 'unstable'
1818
$cmd --release --features 'unstable'
1919

2020
# also run the reference tests
21-
$cmd --features 'unstable libm-test/musl-bitwise-tests'
22-
$cmd --release --features 'unstable libm-test/musl-bitwise-tests'
21+
$cmd --features 'unstable libm-test/test-musl-serialized'
22+
$cmd --release --features 'unstable libm-test/test-musl-serialized'

libm/crates/libm-test/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ default = []
99

1010
# Generate tests which are random inputs and the outputs are calculated with
1111
# musl libc.
12-
musl-bitwise-tests = ["rand"]
12+
test-musl-serialized = ["rand"]
1313

1414
[dependencies]
1515
libm = { path = "../.." }

libm/crates/libm-test/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
fn main() {
2-
#[cfg(feature = "musl-bitwise-tests")]
2+
#[cfg(feature = "test-musl-serialized")]
33
musl_reference_tests::generate();
44
}
55

6-
#[cfg(feature = "musl-bitwise-tests")]
6+
#[cfg(feature = "test-musl-serialized")]
77
mod musl_reference_tests {
88
use rand::seq::SliceRandom;
99
use rand::Rng;

libm/crates/libm-test/tests/musl_biteq.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
33
// PowerPC tests are failing on LLVM 13: https://github.com/rust-lang/rust/issues/88520
44
#[cfg(not(target_arch = "powerpc64"))]
5-
#[cfg(all(test, feature = "musl-bitwise-tests"))]
5+
#[cfg(all(test, feature = "test-musl-serialized"))]
66
include!(concat!(env!("OUT_DIR"), "/musl-tests.rs"));

0 commit comments

Comments
 (0)