Skip to content

Commit a89bd07

Browse files
authored
Merge pull request #230 from k-okada/fix_travis_error
run all test on arm/aarch64
2 parents c13a3ce + 959df9d commit a89bd07

27 files changed

+525
-192
lines changed

.travis.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ travis_time_start install # Use this to install any prerequisites or dependencie
4747
cd ${HOME}
4848
[ -e jskeus ] || git clone http://github.com/euslisp/jskeus jskeus
4949
ln -s $CI_SOURCE_PATH jskeus/eus
50+
ln -s `pwd`/jskeus/irteus jskeus/eus/irteus
5051
travis_time_end
5152

5253
travis_time_start script.make # All commands must exit with code 0 on success. Anything else is considered failure.
@@ -60,9 +61,15 @@ source bashrc.eus
6061
export DISPLAY=
6162
set +e
6263
if [[ "`uname -m`" == "arm"* || "`uname -m`" == "aarch"* ]]; then
63-
export EXIT_STATUS=0; for test_l in irteus/test/geo.l; do irteusgl $test_l; export EXIT_STATUS=`expr $? + 1`; done;echo "Exit status : $EXIT_STATUS"; [ $EXIT_STATUS == 0 ]
64+
export EXIT_STATUS=0; for test_l in irteus/test/*.l; do [[ $test_l =~ geo.l|interpolator.l|irteus-demo.l|test-irt-motion.l|object.l|coords.l|bignum.l|mathtest.l ]] && continue; irteusgl $test_l; export EXIT_STATUS=`expr $? + $EXIT_STATUS`; done;echo "Exit status : $EXIT_STATUS"; [ $EXIT_STATUS == 0 ] || exit 1
6465
else
65-
export EXIT_STATUS=0; for test_l in irteus/test/*.l; do irteusgl $test_l; export EXIT_STATUS=`expr $? + 1`; done;echo "Exit status : $EXIT_STATUS"; [ $EXIT_STATUS == 0 ]
66+
export EXIT_STATUS=0; for test_l in irteus/test/*.l; do irteusgl $test_l; export EXIT_STATUS=`expr $? + $EXIT_STATUS`; done;echo "Exit status : $EXIT_STATUS"; [ $EXIT_STATUS == 0 ] || exit 1
67+
fi
68+
69+
if [[ "$TRAVIS_OS_NAME" == "osx" || "`uname -m`" == "arm"* ]]; then
70+
uname -a
71+
else
72+
make -C eus/contrib/eus64-check/ || exit 1 # check eus64-check
6673
fi
6774
travis_time_end
6875

contrib/eus64-check/Makefile

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,34 @@
11

2-
all : test_foreign.so
2+
all : test
3+
4+
MARCH=$(shell uname -m)
35

46
test_foreign.so : test_foreign.c
57
ifeq ($(ARCHDIR), Linux64)
6-
gcc -m64 -O2 -g -falign-functions=8 -Dx86_64 -DLinux -fPIC -c $<
7-
gcc -m64 -shared -fPIC -falign-functions=8 -o $@ test_foreign.o
8+
##
9+
gcc -O2 -g -falign-functions=8 -Dx86_64 -DLinux -fPIC -c $<
10+
gcc -shared -fPIC -falign-functions=8 -o $@ test_foreign.o
11+
else
12+
ifeq ($(ARCHDIR), LinuxARM)
13+
ifeq ($(MARCH), aarch64)
14+
## arm 64bit
15+
gcc -O2 -g -Wimplicit -falign-functions=8 -Daarch64 -Darmv8 -DARM -DLinux -fPIC -c $<
16+
gcc -shared -fPIC -falign-functions=8 -o $@ test_foreign.o
17+
else
18+
## arm 32bit
19+
gcc -O2 -g -falign-functions=4 -DARM -DLinux -fpic -c $<
20+
gcc -shared -fpic -falign-functions=4 -o $@ test_foreign.o
21+
endif
822
else
23+
## Linux32 bit
924
gcc -m32 -O2 -g -falign-functions=4 -Di386 -Di486 -DLinux -fpic -c $<
1025
gcc -m32 -shared -fpic -falign-functions=4 -o $@ test_foreign.o
1126
endif
27+
endif
28+
29+
test: test_foreign.so
30+
irteusgl eus64-test.l
1231

1332
clean :
1433
\rm -f *.o *.so
34+

contrib/eus64-check/eus64-module.l

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
(unless (boundp '*testmod*)
2+
(setq *testmod* (load-foreign "test_foreign.so"))
3+
(defforeign float-test *testmod* "float_test" (:integer :float32 :float32 :float32 :float32) :integer)
4+
(defforeign float2-test *testmod* "float_test" (:integer :double :double :double :double) :integer)
5+
(defforeign float3-test *testmod* "float_test" () :integer)
6+
(defforeign double-test *testmod* "double_test" (:integer :double :double :double :double) :integer)
7+
(defforeign double2-test *testmod* "double_test" (:integer :float32 :float32 :float32 :float32) :integer)
8+
(defforeign double3-test *testmod* "double_test" () :integer)
9+
(defforeign iv-test *testmod* "iv_test" () :integer)
10+
(defforeign lv-test *testmod* "lv_test" () :integer)
11+
(defforeign fv-test *testmod* "fv_test" () :integer)
12+
(defforeign dv-test *testmod* "dv_test" () :integer)
13+
(defforeign str-test *testmod* "str_test" () :integer)
14+
(defforeign int-test *testmod* "int_test" () :integer)
15+
(defforeign ret-float *testmod* "ret_float" () :float32)
16+
(defforeign ret-double *testmod* "ret_double" () :float)
17+
(defforeign ret-long *testmod* "ret_long" () :integer)
18+
19+
(defforeign set-ifunc *testmod* "set_ifunc" (:integer) :integer)
20+
(defforeign set-ffunc *testmod* "set_ffunc" (:integer) :integer)
21+
22+
(defforeign test-testd *testmod* "test_testd" (:integer :integer :integer
23+
:integer :integer :integer
24+
:double :double :double :double
25+
:double :double :double :double
26+
:double :double
27+
:integer :integer) :float)
28+
(defforeign call-ifunc *testmod* "call_ifunc" () :integer)
29+
(defforeign call-ffunc *testmod* "call_ffunc" () :float)
30+
31+
(defforeign get-size-pointer *testmod* "get_size_of_pointer" () :integer)
32+
(defforeign get-size-float32 *testmod* "get_size_of_float32" () :integer)
33+
(defforeign get-size-double *testmod* "get_size_of_double" () :integer)
34+
(defforeign get-size-long *testmod* "get_size_of_long" () :integer)
35+
(defforeign get-size-int *testmod* "get_size_of_int" () :integer)
36+
)
37+
38+

0 commit comments

Comments
 (0)