aboutsummaryrefslogtreecommitdiff
path: root/cortex-m-rt/ci/script.sh
diff options
context:
space:
mode:
Diffstat (limited to 'cortex-m-rt/ci/script.sh')
-rw-r--r--cortex-m-rt/ci/script.sh54
1 files changed, 26 insertions, 28 deletions
diff --git a/cortex-m-rt/ci/script.sh b/cortex-m-rt/ci/script.sh
index 3cffcad..3569588 100644
--- a/cortex-m-rt/ci/script.sh
+++ b/cortex-m-rt/ci/script.sh
@@ -5,7 +5,7 @@ main() {
cargo check --target $TARGET --features device
- if [ $TARGET = x86_64-unknown-linux-gnu ]; then
+ if [ $TARGET = x86_64-unknown-linux-gnu ] && [ $TRAVIS_RUST_VERSION = nightly ]; then
( cd macros && cargo check && cargo test )
cargo test --features device --test compiletest
@@ -20,6 +20,7 @@ main() {
minimal
override-exception
pre_init
+ qemu
rand
state
unsafe-default-handler
@@ -34,54 +35,51 @@ main() {
# linking with GNU LD
for ex in "${examples[@]}"; do
cargo rustc --target $TARGET --example $ex -- \
- -C linker=arm-none-eabi-ld \
- -C link-arg=-Tlink.x
+ -C linker=arm-none-eabi-ld
cargo rustc --target $TARGET --example $ex --release -- \
- -C linker=arm-none-eabi-ld \
- -C link-arg=-Tlink.x
+ -C linker=arm-none-eabi-ld
done
for ex in "${fail_examples[@]}"; do
! cargo rustc --target $TARGET --example $ex -- \
- -C linker=arm-none-eabi-ld \
- -C link-arg=-Tlink.x
+ -C linker=arm-none-eabi-ld
! cargo rustc --target $TARGET --example $ex --release -- \
- -C linker=arm-none-eabi-ld \
- -C link-arg=-Tlink.x
+ -C linker=arm-none-eabi-ld
done
cargo rustc --target $TARGET --example device --features device -- \
- -C linker=arm-none-eabi-ld \
- -C link-arg=-Tlink.x
+ -C linker=arm-none-eabi-ld
cargo rustc --target $TARGET --example device --features device --release -- \
- -C linker=arm-none-eabi-ld \
- -C link-arg=-Tlink.x
+ -C linker=arm-none-eabi-ld
# linking with rustc's LLD
for ex in "${examples[@]}"; do
- cargo rustc --target $TARGET --example $ex -- \
- -C link-arg=-Tlink.x
-
- cargo rustc --target $TARGET --example $ex --release -- \
- -C link-arg=-Tlink.x
+ cargo rustc --target $TARGET --example $ex
+ cargo rustc --target $TARGET --example $ex --release
done
for ex in "${fail_examples[@]}"; do
- ! cargo rustc --target $TARGET --example $ex -- \
- -C link-arg=-Tlink.x
-
- ! cargo rustc --target $TARGET --example $ex --release -- \
- -C link-arg=-Tlink.x
+ ! cargo rustc --target $TARGET --example $ex
+ ! cargo rustc --target $TARGET --example $ex --release
done
- cargo rustc --target $TARGET --example device --features device -- \
- -C link-arg=-Tlink.x
-
- cargo rustc --target $TARGET --example device --features device --release -- \
- -C link-arg=-Tlink.x
+ cargo rustc --target $TARGET --example device --features device
+ cargo rustc --target $TARGET --example device --features device --release
fi
+ case $TARGET in
+ thumbv6m-none-eabi|thumbv7m-none-eabi)
+ # linking with GNU LD
+ env RUSTFLAGS="-C linker=arm-none-eabi-ld -C link-arg=-Tlink.x" cargo run --target $TARGET --example qemu | grep "x = 42"
+ env RUSTFLAGS="-C linker=arm-none-eabi-ld -C link-arg=-Tlink.x" cargo run --target $TARGET --example qemu --release | grep "x = 42"
+
+ # linking with rustc's LLD
+ cargo run --target $TARGET --example qemu | grep "x = 42"
+ cargo run --target $TARGET --example qemu --release | grep "x = 42"
+ ;;
+ esac
+
if [ $TARGET = x86_64-unknown-linux-gnu ]; then
./check-blobs.sh
fi