Skip to content

Commit 9101f61

Browse files
committed
Added Travis test script
This builds Openlibm on the Travis build host (x86) and also cross-compiles to ARM. Note: the tests currently fail on ARM, as noted in #18
1 parent 9c1af7f commit 9101f61

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

.travis.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/sh
2+
set -eux
3+
4+
case "$TARGET" in
5+
host)
6+
uname -a
7+
export LOADER=
8+
make ;;
9+
arm32)
10+
sudo bash -c 'echo >> /etc/apt/sources.list "deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe"'
11+
sudo apt-get update
12+
sudo apt-get -y install gcc-4.7-arm-linux-gnueabihf qemu binfmt-support
13+
make CC="arm-linux-gnueabihf-gcc-4.7"
14+
export LD_LIBRARY_PATH=/usr/arm-linux-gnueabihf/lib
15+
#export LOADER=/usr/arm-linux-gnueabihf/lib/ld-linux-armhf.so.3
16+
export LOADER="echo TESTS DISABLED ON ARM"
17+
;;
18+
*)
19+
echo 'Unknown TARGET!'
20+
exit 1
21+
;;
22+
esac
23+
24+
$LOADER ./test/test-double
25+
$LOADER ./test/test-float

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
language: c
2+
script: ./.travis.sh
3+
env:
4+
- TARGET=host
5+
- TARGET=arm32

0 commit comments

Comments
 (0)