Skip to content

Commit 81f2dc6

Browse files
authored
Merge pull request rust-lang#365 from tgross35/remove-musl-biteq
Remove tests against system musl
2 parents 754dace + 0ac6512 commit 81f2dc6

File tree

6 files changed

+12
-501
lines changed

6 files changed

+12
-501
lines changed

CONTRIBUTING.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66
`src/math/mod.rs` accordingly. Also, uncomment the corresponding trait method
77
in `src/lib.rs`.
88
- Write some simple tests in your module (using `#[test]`)
9-
- Run `cargo test` to make sure it works
10-
- Run `cargo test --features libm-test/test-musl-serialized` to compare your
11-
implementation against musl's
9+
- Run `cargo test` to make sure it works. Full tests are only run when enabling
10+
features, see [Testing](#testing) below.
1211
- Send us a pull request! Make sure to run `cargo fmt` on your code before
1312
sending the PR. Also include "closes #42" in the PR description to close the
1413
corresponding issue.
@@ -66,12 +65,17 @@ Normal tests can be executed with:
6665
cargo test
6766
```
6867

69-
If you'd like to run tests with randomized inputs that get compared against musl
70-
itself, you'll need to be on a Linux system and then you can execute:
68+
If you'd like to run tests with randomized inputs that get compared against
69+
infinite-precision results, run:
7170

7271
```sh
73-
cargo test --features libm-test/test-musl-serialized
72+
cargo test --features libm-test/test-multiprecision,libm-test/build-musl --release
7473
```
7574

76-
Note that you may need to pass `--release` to Cargo if there are errors related
77-
to integer overflow.
75+
The multiprecision tests use the [`rug`] crate for bindings to MPFR. MPFR can
76+
be difficult to build on non-Unix systems, refer to [`gmp_mpfr_sys`] for help.
77+
78+
`build-musl` does not build with MSVC, Wasm, or Thumb.
79+
80+
[`rug`]: https://docs.rs/rug/latest/rug/
81+
[`gmp_mpfr_sys`]: https://docs.rs/gmp-mpfr-sys/1.6.4/gmp_mpfr_sys/

ci/run.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,6 @@ case "$target" in
5757
*windows-gnu) extra_flags="$extra_flags --exclude libm-macros" ;;
5858
esac
5959

60-
if [ "$(uname -a)" = "Linux" ]; then
61-
# also run the reference tests when we can. requires a Linux host.
62-
extra_flags="$extra_flags --features libm-test/test-musl-serialized"
63-
fi
64-
6560
# Make sure we can build with overriding features. We test the indibidual
6661
# features it controls separately.
6762
cargo check --no-default-features

crates/libm-test/Cargo.toml

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

1010
# Generate tests which are random inputs and the outputs are calculated with
1111
# musl libc.
12-
test-musl-serialized = ["rand"]
1312
test-multiprecision = ["dep:az", "dep:rug"]
1413

1514
# Build our own musl for testing and benchmarks

0 commit comments

Comments
 (0)