Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run all test on arm/aarch64 #230

Merged
merged 13 commits into from
Jan 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ travis_time_start install # Use this to install any prerequisites or dependencie
cd ${HOME}
[ -e jskeus ] || git clone http://github.com/euslisp/jskeus jskeus
ln -s $CI_SOURCE_PATH jskeus/eus
ln -s `pwd`/jskeus/irteus jskeus/eus/irteus
travis_time_end

travis_time_start script.make # All commands must exit with code 0 on success. Anything else is considered failure.
Expand All @@ -60,9 +61,15 @@ source bashrc.eus
export DISPLAY=
set +e
if [[ "`uname -m`" == "arm"* || "`uname -m`" == "aarch"* ]]; then
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 ]
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
else
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 ]
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
fi

if [[ "$TRAVIS_OS_NAME" == "osx" || "`uname -m`" == "arm"* ]]; then
uname -a
else
make -C eus/contrib/eus64-check/ || exit 1 # check eus64-check
fi
travis_time_end

Expand Down
26 changes: 23 additions & 3 deletions contrib/eus64-check/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,34 @@

all : test_foreign.so
all : test

MARCH=$(shell uname -m)

test_foreign.so : test_foreign.c
ifeq ($(ARCHDIR), Linux64)
gcc -m64 -O2 -g -falign-functions=8 -Dx86_64 -DLinux -fPIC -c $<
gcc -m64 -shared -fPIC -falign-functions=8 -o $@ test_foreign.o
##
gcc -O2 -g -falign-functions=8 -Dx86_64 -DLinux -fPIC -c $<
gcc -shared -fPIC -falign-functions=8 -o $@ test_foreign.o
else
ifeq ($(ARCHDIR), LinuxARM)
ifeq ($(MARCH), aarch64)
## arm 64bit
gcc -O2 -g -Wimplicit -falign-functions=8 -Daarch64 -Darmv8 -DARM -DLinux -fPIC -c $<
gcc -shared -fPIC -falign-functions=8 -o $@ test_foreign.o
else
## arm 32bit
gcc -O2 -g -falign-functions=4 -DARM -DLinux -fpic -c $<
gcc -shared -fpic -falign-functions=4 -o $@ test_foreign.o
endif
else
## Linux32 bit
gcc -m32 -O2 -g -falign-functions=4 -Di386 -Di486 -DLinux -fpic -c $<
gcc -m32 -shared -fpic -falign-functions=4 -o $@ test_foreign.o
endif
endif

test: test_foreign.so
irteusgl eus64-test.l

clean :
\rm -f *.o *.so

38 changes: 38 additions & 0 deletions contrib/eus64-check/eus64-module.l
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
(unless (boundp '*testmod*)
(setq *testmod* (load-foreign "test_foreign.so"))
(defforeign float-test *testmod* "float_test" (:integer :float32 :float32 :float32 :float32) :integer)
(defforeign float2-test *testmod* "float_test" (:integer :double :double :double :double) :integer)
(defforeign float3-test *testmod* "float_test" () :integer)
(defforeign double-test *testmod* "double_test" (:integer :double :double :double :double) :integer)
(defforeign double2-test *testmod* "double_test" (:integer :float32 :float32 :float32 :float32) :integer)
(defforeign double3-test *testmod* "double_test" () :integer)
(defforeign iv-test *testmod* "iv_test" () :integer)
(defforeign lv-test *testmod* "lv_test" () :integer)
(defforeign fv-test *testmod* "fv_test" () :integer)
(defforeign dv-test *testmod* "dv_test" () :integer)
(defforeign str-test *testmod* "str_test" () :integer)
(defforeign int-test *testmod* "int_test" () :integer)
(defforeign ret-float *testmod* "ret_float" () :float32)
(defforeign ret-double *testmod* "ret_double" () :float)
(defforeign ret-long *testmod* "ret_long" () :integer)

(defforeign set-ifunc *testmod* "set_ifunc" (:integer) :integer)
(defforeign set-ffunc *testmod* "set_ffunc" (:integer) :integer)

(defforeign test-testd *testmod* "test_testd" (:integer :integer :integer
:integer :integer :integer
:double :double :double :double
:double :double :double :double
:double :double
:integer :integer) :float)
(defforeign call-ifunc *testmod* "call_ifunc" () :integer)
(defforeign call-ffunc *testmod* "call_ffunc" () :float)

(defforeign get-size-pointer *testmod* "get_size_of_pointer" () :integer)
(defforeign get-size-float32 *testmod* "get_size_of_float32" () :integer)
(defforeign get-size-double *testmod* "get_size_of_double" () :integer)
(defforeign get-size-long *testmod* "get_size_of_long" () :integer)
(defforeign get-size-int *testmod* "get_size_of_int" () :integer)
)


Loading