modify the CI setup to run tests on the thumb targets

This commit is contained in:
Jorge Aparicio 2017-04-10 17:16:13 -05:00
parent 3fa223505a
commit 3f723d1141
5 changed files with 44 additions and 18 deletions

View File

@ -1,9 +1,9 @@
FROM ubuntu:16.04 FROM ubuntu:16.04
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \
ca-certificates curl gcc gcc-arm-none-eabi libc6-dev libcurl4-openssl-dev libssh2-1 libnewlib-dev ca-certificates curl gcc gcc-arm-none-eabi libc6-dev libcurl4-openssl-dev libssh2-1 libnewlib-dev qemu-user-static
RUN curl -LSfs https://japaric.github.io/trust/install.sh | \ RUN curl -LSfs https://japaric.github.io/trust/install.sh | \
sh -s -- --git japaric/xargo --tag v0.3.1 --target x86_64-unknown-linux-gnu --to /usr/bin sh -s -- --git japaric/xargo --tag v0.3.1 --target x86_64-unknown-linux-gnu --to /usr/bin
ENV AR_thumbv6m_none_eabi=arm-none-eabi-ar \ ENV AR_thumbv6m_linux_eabi=arm-none-eabi-ar \
CARGO_TARGET_THUMBV6M_NONE_EABI_LINKER=arm-none-eabi-gcc \ CARGO_TARGET_THUMBV6M_LINUX_EABI_LINKER=arm-none-eabi-gcc \
CC_thumbv6m_none_eabi=arm-none-eabi-gcc \ CC_thumbv6m_linux_eabi=arm-none-eabi-gcc \

View File

@ -1,9 +1,9 @@
FROM ubuntu:16.04 FROM ubuntu:16.04
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \
ca-certificates curl gcc gcc-arm-none-eabi libc6-dev libcurl4-openssl-dev libssh2-1 libnewlib-dev ca-certificates curl gcc gcc-arm-none-eabi libc6-dev libcurl4-openssl-dev libssh2-1 libnewlib-dev qemu-user-static
RUN curl -LSfs https://japaric.github.io/trust/install.sh | \ RUN curl -LSfs https://japaric.github.io/trust/install.sh | \
sh -s -- --git japaric/xargo --tag v0.3.1 --target x86_64-unknown-linux-gnu --to /usr/bin sh -s -- --git japaric/xargo --tag v0.3.1 --target x86_64-unknown-linux-gnu --to /usr/bin
ENV AR_thumbv7em_none_eabihf=arm-none-eabi-ar \ ENV AR_thumbv7em_linux_eabi=arm-none-eabi-ar \
CARGO_TARGET_THUMBV7EM_NONE_EABIHF_LINKER=arm-none-eabi-gcc \ CARGO_TARGET_THUMBV7EM_LINUX_EABI_LINKER=arm-none-eabi-gcc \
CC_thumbv7em_none_eabihf=arm-none-eabi-gcc \ CC_thumbv7em_linux_eabi=arm-none-eabi-gcc \

View File

@ -1,9 +1,9 @@
FROM ubuntu:16.04 FROM ubuntu:16.04
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \
ca-certificates curl gcc gcc-arm-none-eabi libc6-dev libcurl4-openssl-dev libssh2-1 libnewlib-dev ca-certificates curl gcc gcc-arm-none-eabi libc6-dev libcurl4-openssl-dev libssh2-1 libnewlib-dev qemu-user-static
RUN curl -LSfs https://japaric.github.io/trust/install.sh | \ RUN curl -LSfs https://japaric.github.io/trust/install.sh | \
sh -s -- --git japaric/xargo --tag v0.3.1 --target x86_64-unknown-linux-gnu --to /usr/bin sh -s -- --git japaric/xargo --tag v0.3.1 --target x86_64-unknown-linux-gnu --to /usr/bin
ENV AR_thumbv7m_none_eabi=arm-none-eabi-ar \ ENV AR_thumbv7em_linux_eabihf=arm-none-eabi-ar \
CARGO_TARGET_THUMBV7M_NONE_EABI_LINKER=arm-none-eabi-gcc \ CARGO_TARGET_THUMBV7EM_LINUX_EABIHF_LINKER=arm-none-eabi-gcc \
CC_thumbv7m_none_eabi=arm-none-eabi-gcc \ CC_thumbv7em_linux_eabihf=arm-none-eabi-gcc \

View File

@ -1,9 +1,9 @@
FROM ubuntu:16.04 FROM ubuntu:16.04
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \
ca-certificates curl gcc gcc-arm-none-eabi libc6-dev libcurl4-openssl-dev libssh2-1 libnewlib-dev ca-certificates curl gcc gcc-arm-none-eabi libc6-dev libcurl4-openssl-dev libssh2-1 libnewlib-dev qemu-user-static
RUN curl -LSfs https://japaric.github.io/trust/install.sh | \ RUN curl -LSfs https://japaric.github.io/trust/install.sh | \
sh -s -- --git japaric/xargo --tag v0.3.1 --target x86_64-unknown-linux-gnu --to /usr/bin sh -s -- --git japaric/xargo --tag v0.3.1 --target x86_64-unknown-linux-gnu --to /usr/bin
ENV AR_thumbv7em_none_eabi=arm-none-eabi-ar \ ENV AR_thumbv7m_linux_eabi=arm-none-eabi-ar \
CARGO_TARGET_THUMBV7EM_NONE_EABI_LINKER=arm-none-eabi-gcc \ CARGO_TARGET_THUMBV7M_LINUX_EABI_LINKER=arm-none-eabi-gcc \
CC_thumbv7em_none_eabi=arm-none-eabi-gcc \ CC_thumbv7m_linux_eabi=arm-none-eabi-gcc \

View File

@ -3,8 +3,34 @@ set -ex
# Test our implementation # Test our implementation
case $1 in case $1 in
thumb*) thumb*)
xargo build --target $1 for t in $(ls tests); do
xargo build --target $1 --release t=${t%.rs}
# TODO(#154) enable these tests when aeabi_*mul are implemented
case $t in
powi*f2)
continue
;;
esac
# FIXME(#150) debug assertion in divmoddi4
case $1 in
thumbv6m-*)
case $t in
divdi3 | divmoddi4 | moddi3 | modsi3 | udivmoddi4 | udivmodsi4 | umoddi3 | \
umodsi3)
continue
;;
esac
;;
esac
xargo test --test $t --target $1 --features mem --no-run
qemu-arm-static target/${1}/debug/$t-*
xargo test --test $t --target $1 --features mem --no-run --release
qemu-arm-static target/${1}/release/$t-*
done
;; ;;
*) *)
cargo test --no-default-features --target $1 cargo test --no-default-features --target $1