| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
exec 2>&1 |
| 4 |
|
| 5 |
set -e |
| 6 |
|
| 7 |
test_eus0_compile() { |
| 8 |
# check if compile works. |
| 9 |
echo "(eval-when (load eval) (defun foo () (print *user*)))" > foo.l |
| 10 |
name=$( eus0 "(progn (compile-file \"foo.l\") (unix::unlink \"foo.l\") (load \"foo.so\") (foo) (unix::exit))" ) |
| 11 |
assertNotEquals "" "$name" |
| 12 |
|
| 13 |
echo "(eval-when (load eval) (defun bar () (print *user*)))" > bar.l |
| 14 |
name=$( eus0 "(progn (compile-file-if-src-newer \"bar.l\") (unix::unlink \"bar.l\") (load \"bar.so\") (bar) (unix::exit))" ) |
| 15 |
assertNotEquals "" "$name" |
| 16 |
|
| 17 |
name=$( eus0 "(progn (compile-file-if-src-newer \"/usr/share/euslisp/lisp/comp/comp.l\") (load \"comp.so\") (print *user*) (unix::exit))" ) |
| 18 |
assertNotEquals "" "$name" |
| 19 |
} |
| 20 |
|
| 21 |
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1066307 |
| 22 |
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1066347 |
| 23 |
# This is most likely caused by a change in dpkg 1.22.6, that enabled |
| 24 |
# -Werror=implicit-function-declaration. For more information, see |
| 25 |
# https://wiki.debian.org/qa.debian.org/FTBFS#A2024-03-13_-Werror.3Dimplicit-function-declaration |
| 26 |
|
| 27 |
test_werror() { |
| 28 |
# compile test_foreign.so |
| 29 |
mkdir -p /tmp/$$/obj /tmp/$$/lib |
| 30 |
make -C lisp/image/jpeg CC=gcc LD=gcc CFLAGS=-Werror EUSDIR=/tmp/$$ /tmp/$$//obj/jpegmemcd.o |
| 31 |
} |
| 32 |
|
| 33 |
. shunit2 |