Skip to content

Commit 5b96f1d

Browse files
committed
TEST: Remove ndarray build.rs and test-blas-openblas-sys feature flag
This flag was not properly used anymore. Replace it with a proper blas test setup in xtest-numeric.
1 parent f98e5c0 commit 5b96f1d

File tree

6 files changed

+11
-15
lines changed

6 files changed

+11
-15
lines changed

Cargo.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ description = "An n-dimensional array for general elements and for numerics. Lig
1818
keywords = ["array", "data-structure", "multidimensional", "matrix", "blas"]
1919
categories = ["data-structures", "science"]
2020

21-
build = "build.rs"
22-
2321
exclude = ["docgen/images/*"]
2422

2523
[lib]
@@ -63,8 +61,7 @@ blas = ["cblas-sys", "libc"]
6361
serde-1 = ["serde"]
6462

6563
# These features are used for testing
66-
test-blas-openblas-sys = ["blas"]
67-
test = ["test-blas-openblas-sys"]
64+
test = []
6865

6966
# This feature is used for docs
7067
docs = ["approx", "serde", "rayon"]

build.rs

Lines changed: 0 additions & 10 deletions
This file was deleted.

scripts/all-tests.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ cargo test --manifest-path=xtest-serialization/Cargo.toml --verbose
1818
cargo test --manifest-path=xtest-blas/Cargo.toml --verbose
1919
cargo test --examples
2020
CARGO_TARGET_DIR=target/ cargo test --manifest-path=xtest-numeric/Cargo.toml --verbose
21+
CARGO_TARGET_DIR=target/ cargo test --manifest-path=xtest-numeric/Cargo.toml --verbose --features test_blas
2122
([ "$CHANNEL" != "nightly" ] || cargo bench --no-run --verbose --features "$FEATURES")

xtest-numeric/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ ndarray = { path = "..", features = ["approx"] }
1010
ndarray-rand = { path = "../ndarray-rand/" }
1111
rand_distr = "0.4"
1212

13+
blas-src = { optional = true, version = "0.7.0", default-features = false, features = ["openblas"] }
14+
openblas-src = { optional = true, version = "0.9", default-features = false, features = ["cblas", "system"] }
15+
1316
[dependencies.rand]
1417
version = "0.8.0"
1518
features = ["small_rng"]
@@ -18,7 +21,7 @@ features = ["small_rng"]
1821
test = false
1922

2023
[features]
21-
test_blas = ["ndarray/blas", "ndarray/test-blas-openblas-sys"]
24+
test_blas = ["ndarray/blas", "blas-src", "openblas-src"]
2225

2326
[profile.dev]
2427
opt-level = 2

xtest-numeric/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#[cfg(feature = "test_blas")]
2+
extern crate blas_src;
3+

xtest-numeric/tests/accuracy.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ extern crate ndarray;
44
extern crate ndarray_rand;
55
extern crate rand;
66

7+
extern crate numeric_tests;
8+
79
use ndarray_rand::{RandomExt, F32};
810
use rand::{Rng, SeedableRng};
911
use rand::rngs::SmallRng;

0 commit comments

Comments
 (0)