Changeset 38493 in project for release/5


Ignore:
Timestamp:
04/01/20 05:33:56 (16 months ago)
Author:
Kon Lovett
Message:

update runner

Location:
release/5/message-digest-utils/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • release/5/message-digest-utils/trunk/message-digest-utils.egg

    r37743 r38493  
    1818 (components
    1919  (extension message-digest-chunk
    20     #;(inline-file)
    2120    (types-file)
    2221    (csc-options "-O3" "-d1" "-local" "-no-procedure-checks-for-toplevel-bindings") )
    2322  (extension message-digest-support
    24     #;(inline-file)
    2523    (types-file)
    2624    (csc-options "-O3" "-d1" "-local" "-no-procedure-checks-for-toplevel-bindings") )
    2725  (extension message-digest-byte-vector
    28     #;(inline-file)
    2926    (types-file)
    3027    (component-dependencies message-digest-support)
    3128    (csc-options "-O3" "-d1" "-local" "-no-procedure-checks-for-toplevel-bindings") )
    3229  (extension message-digest-int
    33     #;(inline-file)
    3430    (types-file)
    3531    (component-dependencies message-digest-support)
    3632    (csc-options "-O3" "-d1" "-local" "-no-procedure-checks-for-toplevel-bindings") )
    3733  (extension message-digest-srfi-4
    38     #;(inline-file)
    3934    (types-file)
    4035    (component-dependencies message-digest-byte-vector message-digest-support)
    4136    (csc-options "-O3" "-d1" "-local" "-no-procedure-checks-for-toplevel-bindings") )
    4237  (extension message-digest-update-item
    43     #;(inline-file)
    4438    (types-file)
    4539    (component-dependencies message-digest-chunk message-digest-support)
    4640    (csc-options "-O3" "-d1" "-local" "-no-procedure-checks-for-toplevel-bindings") )
    4741  (extension message-digest-item
    48     #;(inline-file)
    4942    (types-file)
    5043    (component-dependencies message-digest-update-item)
    5144    (csc-options "-O3" "-d1" "-local" "-no-procedure-checks-for-toplevel-bindings") )
    5245  (extension message-digest-port
    53     #;(inline-file)
    5446    (types-file)
    5547    (component-dependencies message-digest-byte-vector)
  • release/5/message-digest-utils/trunk/tests/message-digest-utils-test.scm

    r35921 r38493  
    1212;;;
    1313
    14 (import
    15   (chicken base)
    16   ;(chicken format)
    17   (chicken fixnum)
    18   (chicken blob)
    19   (chicken memory)
    20   (srfi 4)
    21   message-digest-primitive
    22   message-digest-type
    23   message-digest-chunk
    24   message-digest-port
    25   message-digest-srfi-4
    26   message-digest-int
    27   message-digest-update-item
    28   message-digest-item)
     14(import scheme)
     15(import (chicken base))
     16;(import (chicken format))
     17(import (chicken fixnum))
     18(import (chicken blob))
     19(import (chicken memory))
     20(import (srfi 4))
     21(import message-digest-primitive)
     22(import message-digest-type)
     23(import message-digest-chunk)
     24(import message-digest-port)
     25(import message-digest-srfi-4)
     26(import message-digest-int)
     27(import message-digest-update-item)
     28(import message-digest-item)
    2929
    3030;;
  • release/5/message-digest-utils/trunk/tests/run.scm

    r35914 r38493  
     1;;;; run.scm -*- Scheme -*-
     2
     3(import scheme)
     4
     5;;; Create Egg Const
    16
    27(define EGG-NAME "message-digest-utils")
     
    49;chicken-install invokes as "<csi> -s run.scm <eggnam> <eggdir>"
    510
    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(import (only (chicken pathname) make-pathname))
     12(import (only (chicken process) system))
     13(import (only (chicken process-context) argv))
     14(import (only (chicken format) format))
    1115
    12 (define *args* (argv))
     16(define (test-filename test-name)
     17  (string-append test-name "-test") )
    1318
    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))
     19(define (egg-name args #!optional (def EGG-NAME))
    2520  (cond
    2621    ((<= 4 (length *args*))
     
    3126      (error 'test "cannot determine egg-name") ) ) )
    3227
    33 ;;;
     28;;
    3429
    35 (set! EGG-NAME (egg-name))
     30(define *args* (argv))
     31(define *egg* (egg-name *args*))
     32(define *tests* `(,*egg*))
    3633
    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)) ) )
     34(define *current-directory* (cond-expand (unix "./") (else #f)))
    4535
    46 (define (run-tests eggnams #!optional (cscopts *csc-options*))
    47   (for-each (cut run-test <> cscopts) eggnams) )
     36;no -disable-interrupts or -no-lambda-info
     37(define *csc-options* "-inline-global -local -inline \
     38  -specialize -optimize-leaf-routines -clustering -lfa2 \
     39  -no-trace -unsafe")
     40
     41(define (run-test-evaluated test-name test-source)
     42  (format #t "*** ~A - csi ***~%" test-name)
     43  (system (string-append "csi -s " test-source)) )
     44
     45(define (run-test-compiled test-name test-source csc-options)
     46  (format #t "*** ~A - csc ~A ***~%" test-name csc-options)
     47  ;csc output is in current directory
     48  (system (string-append "csc" " " csc-options " " test-source))
     49  (system (make-pathname *current-directory* (test-filename test-name))) )
    4850
    4951;;;
    5052
    51 (run-test)
     53(define (run-test #!optional (test-name *egg*) (csc-options *csc-options*))
     54  (let ((test-source (make-pathname #f (test-filename test-name) "scm")))
     55    (run-test-evaluated test-name test-source)
     56    (newline)
     57    (run-test-compiled test-name test-source csc-options) ) )
     58
     59(define (run-tests #!optional (test-names *tests*) (csc-options *csc-options*))
     60  (for-each (cut run-test <> csc-options) test-names) )
     61
     62;;; Do Test
     63
     64(set! *tests* (append *tests* "levenshtein-byte"))
     65
     66(run-tests)
Note: See TracChangeset for help on using the changeset viewer.