Skip to content

Commit c7b63d4

Browse files
author
Jorge Aparicio
committed
CI: test ARM Cortex targets
closes #32
1 parent 7ac5155 commit c7b63d4

6 files changed

+61
-6
lines changed

.travis.yml

+29
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,39 @@ matrix:
8080
os: linux
8181
services: docker
8282
sudo: required
83+
- env: TARGET=thumbv6m-none-eabi
84+
os: linux
85+
addons:
86+
apt:
87+
packages: &cortex
88+
- binutils-arm-none-eabi
89+
- env: TARGET=thumbv7m-none-eabi
90+
os: linux
91+
addons:
92+
apt:
93+
packages: *cortex
94+
- env: TARGET=thumbv7em-none-eabi
95+
os: linux
96+
addons:
97+
apt:
98+
packages: *cortex
8399
- env: TARGET=x86_64-apple-darwin
84100
os: osx
85101
- env: TARGET=x86_64-unknown-linux-gnu
86102
os: linux
103+
- allowed_failures:
104+
# Issue #2. Flaky test
105+
- env: TARGET=arm-unknown-linux-gnueabi
106+
os: linux
107+
# Issue #2. Flaky test
108+
- env: TARGET=arm-unknown-linux-gnueabihf
109+
os: linux
110+
# Issue #2. Flaky test
111+
- env: TARGET=armv7-unknown-linux-gnueabihf
112+
os: linux
113+
# Issue #33. Incompatible ASM
114+
- env: TARGET=thumbv6m-none-eabi
115+
os: linux
87116

88117
before_install:
89118
- export PATH="$PATH:$HOME/.cargo/bin"

ci/env.sh

+5-3
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ case $TARGET in
2525
export QEMU_LD_PREFIX=/usr/arm-linux-gnueabihf
2626
;;
2727
armv7-unknown-linux-gnueabihf)
28-
# See #2
29-
export DONT_RUN_TESTS=y
3028
export PREFIX=arm-linux-gnueabihf-
3129
export QEMU_LD_PREFIX=/usr/arm-linux-gnueabihf
3230
;;
@@ -66,12 +64,16 @@ case $TARGET in
6664
;;
6765
powerpc64le-unknown-linux-gnu)
6866
# See #2
69-
export DONT_RUN_TESTS=y
67+
export RUN_TESTS=n
7068
if [[ -z $DOCKER ]]; then
7169
export DOCKER=y
7270
fi
7371
export PREFIX=powerpc64le-linux-gnu-
7472
export QEMU=qemu-ppc64le
7573
export QEMU_LD_PREFIX=/usr/powerpc64le-linux-gnu
7674
;;
75+
thumbv*-none-eabi)
76+
export RUN_TESTS=n
77+
export PREFIX=arm-none-eabi-
78+
;;
7779
esac

ci/script.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ run_tests() {
1414

1515
if [[ $QEMU ]]; then
1616
cargo test --target $TARGET --no-run
17-
if [[ -z $DONT_RUN_TESTS ]]; then
17+
if [[ ${RUN_TESTS:-y} == "y" ]]; then
1818
$QEMU target/**/debug/rustc_builtins-*
1919
fi
2020
cargo test --target $TARGET --release --no-run
21-
if [[ -z $DONT_RUN_TESTS ]]; then
21+
if [[ ${RUN_TESTS:-y} == "y" ]]; then
2222
$QEMU target/**/release/rustc_builtins-*
2323
fi
24-
elif [[ -z $DONT_RUN_TESTS ]]; then
24+
elif [[ ${RUN_TESTS:-y} == "y" ]]; then
2525
cargo test --target $TARGET
2626
cargo test --target $TARGET --release
2727
fi

thumbv6m-none-eabi.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"arch": "arm",
3+
"data-layout": "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64",
4+
"llvm-target": "thumbv6m-none-eabi",
5+
"os": "none",
6+
"target-endian": "little",
7+
"target-pointer-width": "32"
8+
}

thumbv7em-none-eabi.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"arch": "arm",
3+
"data-layout": "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64",
4+
"llvm-target": "thumbv7em-none-eabi",
5+
"os": "none",
6+
"target-endian": "little",
7+
"target-pointer-width": "32"
8+
}

thumbv7m-none-eabi.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"arch": "arm",
3+
"data-layout": "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64",
4+
"llvm-target": "thumbv7m-none-eabi",
5+
"os": "none",
6+
"target-endian": "little",
7+
"target-pointer-width": "32"
8+
}

0 commit comments

Comments
 (0)