File tree 7 files changed +79
-12
lines changed
7 files changed +79
-12
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,18 @@ sudo: false
3
3
4
4
matrix :
5
5
include :
6
+ - env : TARGET=thumbv6m-none-eabi
7
+ os : linux
8
+ dist : trusty
9
+ sudo : required
10
+ - env : TARGET=thumbv7m-none-eabi
11
+ os : linux
12
+ dist : trusty
13
+ sudo : required
14
+ - env : TARGET=thumbv7em-none-eabi
15
+ os : linux
16
+ dist : trusty
17
+ sudo : required
6
18
- env : TARGET=i586-unknown-linux-gnu
7
19
os : linux
8
20
services : docker
@@ -84,6 +96,16 @@ matrix:
84
96
os : osx
85
97
- env : TARGET=x86_64-unknown-linux-gnu
86
98
os : linux
99
+ allow_failures :
100
+ # Issue #2. Flaky test
101
+ - env : TARGET=arm-unknown-linux-gnueabi
102
+ os : linux
103
+ # Issue #2. Flaky test
104
+ - env : TARGET=arm-unknown-linux-gnueabihf
105
+ os : linux
106
+ # Issue #2. Flaky test
107
+ - env : TARGET=armv7-unknown-linux-gnueabihf
108
+ os : linux
87
109
88
110
before_install :
89
111
- export PATH="$PATH:$HOME/.cargo/bin"
Original file line number Diff line number Diff line change @@ -25,8 +25,6 @@ case $TARGET in
25
25
export QEMU_LD_PREFIX=/usr/arm-linux-gnueabihf
26
26
;;
27
27
armv7-unknown-linux-gnueabihf)
28
- # See #2
29
- export DONT_RUN_TESTS=y
30
28
export PREFIX=arm-linux-gnueabihf-
31
29
export QEMU_LD_PREFIX=/usr/arm-linux-gnueabihf
32
30
;;
@@ -65,13 +63,19 @@ case $TARGET in
65
63
export QEMU_LD_PREFIX=/usr/powerpc64-linux-gnu
66
64
;;
67
65
powerpc64le-unknown-linux-gnu)
68
- # See #2
69
- export DONT_RUN_TESTS=y
70
66
if [[ -z $DOCKER ]]; then
71
67
export DOCKER=y
72
68
fi
73
69
export PREFIX=powerpc64le-linux-gnu-
74
70
export QEMU=qemu-ppc64le
75
71
export QEMU_LD_PREFIX=/usr/powerpc64le-linux-gnu
72
+ # Issue #2. QEMU doesn't work
73
+ export RUN_TESTS=n
74
+ ;;
75
+ thumbv* -none-eabi)
76
+ export CARGO=xargo
77
+ export PREFIX=arm-none-eabi-
78
+ # Bare metal targets. No `std` or `test` crates for these targets.
79
+ export RUN_TESTS=n
76
80
;;
77
81
esac
Original file line number Diff line number Diff line change @@ -32,7 +32,12 @@ install_binutils() {
32
32
osx)
33
33
brew install binutils
34
34
;;
35
- * )
35
+ esac
36
+
37
+ case $TARGET in
38
+ thumbv* -none-eabi)
39
+ sudo apt-get install -y --no-install-recommends \
40
+ gcc-arm-none-eabi
36
41
;;
37
42
esac
38
43
}
@@ -74,11 +79,20 @@ install_rust() {
74
79
}
75
80
76
81
add_rustup_target () {
77
- if [[ $TARGET != $HOST ]]; then
82
+ if [[ $TARGET != $HOST && ${CARGO :- cargo} == " cargo " ]]; then
78
83
rustup target add $TARGET
79
84
fi
80
85
}
81
86
87
+ install_xargo () {
88
+ if [[ $CARGO == " xargo" ]]; then
89
+ sudo apt-get install -y --no-install-recommends \
90
+ libssh2-1
91
+ curl -sf " https://raw.githubusercontent.com/japaric/rust-everywhere/master/install.sh" | \
92
+ bash -s -- --from japaric/xargo --at $HOME /.cargo/bin
93
+ fi
94
+ }
95
+
82
96
configure_cargo () {
83
97
if [[ $PREFIX ]]; then
84
98
${PREFIX} gcc -v
@@ -99,6 +113,7 @@ main() {
99
113
install_c_toolchain
100
114
install_rust
101
115
add_rustup_target
116
+ install_xargo
102
117
configure_cargo
103
118
fi
104
119
}
Original file line number Diff line number Diff line change 3
3
. $( dirname $0 ) /env.sh
4
4
5
5
build () {
6
- cargo build --target $TARGET
7
- cargo build --target $TARGET --release
6
+ ${CARGO :- cargo} build --target $TARGET
7
+ ${CARGO :- cargo} build --target $TARGET --release
8
8
}
9
9
10
10
run_tests () {
@@ -14,14 +14,14 @@ run_tests() {
14
14
15
15
if [[ $QEMU ]]; then
16
16
cargo test --target $TARGET --no-run
17
- if [[ -z $DONT_RUN_TESTS ]]; then
17
+ if [[ ${RUN_TESTS :- y} == " y " ]]; then
18
18
$QEMU target/** /debug/rustc_builtins-*
19
19
fi
20
20
cargo test --target $TARGET --release --no-run
21
- if [[ -z $DONT_RUN_TESTS ]]; then
21
+ if [[ ${RUN_TESTS :- y} == " y " ]]; then
22
22
$QEMU target/** /release/rustc_builtins-*
23
23
fi
24
- elif [[ -z $DONT_RUN_TESTS ]]; then
24
+ elif [[ ${RUN_TESTS :- y} == " y " ]]; then
25
25
cargo test --target $TARGET
26
26
cargo test --target $TARGET --release
27
27
fi
@@ -50,8 +50,8 @@ main() {
50
50
bash ci/script.sh'
51
51
else
52
52
build
53
- run_tests
54
53
inspect
54
+ run_tests
55
55
fi
56
56
}
57
57
Original file line number Diff line number Diff line change
1
+ {
2
+ "arch" : " arm" ,
3
+ "data-layout" : " e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" ,
4
+ "features" : " +strict-align" ,
5
+ "llvm-target" : " thumbv6m-none-eabi" ,
6
+ "max-atomic-width" : 0 ,
7
+ "os" : " none" ,
8
+ "target-endian" : " little" ,
9
+ "target-pointer-width" : " 32"
10
+ }
Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments