@@ -90,6 +90,7 @@ case "$TARGET" in
90
90
fi
91
91
emulator @$arch -no-window $accel &
92
92
adb wait-for-device
93
+ # TODO: replace these steps with a single program so that it can be used as a runner for cargo test
93
94
adb push $CARGO_TARGET_DIR /$TARGET /debug/main-* /data/local/tmp/main
94
95
adb shell /data/local/tmp/main 2>&1 | tee /tmp/out
95
96
grep " ^PASSED .* tests" /tmp/out
@@ -100,65 +101,64 @@ case "$TARGET" in
100
101
101
102
i386-apple-ios)
102
103
rustc -O ./ci/ios/deploy_and_run_on_ios_simulator.rs
103
- ./deploy_and_run_on_ios_simulator $CARGO_TARGET_DIR / $TARGET /debug/main- *
104
- ./deploy_and_run_on_ios_simulator $CARGO_TARGET_DIR / $ TARGET/debug/linux_fcntl- *
104
+ export CARGO_TARGET_I386_APPLE_IOS_RUNNER= " ./deploy_and_run_on_ios_simulator"
105
+ cargo test --manifest-path libc-test/Cargo.toml --target $ TARGET
105
106
;;
106
107
107
108
x86_64-apple-ios)
108
109
rustc -O ./ci/ios/deploy_and_run_on_ios_simulator.rs
109
- ./deploy_and_run_on_ios_simulator $CARGO_TARGET_DIR / $TARGET /debug/main- *
110
- ./deploy_and_run_on_ios_simulator $CARGO_TARGET_DIR / $ TARGET/debug/linux_fcntl- *
110
+ export CARGO_TARGET_X86_64_APPLE_IOS_RUNNER= " ./deploy_and_run_on_ios_simulator"
111
+ cargo test --manifest-path libc-test/Cargo.toml --target $ TARGET
111
112
;;
112
113
113
114
arm-unknown-linux-gnueabihf)
114
- qemu-arm -L /usr/arm-linux-gnueabihf $CARGO_TARGET_DIR / $TARGET /debug/main- *
115
- qemu-arm -L /usr/arm-linux-gnueabihf $CARGO_TARGET_DIR / $ TARGET/debug/linux_fcntl- *
115
+ export CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_RUNNER= " qemu-arm -L /usr/arm-linux-gnueabihf"
116
+ cargo test --manifest-path libc-test/Cargo.toml --target $ TARGET
116
117
;;
117
118
118
119
mips-unknown-linux-gnu)
119
- qemu-mips -L /usr/mips-linux-gnu $CARGO_TARGET_DIR / $TARGET /debug/main- *
120
- qemu-mips -L /usr/mips-linux-gnu $CARGO_TARGET_DIR / $ TARGET/debug/linux_fcntl- *
120
+ export CARGO_TARGET_MIPS_UNKNOWN_LINUX_GNU_RUNNER= " qemu-mips -L /usr/mips-linux-gnu"
121
+ cargo test --manifest-path libc-test/Cargo.toml --target $ TARGET
121
122
;;
122
123
123
124
mips64-unknown-linux-gnuabi64)
124
- qemu-mips64 -L /usr/mips64-linux-gnuabi64 $CARGO_TARGET_DIR / $TARGET /debug/main- *
125
- qemu-mips64 -L /usr/mips64-linux-gnuabi64 $CARGO_TARGET_DIR / $ TARGET/debug/linux_fcntl- *
125
+ export CARGO_TARGET_MIPS64_UNKNOWN_LINUX_GNUABI64_RUNNER= " qemu-mips64 -L /usr/mips64-linux-gnuabi64"
126
+ cargo test --manifest-path libc-test/Cargo.toml --target $ TARGET
126
127
;;
127
128
128
129
mips-unknown-linux-musl)
129
- qemu-mips -L /toolchain/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.15 \
130
- $CARGO_TARGET_DIR /$TARGET /debug/main-*
131
- qemu-mips -L /toolchain/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.15 \
132
- $CARGO_TARGET_DIR /$TARGET /debug/linux_fcntl-*
130
+ export CARGO_TARGET_MIPS_UNKNOWN_LINUX_MUSL_RUNNER=" qemu-mips -L /toolchain/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.15"
131
+ cargo test --manifest-path libc-test/Cargo.toml --target $TARGET
133
132
;;
134
133
135
134
mipsel-unknown-linux-musl)
136
- qemu-mipsel -L /toolchain $CARGO_TARGET_DIR / $TARGET /debug/main- *
137
- qemu-mipsel -L /toolchain $CARGO_TARGET_DIR / $ TARGET/debug/linux_fcntl- *
138
- ;;
135
+ export CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_MUSL_RUNNER= " qemu-mipsel -L /toolchain"
136
+ cargo test --manifest-path libc-test/Cargo.toml --target $ TARGET
137
+ ;;
139
138
140
139
powerpc-unknown-linux-gnu)
141
- qemu-ppc -L /usr/powerpc-linux-gnu $CARGO_TARGET_DIR / $TARGET /debug/main- *
142
- qemu-ppc -L /usr/powerpc-linux-gnu $CARGO_TARGET_DIR / $ TARGET/debug/linux_fcntl- *
140
+ export CARGO_TARGET_POWERPC_UNKNOWN_LINUX_GNU_RUNNER= " qemu-ppc -L /usr/powerpc-linux-gnu"
141
+ cargo test --manifest-path libc-test/Cargo.toml --target $ TARGET
143
142
;;
144
143
145
144
powerpc64-unknown-linux-gnu)
146
- qemu-ppc64 -L /usr/powerpc64-linux-gnu $CARGO_TARGET_DIR / $TARGET /debug/main- *
147
- qemu-ppc64 -L /usr/powerpc64-linux-gnu $CARGO_TARGET_DIR / $ TARGET/debug/linux_fcntl- *
145
+ export CARGO_TARGET_POWERPC64_UNKNOWN_LINUX_GNU_RUNNER= " qemu-ppc64 -L /usr/powerpc64-linux-gnu"
146
+ cargo test --manifest-path libc-test/Cargo.toml --target $ TARGET
148
147
;;
149
148
150
149
aarch64-unknown-linux-gnu)
151
- qemu-aarch64 -L /usr/aarch64-linux-gnu/ $CARGO_TARGET_DIR / $TARGET /debug/main- *
152
- qemu-aarch64 -L /usr/aarch64-linux-gnu/ $CARGO_TARGET_DIR / $ TARGET/debug/linux_fcntl- *
150
+ export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER= " qemu-aarch64 -L /usr/aarch64-linux-gnu"
151
+ cargo test --manifest-path libc-test/Cargo.toml --target $ TARGET
153
152
;;
154
153
155
154
s390x-unknown-linux-gnu)
156
155
# TODO: in theory we should execute this, but qemu segfaults immediately :(
157
- # qemu-s390x -L /usr/s390x-linux-gnu/ $CARGO_TARGET_DIR/$TARGET/debug/main-*
158
- # qemu-s390x -L /usr/s390x-linux-gnu/ $CARGO_TARGET_DIR/$ TARGET/debug/linux_fcntl-*
156
+ # export CARGO_TARGET_S390X_UNKNOWN_LINUX_GNU_RUNNER=" qemu-s390x -L /usr/s390x-linux-gnu"
157
+ # cargo test --manifest-path libc-test/Cargo.toml --target $ TARGET
159
158
;;
160
159
161
160
* -rumprun-netbsd)
161
+ # TODO: replace these steps with a single program so that it can be used as a runner for cargo test
162
162
rumprun-bake hw_virtio /tmp/libc-test.img $CARGO_TARGET_DIR /$TARGET /debug/main-*
163
163
qemu-system-x86_64 -nographic -vga none -m 64 \
164
164
-kernel /tmp/libc-test.img 2>&1 | tee /tmp/out &
@@ -172,7 +172,6 @@ case "$TARGET" in
172
172
;;
173
173
174
174
* )
175
- $CARGO_TARGET_DIR /$TARGET /debug/main-*
176
- $CARGO_TARGET_DIR /$TARGET /debug/linux_fcntl-*
175
+ cargo test --manifest-path libc-test/Cargo.toml --target $TARGET
177
176
;;
178
177
esac
0 commit comments