source: project/release/5/sha1/trunk/tests/run.scm @ 37641

Last change on this file since 37641 was 37641, checked in by Kon Lovett, 5 months ago

update len is not size_t but uint32, test not unsafe

File size: 1.3 KB
Line 
1
2(define EGG-NAME "sha1")
3
4;chicken-install invokes as "<csi> -s run.scm <eggnam> <eggdir>"
5
6(import
7  (only (chicken pathname) make-pathname)
8  (only (chicken process) system)
9  (only (chicken process-context) argv)
10  (only (chicken format) format))
11
12(define *args* (argv))
13
14;no -disable-interrupts
15(define *csc-options* "-inline-global \
16  -specialize -optimize-leaf-routines -clustering -lfa2 \
17  -local -inline")
18
19(define (test-name #!optional (eggnam EGG-NAME))
20  (string-append eggnam "-test") )
21
22(define (egg-name #!optional (def EGG-NAME))
23  (cond
24    ((<= 4 (length *args*))
25      (cadddr *args*) )
26    (def
27      def )
28    (else
29      (error 'test "cannot determine egg-name") ) ) )
30
31;;;
32
33(set! EGG-NAME (egg-name))
34
35(define (run-test #!optional (eggnam EGG-NAME) (cscopts *csc-options*))
36  (let ((tstnam (test-name eggnam)))
37    (format #t "*** csi ***~%")
38    (system (string-append "csi -s " (make-pathname #f tstnam "scm")))
39    (newline)
40    (format #t "*** csc ~s ***~%" cscopts)
41    (system (string-append "csc" " " cscopts " " (make-pathname #f tstnam "scm")))
42    (system (make-pathname (cond-expand (unix "./") (else #f)) tstnam)) ) )
43
44(define (run-tests eggnams #!optional (cscopts *csc-options*))
45  (for-each (cut run-test <> cscopts) eggnams) )
46
47;;;
48
49(run-test)
Note: See TracBrowser for help on using the repository browser.