[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: set-current-module broken in current Guile CVS version
From: |
thi |
Subject: |
Re: set-current-module broken in current Guile CVS version |
Date: |
Wed, 10 Jan 2001 04:10:58 -0800 |
From: Dirk Herrmann <address@hidden>
Date: Thu, 28 Dec 2000 11:21:57 +0100 (MET)
Believe me, I _always_ run the test-suite before committing changes.
The problem is not the lack of a 'make check' command (although this
would be nice to have, agreed), but rather of the large areas of
untested stuff within the test-suite itself.
ok, please find below the latest attempt to get "make check" to run the
test suite into guile. the earlier attempt can be seen at:
http://sources.redhat.com/ml/guile/2000-03/msg00579.html
http://sources.redhat.com/ml/guile/2000-03/msg00580.html
please do one of the following:
a - incorporate the changes
b - give me feedback on what is wrong so i can fix it and resubmit
c - ignore it and suffer my whining (you have been warned :-)
there is a new file "check-guile.in" and a unidiff that touches four
files. but first, here are some changelog entries:
[top-level]
2001-01-10 Thien-Thi Nguyen <address@hidden>
* Makefile.am (TESTS): New automake var.
* configure.in (test_suite_dir): New substituted var.
(AC_OUTPUT): Add check-guile.
[subdir test-suite]
2001-01-10 Thien-Thi Nguyen <address@hidden>
* paths.scm (datadir): Allow override by env var
`TEST_SUITE_DIR'.
* guile-test (main): Add local var `global-pass',
register a reporter to modify it on "fail" or "xpass",
and use it as exit status.
If env var `DEBUG' set, display load path, set
`%load-verbosely', and enable backtrace and debug-evaluator.
here is the new top-level file "check-guile.in". this is munged in the
normal way by configure to produce executable "check-guile". see header
comments for invocation details.
#! /bin/sh
# Usage: check-guile [-i GUILE-INTERPRETER] [GUILE-TEST-ARGS]
# If `-i GUILE-INTERPRETER' is omitted, use libguile/guile.
# See test-suite/guile-test for documentation on GUILE-TEST-ARGS.
#
# Example invocations:
# ./check-guile
# ./check-guile -i /usr/local/bin/guile
# ./check-guile numbers.test
# ./check-guile -i /usr/local/bin/guile numbers.test
address@hidden@
export TEST_SUITE_DIR
if [ x"$1" = x-i ] ; then
guile=$2
shift
shift
else
parent=`dirname $TEST_SUITE_DIR`
guile=$parent/libguile/guile
GUILE_LOAD_PATH=$parent
export GUILE_LOAD_PATH
fi
if [ -f "$guile" -a -x "$guile" ] ; then
echo Testing $guile ...
echo with GUILE_LOAD_PATH = \`$GUILE_LOAD_PATH\'
else
echo ERROR: Cannot execute $guile
exit 1
fi
cd $TEST_SUITE_DIR
exec $guile -e main -s guile-test "$@"
# check-guile ends here
the rest of this mail is a copy of the emacs buffer where i did a
time-stamped cvs update and diff. it ends w/ "Compilation finished".
in case of mta misbehavior, this is also available as:
http://www.glug.org/people/ttn/software/patches/guile-cvs20010110-cvs20010110ttn1.diff.gz
thi
__________________________________
cd ~/build/.gnu/subversions/guile-core/
date -u ; cvs update ; date -u ; cvs diff ; date -u
Wed Jan 10 11:44:09 UTC 2001
? libltdl
? guile.log
? patch
? check-guile.in
? check-guile
? doc/version.texi
? doc/stamp-vti
? libguile/.ttn-load.c
? libguile/.ttn-Makefile.am
cvs server: Updating .
M Makefile.am
M configure.in
cvs server: Updating build
cvs server: Updating devel
cvs server: Updating devel/build
cvs server: Updating devel/policy
cvs server: Updating devel/strings
cvs server: Updating devel/translation
cvs server: Updating devel/vm
cvs server: Updating devel/vm/ior
cvs server: Updating doc
cvs server: Updating doc/example-smob
cvs server: Updating emacs
cvs server: Updating guile-config
cvs server: Updating guile-readline
cvs server: Updating ice-9
cvs server: Updating lang
cvs server: Updating libguile
cvs update: in directory libltdl:
cvs update: cannot open CVS/Entries for reading: No such file or directory
cvs server: Updating libltdl
cvs server: Updating oop
cvs server: Updating oop/goops
cvs server: Updating qt
cvs server: Updating qt/md
cvs server: Updating qt/time
cvs server: Updating test-suite
M test-suite/guile-test
M test-suite/paths.scm
cvs server: Updating test-suite/tests
cvs server: Updating test-suite/tests/asmobs
cvs server: Updating test-suite/tests/c-api
cvs server: Updating www
Wed Jan 10 11:44:11 UTC 2001
? libltdl
? guile.log
? patch
? check-guile.in
? check-guile
? doc/version.texi
? doc/stamp-vti
? libguile/.ttn-load.c
? libguile/.ttn-Makefile.am
cvs server: Diffing .
Index: Makefile.am
===================================================================
RCS file: /cvs/guile/guile-core/Makefile.am,v
retrieving revision 1.19
diff -u -p -w -r1.19 Makefile.am
--- Makefile.am 2000/10/25 14:45:36 1.19
+++ Makefile.am 2001/01/10 11:44:32
@@ -24,6 +24,8 @@ SUBDIRS = ice-9 oop qt libltdl libguile
include_HEADERS = libguile.h
EXTRA_DIST = qthreads.m4 HACKING GUILE-VERSION ANON-CVS SNAPSHOTS
+
+TESTS = check-guile
# The rule will cd to $(top_srcdir).
ACLOCAL = ./guile-aclocal.sh
Index: configure.in
===================================================================
RCS file: /cvs/guile/guile-core/configure.in,v
retrieving revision 1.124
diff -u -p -w -r1.124 configure.in
--- configure.in 2000/10/25 14:45:36 1.124
+++ configure.in 2001/01/10 11:44:33
@@ -507,7 +507,11 @@ AC_SUBST(AWK)
AC_SUBST(LIBLOBJS)
AC_SUBST(EXTRA_DOT_DOC_FILES)
-AC_OUTPUT([Makefile libguile/Makefile libguile/guile-snarf
libguile/guile-doc-snarf libguile/guile-func-name-check
libguile/guile-snarf.awk libguile/versiondat.h ice-9/Makefile oop/Makefile
oop/goops/Makefile qt/Makefile qt/qt.h qt/md/Makefile qt/time/Makefile
guile-config/Makefile doc/Makefile], [chmod +x libguile/guile-snarf
libguile/guile-doc-snarf libguile/guile-func-name-check])
+# Support for "make check"
+test_suite_dir="`(cd $srcdir ; pwd)`/test-suite"
+AC_SUBST(test_suite_dir)
+
+AC_OUTPUT([Makefile libguile/Makefile libguile/guile-snarf
libguile/guile-doc-snarf libguile/guile-func-name-check
libguile/guile-snarf.awk libguile/versiondat.h ice-9/Makefile oop/Makefile
oop/goops/Makefile qt/Makefile qt/qt.h qt/md/Makefile qt/time/Makefile
guile-config/Makefile doc/Makefile check-guile], [chmod +x libguile/guile-snarf
libguile/guile-doc-snarf libguile/guile-func-name-check check-guile])
dnl Local Variables:
dnl comment-start: "dnl "
cvs server: Diffing devel
cvs server: Diffing devel/build
cvs server: Diffing devel/policy
cvs server: Diffing devel/strings
cvs server: Diffing devel/translation
cvs server: Diffing devel/vm
cvs server: Diffing devel/vm/ior
cvs server: Diffing doc
cvs server: Diffing doc/example-smob
cvs server: Diffing emacs
cvs server: Diffing guile-config
cvs server: Diffing guile-readline
cvs server: Diffing ice-9
cvs server: Diffing libguile
cvs server: Diffing oop
cvs server: Diffing oop/goops
cvs server: Diffing qt
cvs server: Diffing qt/md
cvs server: Diffing qt/time
cvs server: Diffing test-suite
Index: test-suite/guile-test
===================================================================
RCS file: /cvs/guile/guile-core/test-suite/guile-test,v
retrieving revision 1.2
diff -u -p -w -r1.2 guile-test
--- test-suite/guile-test 2000/05/08 17:42:03 1.2
+++ test-suite/guile-test 2001/01/10 11:44:34
@@ -29,7 +29,8 @@
;;;; Run tests from the Guile test suite. Report failures and
;;;; unexpected passes to the standard output, along with a summary of
;;;; all the results. Record each reported test outcome in the log
-;;;; file, `guile.log'.
+;;;; file, `guile.log'. The exit status is #f if any of the tests
+;;;; fail or pass unexpectedly.
;;;;
;;;; Normally, guile-test scans the test directory, and executes all
;;;; files whose names end in `.test'. (It assumes they contain
@@ -44,6 +45,7 @@
;;;; Change the #! line at the top of this script to point at the
;;;; Guile interpreter you want to test. Edit `test-suite/paths.scm'
;;;; so that datadir points to the parent directory of the `tests' tree.
+;;;; You can also set the environment var `TEST_SUITE_DIR' to set datadir.
;;;;
;;;; Shortcomings:
;;;;
@@ -59,6 +61,12 @@
;;;; change which Guile interpreter you're testing, you need to edit
;;;; the #! line at the top of this file, which is stupid.
+(and (getenv "DEBUG")
+ (begin
+ (write-line %load-path)
+ (set! %load-verbosely #t)
+ (debug-enable 'backtrace 'debug)))
+
(use-modules (test-suite lib)
(test-suite paths)
(ice-9 getopt-long)
@@ -136,10 +144,14 @@
(let ((log-port (open-output-file log-file)))
;; Register some reporters.
- (let ((counter (make-count-reporter)))
+ (let ((global-pass #t)
+ (counter (make-count-reporter)))
(register-reporter (car counter))
(register-reporter (make-log-reporter log-port))
(register-reporter user-reporter)
+ (register-reporter (lambda results
+ (case (car results)
+ ((fail xpass) (set! global-pass #f)))))
;; Run the tests.
(for-each (lambda (test)
@@ -153,7 +165,8 @@
(print-counts counts)
(print-counts counts log-port))
- (close-port log-port))))))
+ (close-port log-port)
+ (quit global-pass))))))
;;; Local Variables:
Index: test-suite/paths.scm
===================================================================
RCS file: /cvs/guile/guile-core/test-suite/paths.scm,v
retrieving revision 1.4
diff -u -p -w -r1.4 paths.scm
--- test-suite/paths.scm 2000/01/16 22:03:41 1.4
+++ test-suite/paths.scm 2001/01/10 11:44:34
@@ -1,2 +1,4 @@
(define-module (test-suite paths))
-(define-public datadir (string-append (getenv "HOME")
"/guile-core/test-suite"))
+(define-public datadir
+ (or (getenv "TEST_SUITE_DIR")
+ (string-append (getenv "HOME") "/guile-core/test-suite")))
cvs server: Diffing test-suite/tests
cvs server: Diffing test-suite/tests/asmobs
cvs server: Diffing test-suite/tests/c-api
Wed Jan 10 11:44:14 UTC 2001
Compilation finished at Wed Jan 10 03:44:14