Fix CI for thumb* targets
Main fix is inside 'utest' all the rest are minor fixes due to the new 'testcrate'. Still allow failures on TravisCI for a while.
This commit is contained in:
parent
280012b1df
commit
7f92a8ee7b
29
ci/run.sh
29
ci/run.sh
|
@ -24,29 +24,30 @@ fi
|
||||||
# Test our implementation
|
# Test our implementation
|
||||||
case $1 in
|
case $1 in
|
||||||
thumb*)
|
thumb*)
|
||||||
for t in $(ls tests); do
|
run="xargo test --manifest-path testcrate/Cargo.toml --target $1"
|
||||||
|
for t in $(ls testcrate/tests); do
|
||||||
t=${t%.rs}
|
t=${t%.rs}
|
||||||
|
|
||||||
# TODO(#154) enable these tests when aeabi_*mul are implemented
|
RUSTFLAGS="-C debug-assertions=no -C lto" \
|
||||||
case $t in
|
CARGO_INCREMENTAL=0 \
|
||||||
powi*f2)
|
$run --test $t --features 'no_std mem c' --no-run
|
||||||
continue
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
xargo test --test $t --target $1 --features 'mem gen-tests' --no-run
|
|
||||||
qemu-arm-static target/${1}/debug/$t-*
|
qemu-arm-static target/${1}/debug/$t-*
|
||||||
|
done
|
||||||
|
|
||||||
xargo test --test $t --target $1 --features 'mem gen-tests' --no-run --release
|
for t in $(ls testcrate/tests); do
|
||||||
|
t=${t%.rs}
|
||||||
|
RUSTFLAGS="-C lto" \
|
||||||
|
CARGO_INCREMENTAL=0 \
|
||||||
|
$run --test $t --features 'no_std mem c' --no-run --release
|
||||||
qemu-arm-static target/${1}/release/$t-*
|
qemu-arm-static target/${1}/release/$t-*
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
run="cargo test --manifest-path testcrate/Cargo.toml --target $1"
|
run="cargo test --manifest-path testcrate/Cargo.toml --target $1"
|
||||||
$run
|
$run --features mangled-names
|
||||||
$run --release
|
$run --features mangled-names --release
|
||||||
$run --features c
|
$run --features 'mangled-names c'
|
||||||
$run --features c --release
|
$run --features 'mangled-names c' --release
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
|
@ -14,12 +14,15 @@ rand = { version = "0.4", features = ["i128_support"] }
|
||||||
[dependencies.compiler_builtins]
|
[dependencies.compiler_builtins]
|
||||||
path = ".."
|
path = ".."
|
||||||
default-features = false
|
default-features = false
|
||||||
features = ["mangled-names", "no-lang-items"]
|
features = ["no-lang-items"]
|
||||||
|
|
||||||
[target.'cfg(all(target_arch = "arm", not(any(target_env = "gnu", target_env = "musl")), target_os = "linux"))'.dev-dependencies]
|
[target.'cfg(all(target_arch = "arm", not(any(target_env = "gnu", target_env = "musl")), target_os = "linux"))'.dev-dependencies]
|
||||||
test = { git = "https://github.com/japaric/utest" }
|
test = { git = "https://github.com/paoloteti/utest", branch = "ci" }
|
||||||
utest-cortex-m-qemu = { default-features = false, git = "https://github.com/japaric/utest" }
|
utest-cortex-m-qemu = { default-features = false, git = "https://github.com/paoloteti/utest", branch = "ci" }
|
||||||
utest-macros = { git = "https://github.com/japaric/utest" }
|
utest-macros = { git = "https://github.com/paoloteti/utest", branch = "ci" }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
c = ["compiler_builtins/c"]
|
c = ["compiler_builtins/c"]
|
||||||
|
mem = ["compiler_builtins/mem"]
|
||||||
|
mangled-names = ["compiler_builtins/mangled-names"]
|
||||||
|
no_std = []
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#![cfg_attr(feature = "no_std", no_std)]
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
target_os = "linux",
|
target_os = "linux",
|
||||||
feature = "mem"))]
|
feature = "mem"))]
|
||||||
#![feature(compiler_builtins_lib)]
|
#![feature(compiler_builtins_lib)]
|
||||||
|
#![feature(lang_items)]
|
||||||
#![no_std]
|
#![no_std]
|
||||||
|
|
||||||
extern crate compiler_builtins;
|
extern crate compiler_builtins;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
target_os = "linux",
|
target_os = "linux",
|
||||||
feature = "mem"))]
|
feature = "mem"))]
|
||||||
#![feature(compiler_builtins_lib)]
|
#![feature(compiler_builtins_lib)]
|
||||||
|
#![feature(lang_items)]
|
||||||
#![no_std]
|
#![no_std]
|
||||||
|
|
||||||
extern crate compiler_builtins;
|
extern crate compiler_builtins;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
target_os = "linux",
|
target_os = "linux",
|
||||||
feature = "mem"))]
|
feature = "mem"))]
|
||||||
#![feature(compiler_builtins_lib)]
|
#![feature(compiler_builtins_lib)]
|
||||||
|
#![feature(lang_items)]
|
||||||
#![no_std]
|
#![no_std]
|
||||||
|
|
||||||
extern crate compiler_builtins;
|
extern crate compiler_builtins;
|
||||||
|
|
|
@ -1,6 +1,35 @@
|
||||||
|
#![feature(compiler_builtins_lib)]
|
||||||
#![feature(i128_type)]
|
#![feature(i128_type)]
|
||||||
|
#![feature(lang_items, core_float, core_float_bits)]
|
||||||
#![allow(bad_style)]
|
#![allow(bad_style)]
|
||||||
|
#![allow(unused_imports)]
|
||||||
|
#![no_std]
|
||||||
|
|
||||||
|
use core::num::Float;
|
||||||
|
|
||||||
extern crate compiler_builtins;
|
extern crate compiler_builtins;
|
||||||
|
|
||||||
|
#[cfg(all(target_arch = "arm",
|
||||||
|
not(any(target_env = "gnu", target_env = "musl")),
|
||||||
|
target_os = "linux",
|
||||||
|
test))]
|
||||||
|
extern crate utest_cortex_m_qemu;
|
||||||
|
|
||||||
|
#[cfg(all(target_arch = "arm",
|
||||||
|
not(any(target_env = "gnu", target_env = "musl")),
|
||||||
|
target_os = "linux",
|
||||||
|
test))]
|
||||||
|
#[macro_use]
|
||||||
|
extern crate utest_macros;
|
||||||
|
|
||||||
|
#[cfg(all(target_arch = "arm",
|
||||||
|
not(any(target_env = "gnu", target_env = "musl")),
|
||||||
|
target_os = "linux",
|
||||||
|
test))]
|
||||||
|
macro_rules! panic { // overrides `panic!`
|
||||||
|
($($tt:tt)*) => {
|
||||||
|
upanic!($($tt)*);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
include!(concat!(env!("OUT_DIR"), "/generated.rs"));
|
include!(concat!(env!("OUT_DIR"), "/generated.rs"));
|
||||||
|
|
Loading…
Reference in New Issue