From d5ff22d026aa00171322dc5ed0abbc05bed3d8a1 Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Tue, 7 Mar 2023 06:23:33 +0100 Subject: [PATCH] Build(Tests) - Cleanup of the test harness --- Cargo.toml | 8 +++++--- Makefile.toml | 2 +- coverage/html/badges/flat.svg | 8 ++++---- coverage/html/badges/flat_square.svg | 6 +++--- coverage/html/badges/for_the_badge.svg | 6 +++--- coverage/html/badges/plastic.svg | 8 ++++---- coverage/html/badges/social.svg | 8 ++++---- pyproject.toml | 5 ++++- 8 files changed, 28 insertions(+), 23 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e3e6c0e..f0d1f67 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ toml = "0.5.9" clap = {version = "4.1.6", features = ["derive"]} threadpool = "1.8.1" # For python bindings TODO: make it optionnal -pyo3 = { version = "0.18.0", features = ["extension-module"] } +pyo3 = { version = "0.18.1", features= ["extension-module"]} # [target.'cfg(not(no_python))'.dependencies] # pyo3 = { version = "0.18.0", features = ["extension-module"] } @@ -36,7 +36,8 @@ opt-level = 3 lto = true [features] -default = [] +extension-module = ["pyo3/extension-module"] +default = ["extension-module"] verbose = [] no_python = [] # Removes the python bindings fast = [] # Remove some under optimisations that try to find other routes @@ -48,4 +49,5 @@ crate-type = ["cdylib","rlib"] [[bin]] name = "xiv_csolver_cli" -path = "src/bin/xiv_csolver.rs" \ No newline at end of file +path = "src/bin/xiv_csolver.rs" + diff --git a/Makefile.toml b/Makefile.toml index cf4c53b..b9d99a1 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -29,7 +29,7 @@ ignore_errors = true script = [ "mkdir -p coverage", "mkdir -p coverage/html", -"CARGO_INCREMENTAL=0 RUSTFLAGS='-Cinstrument-coverage' LLVM_PROFILE_FILE='llvm/cargo-test-%p-%m.profraw' cargo test", +"CARGO_INCREMENTAL=0 RUSTFLAGS='-Cinstrument-coverage -Ccodegen-units=1 -Copt-level=0 -Coverflow-checks=off' LLVM_PROFILE_FILE='llvm/cargo-test-%p-%m.profraw' cargo test", "grcov . --binary-path ./target/debug/deps/ -s . -t html --branch --ignore-not-existing --ignore '../*' --ignore '/*' -o coverage/html/" ] diff --git a/coverage/html/badges/flat.svg b/coverage/html/badges/flat.svg index 6febf64..4c9dba0 100644 --- a/coverage/html/badges/flat.svg +++ b/coverage/html/badges/flat.svg @@ -1,6 +1,6 @@ - coverage: 48% + xmlns:xlink="http://www.w3.org/1999/xlink" width="96" height="20" role="img" aria-label="coverage: 56%"> + coverage: 56% @@ -16,8 +16,8 @@ coverage - - 48% + + 56% \ No newline at end of file diff --git a/coverage/html/badges/flat_square.svg b/coverage/html/badges/flat_square.svg index 9907885..efc26f9 100644 --- a/coverage/html/badges/flat_square.svg +++ b/coverage/html/badges/flat_square.svg @@ -1,13 +1,13 @@ - coverage: 48% + xmlns:xlink="http://www.w3.org/1999/xlink" width="96" height="20" role="img" aria-label="coverage: 56%"> + coverage: 56% coverage - 48% + 56% \ No newline at end of file diff --git a/coverage/html/badges/for_the_badge.svg b/coverage/html/badges/for_the_badge.svg index 7d6b58d..0956090 100644 --- a/coverage/html/badges/for_the_badge.svg +++ b/coverage/html/badges/for_the_badge.svg @@ -1,13 +1,13 @@ - COVERAGE: 48% + xmlns:xlink="http://www.w3.org/1999/xlink" width="142.5" height="28" role="img" aria-label="COVERAGE: 56%"> + COVERAGE: 56% COVERAGE - 48% + 56% \ No newline at end of file diff --git a/coverage/html/badges/plastic.svg b/coverage/html/badges/plastic.svg index 209f476..16fde0e 100644 --- a/coverage/html/badges/plastic.svg +++ b/coverage/html/badges/plastic.svg @@ -1,6 +1,6 @@ - coverage: 48% + xmlns:xlink="http://www.w3.org/1999/xlink" width="96" height="18" role="img" aria-label="coverage: 56%"> + coverage: 56% @@ -18,8 +18,8 @@ coverage - - 48% + + 56% \ No newline at end of file diff --git a/coverage/html/badges/social.svg b/coverage/html/badges/social.svg index ccb1035..f5e0951 100644 --- a/coverage/html/badges/social.svg +++ b/coverage/html/badges/social.svg @@ -1,6 +1,6 @@ - Coverage: 48% + xmlns:xlink="http://www.w3.org/1999/xlink" width="99" height="20" role="img" aria-label="Coverage: 56%"> + Coverage: 56% @@ -20,8 +20,8 @@ Coverage - - 48% + + 56% \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 5c2868e..19a619f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,4 +10,7 @@ classifiers = [ "Programming Language :: Rust", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", -] \ No newline at end of file +] + +[tool.maturin] +features = ["pyo3/extension-module"] \ No newline at end of file