Skip to content

Commit 7b98ece

Browse files
author
Jorge Aparicio
authored
Merge pull request #155 from rust-lang-nursery/utest
no-std friendly test suite
2 parents 28ac490 + 44e5a1a commit 7b98ece

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+4394
-1419
lines changed

.cargo/config

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

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "compiler-rt/compiler-rt-cdylib/compiler-rt"]
2-
path = compiler-rt/compiler-rt-cdylib/compiler-rt
2+
path = compiler-rt
33
url = https://github.com/rust-lang/compiler-rt

.travis.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ matrix:
2222
- env: TARGET=powerpc-unknown-linux-gnu
2323
- env: TARGET=powerpc64-unknown-linux-gnu
2424
- env: TARGET=powerpc64le-unknown-linux-gnu
25-
- env: TARGET=thumbv6m-none-eabi
26-
- env: TARGET=thumbv7em-none-eabi
27-
- env: TARGET=thumbv7em-none-eabihf
28-
- env: TARGET=thumbv7m-none-eabi
25+
- env: TARGET=thumbv6m-linux-eabi
26+
- env: TARGET=thumbv7em-linux-eabi
27+
- env: TARGET=thumbv7em-linux-eabihf
28+
- env: TARGET=thumbv7m-linux-eabi
2929
- env: TARGET=x86_64-apple-darwin
3030
os: osx
3131
env: TARGET=x86_64-unknown-linux-gnu
@@ -34,11 +34,9 @@ before_install:
3434
- test "$TRAVIS_OS_NAME" = "osx" || docker run --rm --privileged multiarch/qemu-user-static:register
3535

3636
install:
37-
- curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $TRAVIS_RUST_VERSION
38-
- source ~/.cargo/env
3937
- case $TARGET in
4038
x86_64-apple-darwin | x86_64-unknown-linux-gnu) ;;
41-
thumbv*-none-eabi*) rustup component add rust-src ;;
39+
thumbv*eabi*) rustup component add rust-src ;;
4240
*) rustup target add $TARGET;;
4341
esac
4442

Cargo.toml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,27 @@ name = "compiler_builtins"
55
version = "0.1.0"
66

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

1011
[build-dependencies.gcc]
1112
optional = true
1213
version = "0.3.36"
1314

14-
[dev-dependencies]
15-
quickcheck = "0.3.1"
16-
rand = "0.3.14"
17-
gcc_s = { path = "gcc_s" }
18-
compiler-rt = { path = "compiler-rt" }
19-
2015
[features]
21-
# Build the missing intrinsics from compiler-rt C source code
2216
c = ["gcc"]
23-
# Mark this crate as the #![compiler_builtins] crate
2417
compiler-builtins = []
2518
default = ["compiler-builtins"]
26-
# Include implementations of memory operations like memcpy
2719
mem = []
2820
rustbuild = ["compiler-builtins"]
21+
# generate tests
22+
gen-tests = ["cast", "rand"]
23+
24+
[target.'cfg(all(target_arch = "arm", not(any(target_env = "gnu", target_env = "musl")), target_os = "linux"))'.dev-dependencies]
25+
test = { git = "https://github.com/japaric/utest" }
26+
utest-cortex-m-qemu = { default-features = false, git = "https://github.com/japaric/utest" }
27+
utest-macros = { git = "https://github.com/japaric/utest" }
28+
29+
2930

3031
[workspace]

appveyor.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ environment:
66
install:
77
- git submodule update --init
88
- curl -sSf -o rustup-init.exe https://win.rustup.rs
9-
- rustup-init.exe --default-host %TARGET% --default-toolchain nightly -y
9+
- rustup-init.exe --default-host x86_64-pc-windows-msvc --default-toolchain nightly -y
1010
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
11+
- if "%TARGET%"=="i686-pc-windows-msvc" ( rustup target add %TARGET% )
1112
- rustc -Vv
1213
- cargo -V
1314

@@ -16,5 +17,5 @@ build: false
1617
test_script:
1718
- cargo build --target %TARGET%
1819
- cargo build --release --target %TARGET%
19-
- cargo test --no-default-features --target %TARGET%
20-
- cargo test --no-default-features --release --target %TARGET%
20+
- cargo test --no-default-features --features gen-tests --target %TARGET%
21+
- cargo test --no-default-features --features gen-tests --release --target %TARGET%

0 commit comments

Comments
 (0)