1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
#!/bin/sh
exec 2>&1
set -e
eval $(dpkg-architecture)
case "${DEB_HOST_ARCH}" in
armhf|armel)
echo "=="
echo "=="
echo "== Skip ${DEB_HOST_ARCH}"
echo "=="
echo "=="
exit 0
;;
esac
test_executables_eus() {
export EXIT_STATUS=0;
eval $(dpkg-architecture)
sed -i s/@@DEB_HOST_MULTIARCH@@/${DEB_HOST_MULTIARCH}/ test/loader.l
# compile test_foreign.so
test -e include || ln -sf lisp/c include
make -C test CC=g++ LD=g++
rm include
# use test-foregin under current source tree
sed -i 's@\*eusdir\*@"'"$PWD"'"@' test/test-foreign.l
# run test in EusLisp/test
for test_l in test/*.l; do
eusgl $test_l;
export TMP_EXIT_STATUS=$?
export EXIT_STATUS=`expr $TMP_EXIT_STATUS + $EXIT_STATUS`;
done;
echo "Exit status : $EXIT_STATUS";
assertEquals "0" "$EXIT_STATUS"
}
test_eusjpeg() {
# if eusrt.l is not exists, it fails before print *user*
name=$( eusgl '(progn (load (format nil "~A/lisp/image/jpeg/eusjpeg.l" *eusdir*))(image::write-jpeg-file "test.jpg" (instance color-image24 :init 100 100)) (print *user*) (unix::exit))' )
assertNotEquals "" "$name"
}
. shunit2
|