Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Schultzer <benjamin@schultzer.com>
  • Loading branch information
Schultzer committed Jul 1, 2019
1 parent 8b8eba2 commit 33ab99d
Show file tree
Hide file tree
Showing 108 changed files with 663 additions and 1,095 deletions.
5 changes: 1 addition & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ checked = []
[workspace]
members = [
"crates/compiler-builtins-smoke-test",
"crates/libm-test",
"crates/test-framework"
"crates/libm-test"
]

[dev-dependencies]
no-panic = "0.1.8"
libm-test = { version = "0.*", path = "./crates/libm-test" }
rand = "0.6.5"
6 changes: 3 additions & 3 deletions ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -ex
TARGET=$1

cargo test --target $TARGET
cargo test --features 'checked libm-test/conformance' --target $TARGET

cargo test --target $TARGET --release
cargo test --features 'checked libm-test/conformance' --target $TARGET --release

cargo test -p libm-test --target $TARGET
cargo test -p libm-test --target $TARGET --release
14 changes: 3 additions & 11 deletions crates/libm-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,7 @@ name = "libm-test"
version = "0.1.0"
authors = ["Benjamin Schultzer <benjamin@schultzer.com>"]

[lib]
proc-macro = true
test = false

[dependencies]
test-framework = { version = "0.*", path = "./../test-framework" }
proc-macro2 = { version = "0.4", features = ["nightly"] }
quote = "0.6"
syn = { version = "0.15", features = ["full"] }

[features]
conformance = []
libm = { version = "0.*", path = "../../" }
paste = "0.1.5"
rand = "0.6.5"
13 changes: 13 additions & 0 deletions crates/libm-test/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
use std::env;

fn main() {
println!("cargo:rerun-if-changed=build.rs");
let opt_level = env::var("OPT_LEVEL")
.ok()
.and_then(|s| s.parse().ok())
.unwrap_or(0);
let profile = env::var("PROFILE").unwrap_or(String::new());
if profile == "release" || opt_level >= 2 {
println!("cargo:rustc-cfg=optimized");
}
}
Loading

0 comments on commit 33ab99d

Please sign in to comment.