Debian Codegraph @

debian/tests/euslisp-all-test

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