Line | |
---|
1 | |
---|
2 | (define EGG-NAME "apropos") |
---|
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 | -no-trace -no-lambda-info \ |
---|
19 | -unsafe") |
---|
20 | |
---|
21 | (define (test-name #!optional (eggnam EGG-NAME)) |
---|
22 | (string-append eggnam "-test") ) |
---|
23 | |
---|
24 | (define (egg-name #!optional (def EGG-NAME)) |
---|
25 | (cond |
---|
26 | ((<= 4 (length *args*)) |
---|
27 | (cadddr *args*) ) |
---|
28 | (def |
---|
29 | def ) |
---|
30 | (else |
---|
31 | (error 'test "cannot determine egg-name") ) ) ) |
---|
32 | |
---|
33 | ;;; |
---|
34 | |
---|
35 | (set! EGG-NAME (egg-name)) |
---|
36 | |
---|
37 | (define (run-test #!optional (eggnam EGG-NAME) (cscopts *csc-options*)) |
---|
38 | (let ((tstnam (test-name eggnam))) |
---|
39 | (format #t "*** csi ***~%") |
---|
40 | (system (string-append "csi -s " (make-pathname #f tstnam "scm"))) |
---|
41 | (newline) |
---|
42 | (format #t "*** csc ~s ***~%" cscopts) |
---|
43 | (system (string-append "csc" " " cscopts " " (make-pathname #f tstnam "scm"))) |
---|
44 | (system (make-pathname (cond-expand (unix "./") (else #f)) tstnam)) ) ) |
---|
45 | |
---|
46 | (define (run-tests eggnams #!optional (cscopts *csc-options*)) |
---|
47 | (for-each (cut run-test <> cscopts) eggnams) ) |
---|
48 | |
---|
49 | ;;; |
---|
50 | |
---|
51 | (run-test) |
---|
Note: See
TracBrowser
for help on using the repository browser.