Use workspaces and fix tests

* Enable a Cargo workspace for the repo
* Disable tests for proc-macro crates
* Move back to mounting source directory read-only
* Refactor test invocation to only test one crate with `--all`
This commit is contained in:
Alex Crichton 2017-11-20 14:34:44 -08:00 committed by gnzlbg
parent 86fa377cea
commit 922345c005
8 changed files with 17 additions and 14 deletions

View file

@ -1,8 +1,4 @@
Cargo.lock
.*.swp
/target
tags
/coresimd/target
/stdsimd-test/target
/stdsimd-test/assert-instr-macro/target
/stdsimd-test/simd-test-macro/target
target
tags

View file

@ -35,6 +35,7 @@ install:
- if [ "$NO_ADD" == "" ]; then rustup target add $TARGET; fi
script:
- cargo generate-lockfile
- ci/run-docker.sh $TARGET $FEATURES
notifications:

View file

@ -11,6 +11,8 @@ keywords = ["std", "simd", "intrinsics"]
categories = ["hardware-support"]
license = "MIT/Apache-2.0"
[workspace]
[badges]
travis-ci = { repository = "BurntSushi/stdsimd" }
appveyor = { repository = "BurntSushi/stdsimd" }
@ -34,4 +36,4 @@ opt-level = 3
strict = [ "coresimd/strict" ]
# Internal-usage only: enables only those intrinsics supported by Intel's
# Software Development Environment (SDE).
intel_sde = [ "coresimd/intel_sde" ]
intel_sde = [ "coresimd/intel_sde" ]

View file

@ -19,7 +19,7 @@ run() {
--env TARGET=$target \
--env FEATURES=$2 \
--env STDSIMD_TEST_EVERYTHING \
--volume `pwd`:/checkout \
--volume `pwd`:/checkout:ro \
--volume `pwd`/target:/checkout/target \
--workdir /checkout \
--privileged \

View file

@ -21,9 +21,10 @@ echo "RUSTFLAGS=${RUSTFLAGS}"
echo "FEATURES=${FEATURES}"
echo "OBJDUMP=${OBJDUMP}"
cd coresimd
cargo test --all --target $TARGET --features $FEATURES --verbose -- --nocapture
cargo test --all --release --target $TARGET --features $FEATURES --verbose -- --nocapture
cd ..
cargo test --all --target $TARGET --features $FEATURES --verbose -- --nocapture
cargo test --all --release --target $TARGET --features $FEATURES --verbose -- --nocapture
cargo_test() {
cmd="cargo test --all --target=$TARGET --features $FEATURES --verbose $1 -- --nocapture $2"
$cmd
}
cargo_test
cargo_test "--release"

View file

@ -5,6 +5,7 @@ authors = ["Alex Crichton <alex@alexcrichton.com>"]
[lib]
proc-macro = true
test = false
[dependencies]
proc-macro2 = { version = "0.1", features = ["unstable"] }

View file

@ -5,6 +5,7 @@ authors = ["Alex Crichton <alex@alexcrichton.com>"]
[lib]
proc-macro = true
test = false
[dependencies]
proc-macro2 = { version = "0.1", features = ["unstable"] }

View file

@ -6,6 +6,7 @@
#[macro_use]
extern crate stdsimd;
#[test]
#[cfg(all(target_arch = "arm", target_os = "linux"))]
fn arm_linux() {
println!("neon: {}", cfg_feature_enabled!("neon"));