1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-11 06:20:23 +02:00

All examples are now built and tested on `make installcheck'

rather than `make check'.
This commit is contained in:
Martin Grabmüller 2001-07-24 10:43:34 +00:00
parent ba7562306f
commit 1321f4ff18
15 changed files with 87 additions and 58 deletions

View file

@ -1,3 +1,8 @@
2001-07-24 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
All examples are now built and tested on `make installcheck'
rather than `make check'.
2001-07-19 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
* box-dynamic-module/Makefile.am, box-dynamic/Makefile.am,

View file

@ -19,20 +19,18 @@
## to the Free Software Foundation, Inc., 59 Temple Place, Suite
## 330, Boston, MA 02111-1307 USA
all: libbox-module
EXTRA_DIST = README box.c box-module.scm box-mixed.scm check.test
CFLAGS=-I../..
LIBS=`GUILE_LOAD_PATH=$(top_srcdir) $(top_builddir)/libguile/guile -e main -s $(top_builddir)/guile-config/guile-config link` -L$(top_builddir)/libguile -L$(top_builddir)/qt
TESTS = check.test
#CFLAGS=`guile-config compile`
#LIBS=`guile-config link`
CFLAGS=`$(bindir)/guile-config compile`
LIBS=`$(bindir)/guile-config link`
libbox-module: box.lo
sh ../../libtool --mode=link $(CC) $< $(LIBS) -rpath $(prefix)/lib -o libbox-module.la
sh ../../libtool --mode=link $(CC) $< $(LIBS) -rpath $(libdir) -o libbox-module.la
box.lo: box.c
sh ../../libtool --mode=compile $(CC) $(CFLAGS) -c $<
sh ../../libtool --mode=compile $(CC) $(CFLAGS) -c $<
installcheck: libbox-module
LTDL_LIBRARY_PATH=.libs GUILE_LOAD_PATH=$(top_srcdir):$(srcdir) $(srcdir)/check.test
CLEANFILES=libbox-module.la box.lo box.o

View file

@ -8,7 +8,7 @@ set -e
#
# ./box test #1
#
LTDL_LIBRARY_PATH=.libs GUILE_LOAD_PATH=../..:. ../../libguile/guile -c '(begin (use-modules (box-module)) (let ((b (make-box))) (display b) (newline)))' > TMP
$guile -c '(begin (use-modules (box-module)) (let ((b (make-box))) (display b) (newline)))' > TMP
cat <<EOF | diff -u - TMP
#<box #f>
EOF
@ -17,7 +17,7 @@ rm -f TMP
#
# ./box test #2
#
LTDL_LIBRARY_PATH=.libs GUILE_LOAD_PATH=../..:. ../../libguile/guile -c '(begin (use-modules (box-module)) (let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline)))' > TMP
$guile -c '(begin (use-modules (box-module)) (let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline)))' > TMP
cat <<EOF | diff -u - TMP
#<box #f>
#<box 1>
@ -27,7 +27,7 @@ rm -f TMP
#
# ./box test #3
#
LTDL_LIBRARY_PATH=.libs GUILE_LOAD_PATH=../..:. ../../libguile/guile -c '(begin (use-modules (box-module)) (let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline) (display (box-ref b)) (newline)))' > TMP
$guile -c '(begin (use-modules (box-module)) (let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline) (display (box-ref b)) (newline)))' > TMP
cat <<EOF | diff -u - TMP
#<box #f>
#<box 1>
@ -38,7 +38,7 @@ rm -f TMP
#
# ./box test #4
#
LTDL_LIBRARY_PATH=.libs GUILE_LOAD_PATH=../..:. ../../libguile/guile -c '(begin (use-modules (box-mixed)) (let ((b (make-box-list 1 2 3))) (display b) (newline) (display (box-map 1+ b)) (newline)))' > TMP
$guile -c '(begin (use-modules (box-mixed)) (let ((b (make-box-list 1 2 3))) (display b) (newline) (display (box-map 1+ b)) (newline)))' > TMP
cat <<EOF | diff -u - TMP
(#<box 1> #<box 2> #<box 3>)
(#<box 2> #<box 3> #<box 4>)

View file

@ -19,17 +19,18 @@
## to the Free Software Foundation, Inc., 59 Temple Place, Suite
## 330, Boston, MA 02111-1307 USA
all: libbox
EXTRA_DIST = README box.c check.test
CFLAGS=-I../..
LIBS=`GUILE_LOAD_PATH=$(top_srcdir) $(top_builddir)/libguile/guile -e main -s $(top_builddir)/guile-config/guile-config link` -$(top_builddir)/libguile -L$(top_builddir)/qt
TESTS = check.test
CFLAGS=`$(bindir)/guile-config compile`
LIBS=`$(bindir)/guile-config link`
libbox: box.lo
sh ../../libtool --mode=link $(CC) $< $(LIBS) -rpath $(prefix)/lib -o libbox.la
sh ../../libtool --mode=link $(CC) $< $(LIBS) -rpath $(libdir) -o libbox.la
box.lo: box.c
sh ../../libtool --mode=compile $(CC) $(CFLAGS) -c $<
sh ../../libtool --mode=compile $(CC) $(CFLAGS) -c $<
installcheck: libbox
LTDL_LIBRARY_PATH=.libs GUILE_LOAD_PATH=$(top_srcdir):$(srcdir) $(srcdir)/check.test
CLEANFILES=libbox.la box.lo box.o

View file

@ -8,7 +8,7 @@ set -e
#
# ./box test #1
#
LTDL_LIBRARY_PATH=.libs GUILE_LOAD_PATH=../..:. ../../libguile/guile -c '(begin (load-extension "libbox" "scm_init_box") (let ((b (make-box))) (display b) (newline)))' > TMP
$guile -c '(begin (load-extension "libbox" "scm_init_box") (let ((b (make-box))) (display b) (newline)))' > TMP
cat <<EOF | diff -u - TMP
#<box #f>
EOF
@ -17,7 +17,7 @@ rm -f TMP
#
# ./box test #2
#
LTDL_LIBRARY_PATH=.libs GUILE_LOAD_PATH=../..:. ../../libguile/guile -c '(begin (load-extension "libbox" "scm_init_box") (let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline)))' > TMP
$guile -c '(begin (load-extension "libbox" "scm_init_box") (let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline)))' > TMP
cat <<EOF | diff -u - TMP
#<box #f>
#<box 1>
@ -27,7 +27,7 @@ rm -f TMP
#
# ./box test #3
#
LTDL_LIBRARY_PATH=.libs GUILE_LOAD_PATH=../..:. ../../libguile/guile -c '(begin (load-extension "libbox" "scm_init_box") (let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline) (display (box-ref b)) (newline)))' > TMP
$guile -c '(begin (load-extension "libbox" "scm_init_box") (let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline) (display (box-ref b)) (newline)))' > TMP
cat <<EOF | diff -u - TMP
#<box #f>
#<box 1>

View file

@ -19,13 +19,18 @@
## to the Free Software Foundation, Inc., 59 Temple Place, Suite
## 330, Boston, MA 02111-1307 USA
noinst_PROGRAMS = box
EXTRA_DIST = README box.c check.test
box_SOURCES = box.c
CFLAGS=`$(bindir)/guile-config compile`
LIBS=`$(bindir)/guile-config link`
EXTRA_DIST = README check.test
box: box.o
$(CC) $< $(LIBS) -o box
CFLAGS=-I../..
LIBS=`GUILE_LOAD_PATH=$(top_srcdir) $(top_builddir)/libguile/guile -e main -s $(top_builddir)/guile-config/guile-config link` -L$(top_builddir)/libguile -L$(top_builddir)/qt
box.o: box.c
$(CC) $(CFLAGS) -c $<
TESTS = check.test
installcheck: box
LD_LIBRARY_PATH=$(libdir) GUILE_LOAD_PATH=$(top_srcdir) $(srcdir)/check.test
CLEANFILES=box box.o

View file

@ -8,7 +8,7 @@ set -e
#
# ./box test #1
#
GUILE_LOAD_PATH=../..:. ./box -c '(begin (use-modules (box-module)) (let ((b (make-box))) (display b) (newline)))' > TMP
./box -c '(begin (use-modules (box-module)) (let ((b (make-box))) (display b) (newline)))' > TMP
cat <<EOF | diff -u - TMP
#<box #f>
EOF
@ -17,7 +17,7 @@ rm -f TMP
#
# ./box test #2
#
GUILE_LOAD_PATH=../..:. ./box -c '(begin (use-modules (box-module)) (let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline)))' > TMP
./box -c '(begin (use-modules (box-module)) (let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline)))' > TMP
cat <<EOF | diff -u - TMP
#<box #f>
#<box 1>
@ -27,7 +27,7 @@ rm -f TMP
#
# ./box test #3
#
GUILE_LOAD_PATH=../..:. ./box -c '(begin (use-modules (box-module)) (let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline) (display (box-ref b)) (newline)))' > TMP
./box -c '(begin (use-modules (box-module)) (let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline) (display (box-ref b)) (newline)))' > TMP
cat <<EOF | diff -u - TMP
#<box #f>
#<box 1>

View file

@ -19,13 +19,18 @@
## to the Free Software Foundation, Inc., 59 Temple Place, Suite
## 330, Boston, MA 02111-1307 USA
noinst_PROGRAMS = box
EXTRA_DIST = README box.c check.test
box_SOURCES = box.c
CFLAGS=`$(bindir)/guile-config compile`
LIBS=`$(bindir)/guile-config link`
EXTRA_DIST = README check.test
box: box.o
$(CC) $< $(LIBS) -o box
CFLAGS=-I../..
LIBS=`GUILE_LOAD_PATH=$(top_srcdir) $(top_builddir)/libguile/guile -e main -s $(top_builddir)/guile-config/guile-config link` -L$(top_buildir)/libguile -L$(top_builddir)/qt
box.o: box.c
$(CC) $(CFLAGS) -c $<
TESTS = check.test
installcheck: box
LD_LIBRARY_PATH=$(libdir) GUILE_LOAD_PATH=$(top_srcdir) $(srcdir)/check.test
CLEANFILES=box box.o

View file

@ -8,7 +8,7 @@ set -e
#
# ./box test #1
#
GUILE_LOAD_PATH=../.. ./box -c '(let ((b (make-box))) (display b) (newline))' > TMP
./box -c '(let ((b (make-box))) (display b) (newline))' > TMP
cat <<EOF | diff -u - TMP
#<box #f>
EOF
@ -17,7 +17,7 @@ rm -f TMP
#
# ./box test #2
#
GUILE_LOAD_PATH=../.. ./box -c '(let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline))' > TMP
./box -c '(let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline))' > TMP
cat <<EOF | diff -u - TMP
#<box #f>
#<box 1>
@ -27,7 +27,7 @@ rm -f TMP
#
# ./box test #3
#
GUILE_LOAD_PATH=../.. ./box -c '(let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline) (display (box-ref b)) (newline))' > TMP
./box -c '(let ((b (make-box))) (display b) (newline) (box-set! b 1) (display b) (newline) (display (box-ref b)) (newline))' > TMP
cat <<EOF | diff -u - TMP
#<box #f>
#<box 1>

View file

@ -19,6 +19,7 @@
## to the Free Software Foundation, Inc., 59 Temple Place, Suite
## 330, Boston, MA 02111-1307 USA
EXTRA_DIST = README module-0.scm module-1.scm module-2.scm main
EXTRA_DIST = README module-0.scm module-1.scm module-2.scm main check.test
TESTS = check.test
installcheck:
srcdir=$(srcdir) GUILE_LOAD_PATH=$(top_srcdir):$(srcdir) $(srcdir)/check.test

View file

@ -3,12 +3,16 @@
# must be run from this directory
guile=${GUILE-../../libguile/guile}
if test "X$srcdir" = X; then
srcdir=.
fi
set -e
#
# ./main test
#
GUILE_LOAD_PATH=../.. $guile -s main > TMP
$guile -s $srcdir/main > TMP
cat <<EOF | diff -u - TMP
module-0 foo
module-0 bar

View file

@ -19,6 +19,7 @@
## to the Free Software Foundation, Inc., 59 Temple Place, Suite
## 330, Boston, MA 02111-1307 USA
EXTRA_DIST = README safe untrusted.scm evil.scm
EXTRA_DIST = README safe untrusted.scm evil.scm check.test
TESTS = check.test
installcheck:
srcdir=$(srcdir) GUILE_LOAD_PATH=$(top_srcdir) $(srcdir)/check.test

View file

@ -3,12 +3,16 @@
# must be run from this directory
guile=${GUILE-../../libguile/guile}
if test "X$srcdir" = X; then
srcdir=.
fi
set -e
#
# ./safe untrusted.scm
#
GUILE_LOAD_PATH=../.. $guile -s safe untrusted.scm > TMP
$guile -s $srcdir/safe $srcdir/untrusted.scm > TMP
cat <<EOF | diff -u - TMP
1
1
@ -27,7 +31,7 @@ rm -f TMP
#
# ./safe evil.scm
#
GUILE_LOAD_PATH=../.. $guile -s safe evil.scm > TMP
$guile -s $srcdir/safe $srcdir/evil.scm > TMP
cat <<EOF | diff -u - TMP
** Exception: (unbound-variable #f "Unbound variable: ~S" (open-input-file) #f)
EOF

View file

@ -19,6 +19,7 @@
## to the Free Software Foundation, Inc., 59 Temple Place, Suite
## 330, Boston, MA 02111-1307 USA
EXTRA_DIST = README simple-hello.scm hello fact
EXTRA_DIST = README simple-hello.scm hello fact check.test
TESTS = check.test
installcheck:
srcdir=$(srcdir) GUILE_LOAD_PATH=$(top_srcdir) $(srcdir)/check.test

View file

@ -11,12 +11,16 @@ else
exit 1
fi
if test "X$srcdir" = X; then
srcdir=.
fi
set -e
#
# simple-hello.scm
#
GUILE_LOAD_PATH=../.. $guile -s simple-hello.scm > TMP
$guile -s $srcdir/simple-hello.scm > TMP
cat <<EOF | diff -u - TMP
Hello, World!
EOF
@ -25,15 +29,15 @@ rm -f TMP
#
# hello
#
GUILE_LOAD_PATH=../.. $guile -s hello > TMP
$guile -s $srcdir/hello > TMP
echo "Hello, World!" | diff -u - TMP
rm -f TMP
GUILE_LOAD_PATH=../.. $guile -s hello --version > TMP
$guile -s $srcdir/hello --version > TMP
echo "hello 0.0.1" | diff -u - TMP
rm -f TMP
GUILE_LOAD_PATH=../.. $guile -s hello --help > TMP
$guile -s $srcdir/hello --help > TMP
cat <<EOF | diff -u - TMP
Usage: hello [options...]
--help, -h Show this usage information
@ -44,6 +48,6 @@ rm -f TMP
#
# fact
#
case `GUILE_LOAD_PATH=../.. $guile -s fact 5` in 120) ;; *) echo $0: error: fact 5 ;; esac
case `$guile -s $srcdir/fact 5` in 120) ;; *) echo $0: error: fact 5 ;; esac
# check.test ends here