File: euslisp-compile-test

package info (click to toggle)
euslisp 9.31%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 55,448 kB
  • sloc: ansic: 41,610; lisp: 3,339; makefile: 286; sh: 238; asm: 138; python: 53
file content (33 lines) | stat: -rw-r--r-- 1,264 bytes parent folder | download
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
#!/bin/sh

exec 2>&1

set -e

test_eus0_compile() {
    # check if compile works.
    echo "(eval-when (load eval) (defun foo () (print *user*)))" > foo.l
    name=$( eus0 "(progn (compile-file \"foo.l\") (unix::unlink \"foo.l\") (load \"foo.so\") (foo) (unix::exit))" )
    assertNotEquals "" "$name"

    echo "(eval-when (load eval) (defun bar () (print *user*)))" > bar.l
    name=$( eus0 "(progn (compile-file-if-src-newer \"bar.l\") (unix::unlink \"bar.l\") (load \"bar.so\") (bar) (unix::exit))" )
    assertNotEquals "" "$name"

    name=$( eus0 "(progn (compile-file-if-src-newer \"/usr/share/euslisp/lisp/comp/comp.l\") (load \"comp.so\") (print *user*) (unix::exit))" )
    assertNotEquals "" "$name"
}

# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1066307
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1066347
# This is most likely caused by a change in dpkg 1.22.6, that enabled
# -Werror=implicit-function-declaration. For more information, see
# https://wiki.debian.org/qa.debian.org/FTBFS#A2024-03-13_-Werror.3Dimplicit-function-declaration

test_werror() {
    # compile test_foreign.so
    mkdir -p /tmp/$$/obj /tmp/$$/lib
    make -C lisp/image/jpeg CC=gcc LD=gcc CFLAGS=-Werror EUSDIR=/tmp/$$ /tmp/$$//obj/jpegmemcd.o
}

. shunit2