unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: ludovic.courtes@laas.fr (Ludovic Courtès)
Cc: guile-devel@gnu.org
Subject: [PATCH] Test-suite update
Date: Thu, 22 Sep 2005 15:57:05 +0200	[thread overview]
Message-ID: <8764stp5n2.fsf_-_@laas.fr> (raw)
In-Reply-To: <87psr22c2p.fsf@zip.com.au> (Kevin Ryde's message of "Thu, 22 Sep 2005 10:14:22 +1000")

[Switched to `guile-devel'.]

Kevin Ryde <user42@zip.com.au> writes:

> You'll need to make something for
> test-suite/tests/socket.test exercising each case, eventually.

It turns out that I had never looked at the test-suite, mostly because
it isn't run at `make check' time.  Additionally, the `guile-test'
script was largely outdated.

The patch below fixes these two things.  It also comments out the
`elisp' test which results in a stack overflow here.  My understanding
is that the Elisp work is almost only due to Neil has never been widely
used, so hopefully it won't hurt too much until a better solution is
found.

All the other tests pass on my PPC GNU/Linux box, some of them are
unresolved though.

Thanks,
Ludovic.


2005-09-22  Ludovic Courtès  <ludovic.courtes@laas.fr>

	* Makefile.am (check-local):  New target.
    
	* guile-test:  Made executable as a stand-alone script.
	(main):  Fixed to use the latest `getopt-long';  use `option-ref'.
    
	* tests/elisp.test:  Momentarily ignored.

\f
--- orig/test-suite/Makefile.am
+++ mod/test-suite/Makefile.am
@@ -101,3 +101,6 @@
 	  cp -pR $(srcdir)/$$d $(distdir)/$$d; \
           rm -rf $(distdir)/$$d/CVS; \
         done
+
+check-local:
+	./guile-test --test-suite tests/


--- orig/test-suite/guile-test
+++ mod/test-suite/guile-test
@@ -1,5 +1,12 @@
-#!../libguile/guile \
--e main -s
+#!/bin/sh
+# This is in fact -*- Scheme -*- code.
+
+# We need to make sure that we load the right `ice-9' modules so `-L' is not
+# enough since it gets parsed too late.
+GUILE_LOAD_PATH=".."
+export GUILE_LOAD_PATH
+
+exec ../libguile/guile -L .. -l $0 -e main -- "$@"
 !#
 
 ;;;; guile-test --- run the Guile test suite
@@ -166,7 +173,7 @@
     (sort tests string<?)))
 
 (define (main args)
-  (let ((options (getopt-long args
+  (let ((options (getopt-long (cons "progname" args)
 			      `((test-suite
 				 (single-char #\t)
 				 (value #t))
@@ -177,15 +184,12 @@
 				 (value #t))
 				(debug
 				 (single-char #\d))))))
-    (define (opt tag default)
-      (let ((pair (assq tag options)))
-	(if pair (cdr pair) default)))
 
-    (if (opt 'debug #f)
+    (if (option-ref options 'debug #f)
 	(enable-debug-mode))
 
     (set! test-suite
-	  (or (opt 'test-suite #f)
+	  (or (option-ref options 'test-suite #f)
 	      (getenv "TEST_SUITE_DIR")
 	      default-test-suite))
 
@@ -194,13 +198,8 @@
     ;; not the src-dir.
     (set! tmp-dir (getcwd))
 
-    (let* ((tests
-	    (let ((foo (opt '() '())))
-	      (if (null? foo)
-		  (enumerate-tests test-suite)
-		  foo)))
-	   (log-file
-	    (opt 'log-file "guile.log")))
+    (let* ((tests (enumerate-tests test-suite))
+	   (log-file (option-ref options 'log-file "guile.log")))
 
       ;; Open the log file.
       (let ((log-port (open-output-file log-file)))
@@ -214,7 +213,8 @@
 	  (register-reporter (lambda results
 			       (case (car results)
                                  ((unresolved)
-                                  (and (opt 'flag-unresolved #f)
+                                  (and (option-ref options
+						   'flag-unresolved #f)
                                        (set! global-pass #f)))
 				 ((fail upass error)
 				  (set! global-pass #f)))))


--- orig/test-suite/tests/elisp.test
+++ mod/test-suite/tests/elisp.test
@@ -19,6 +19,9 @@
   :use-module (test-suite lib)
   :use-module (ice-9 weak-vector))
 
+(if #t #t   ;; FIXME:  Ignore this test for now
+  (begin
+
 ;;;
 ;;; elisp
 ;;;
@@ -331,4 +334,6 @@
 
       ))
 
+))
+
 ;;; elisp.test ends here





_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


       reply	other threads:[~2005-09-22 13:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87oecutxox.fsf@laas.fr>
     [not found] ` <87vf58cxxq.fsf@zagadka.de>
     [not found]   ` <87k6kwopv5.fsf@laas.fr>
     [not found]     ` <87fysk7ady.fsf@zagadka.de>
     [not found]       ` <87mzmpmcm2.fsf@laas.fr>
     [not found]         ` <87aci6u6f4.fsf@laas.fr>
     [not found]           ` <87psr22c2p.fsf@zip.com.au>
2005-09-22 13:57             ` Ludovic Courtès [this message]
2005-09-22 19:25               ` [PATCH] Test-suite update Neil Jerram
2005-09-22 19:41                 ` Neil Jerram
2005-09-23  9:54                   ` Ludovic Courtès
2005-09-23 18:57                     ` Neil Jerram
2005-09-26  8:49                       ` Ludovic Courtès
2005-09-26 23:15                         ` Kevin Ryde
2005-09-22 21:15               ` Kevin Ryde
2005-09-22 22:06                 ` Kevin Ryde
2005-09-23  7:43                 ` Ludovic Courtès
2005-09-23 23:54                   ` Kevin Ryde
2005-09-26  8:35                     ` Ludovic Courtès
2005-09-26 23:18                       ` Kevin Ryde
     [not found]             ` <87irwtqkop.fsf@laas.fr>
     [not found]               ` <87slvog9sd.fsf@zip.com.au>
     [not found]                 ` <87wtkt9xyq.fsf_-_@laas.fr>
     [not found]                   ` <87hdbg4dl7.fsf@laas.fr>
     [not found]                     ` <87br1nakge.fsf@zip.com.au>
     [not found]                       ` <87hdbfnu9n.fsf@laas.fr>
     [not found]                         ` <87d5m2twaf.fsf@uni-dortmund.de>
     [not found]                           ` <878xwjb123.fsf@laas.fr>
     [not found]                             ` <874q76h9rh.fsf@zip.com.au>
     [not found]                               ` <87hdb5qogp.fsf@zagadka.de>
     [not found]                                 ` <87zmovn4y5.fsf@zip.com.au>
     [not found]                                   ` <87fyqn1gzy.fsf@laas.fr>
     [not found]                                     ` <87br196yd8.fsf@zip.com.au>
2005-11-02 10:50                                       ` Socket API improvement, patch #6 Ludovic Courtès
2005-11-02 20:07                                         ` Kevin Ryde
2005-11-03  9:00                                           ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8764stp5n2.fsf_-_@laas.fr \
    --to=ludovic.courtes@laas.fr \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).