Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no-std friendly test suite #155

Merged
merged 24 commits into from
Apr 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .cargo/config

This file was deleted.

2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "compiler-rt/compiler-rt-cdylib/compiler-rt"]
path = compiler-rt/compiler-rt-cdylib/compiler-rt
path = compiler-rt
url = https://github.com/rust-lang/compiler-rt
12 changes: 5 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ matrix:
- env: TARGET=powerpc-unknown-linux-gnu
- env: TARGET=powerpc64-unknown-linux-gnu
- env: TARGET=powerpc64le-unknown-linux-gnu
- env: TARGET=thumbv6m-none-eabi
- env: TARGET=thumbv7em-none-eabi
- env: TARGET=thumbv7em-none-eabihf
- env: TARGET=thumbv7m-none-eabi
- env: TARGET=thumbv6m-linux-eabi
- env: TARGET=thumbv7em-linux-eabi
- env: TARGET=thumbv7em-linux-eabihf
- env: TARGET=thumbv7m-linux-eabi
- env: TARGET=x86_64-apple-darwin
os: osx
env: TARGET=x86_64-unknown-linux-gnu
Expand All @@ -34,11 +34,9 @@ before_install:
- test "$TRAVIS_OS_NAME" = "osx" || docker run --rm --privileged multiarch/qemu-user-static:register

install:
- curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $TRAVIS_RUST_VERSION
- source ~/.cargo/env
- case $TARGET in
x86_64-apple-darwin | x86_64-unknown-linux-gnu) ;;
thumbv*-none-eabi*) rustup component add rust-src ;;
thumbv*eabi*) rustup component add rust-src ;;
*) rustup target add $TARGET;;
esac

Expand Down
21 changes: 11 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,27 @@ name = "compiler_builtins"
version = "0.1.0"

[build-dependencies]
rustc-cfg = "0.3.0"
cast = { version = "0.2.0", optional = true }
rand = { version = "0.3.15", optional = true }

[build-dependencies.gcc]
optional = true
version = "0.3.36"

[dev-dependencies]
quickcheck = "0.3.1"
rand = "0.3.14"
gcc_s = { path = "gcc_s" }
compiler-rt = { path = "compiler-rt" }

[features]
# Build the missing intrinsics from compiler-rt C source code
c = ["gcc"]
# Mark this crate as the #![compiler_builtins] crate
compiler-builtins = []
default = ["compiler-builtins"]
# Include implementations of memory operations like memcpy
mem = []
rustbuild = ["compiler-builtins"]
# generate tests
gen-tests = ["cast", "rand"]

[target.'cfg(all(target_arch = "arm", not(any(target_env = "gnu", target_env = "musl")), target_os = "linux"))'.dev-dependencies]
test = { git = "https://github.com/japaric/utest" }
utest-cortex-m-qemu = { default-features = false, git = "https://github.com/japaric/utest" }
utest-macros = { git = "https://github.com/japaric/utest" }



[workspace]
7 changes: 4 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ environment:
install:
- git submodule update --init
- curl -sSf -o rustup-init.exe https://win.rustup.rs
- rustup-init.exe --default-host %TARGET% --default-toolchain nightly -y
- rustup-init.exe --default-host x86_64-pc-windows-msvc --default-toolchain nightly -y
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
- if "%TARGET%"=="i686-pc-windows-msvc" ( rustup target add %TARGET% )
- rustc -Vv
- cargo -V

Expand All @@ -16,5 +17,5 @@ build: false
test_script:
- cargo build --target %TARGET%
- cargo build --release --target %TARGET%
- cargo test --no-default-features --target %TARGET%
- cargo test --no-default-features --release --target %TARGET%
- cargo test --no-default-features --features gen-tests --target %TARGET%
- cargo test --no-default-features --features gen-tests --release --target %TARGET%
Loading