Changeset 35226 in project


Ignore:
Timestamp:
03/01/18 01:30:55 (4 months ago)
Author:
kon
Message:

use csi+csc test runner

Location:
release/4/macosx/trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • release/4/macosx/trunk/macosx.meta

    r28418 r35226  
    1414 (test-depends test)
    1515 (platform macosx)
    16  (files "macosx.setup" "macosx-errors.scm" "macosx-env.scm" "macosx.meta" "tests/run.scm" "macosx-url.scm") )
     16 (files
     17  "macosx.setup" "macosx.meta"
     18  "macosx-errors.scm" "macosx-env.scm" "macosx-url.scm"
     19  "tests/run.scm" "tests/macosx-test.scm" ) )
  • release/4/macosx/trunk/macosx.setup

    r28418 r35226  
    55(verify-extension-name "macosx")
    66
    7 (setup-shared-extension-module 'macosx-errors (extension-version "2.1.4")
     7(setup-shared-extension-module 'macosx-errors (extension-version "2.2.0")
    88  #:types? #t
    99  #:inline #t
     
    1111    -fixnum-arithmetic -optimize-level 3 -no-procedure-checks -no-bound-checks))
    1212
    13 (setup-shared-extension-module 'macosx-url (extension-version "2.1.4")
     13(setup-shared-extension-module 'macosx-url (extension-version "2.2.0")
    1414  #:types? #t
    1515  #:inline #t
     
    1919    -framework CoreFoundation -framework ApplicationServices))
    2020
    21 (setup-shared-extension-module 'macosx-env (extension-version "2.1.4")
     21(setup-shared-extension-module 'macosx-env (extension-version "2.2.0")
    2222  #:types? #t
    2323  #:inline #t
     
    3030    -framework ApplicationServices))
    3131
    32 (install-extension 'macosx '() `((version ,(extension-version "2.1.4"))))
     32(install-extension 'macosx '() `((version ,(extension-version "2.2.0"))))
  • release/4/macosx/trunk/tests/run.scm

    r28418 r35226  
    1 ;;;; macosx-test
    21
    3 (require-extension test)
    4 (require-extension macosx-env)
    5 (require-extension macosx-url)
     2(define EGG-NAME "macosx")
    63
    7 (define (print-info)
    8   (print "     session-info:  " (session-info))
    9   (print "     machine-name:  " (machine-name))
    10   (print "  short-user-name:  " (short-user-name))
    11   (print "   long-user-name:  " (long-user-name))
    12   (print " machine-location:  " (machine-location))
    13   (print "          metric?:  " (metric?))
    14   (print "    computer-name:  " (computer-name))
    15   (print "     console-user:  " (console-user))
    16   (print "  local-host-name:  " (local-host-name))
    17   (print "    location-name:  " (location-name))
    18   (print " main-bundle-path:  " (main-bundle-path))
    19   (print "       tick-count:  " (tick-count))
    20   ;FIXME what selectors are viable?
    21   #;(print "    gestalt 'addr:  " (gestalt 'addr)) )
     4;chicken-install invokes as "<csi> -s run.scm <eggnam> <eggdir>"
    225
    23 (define (delay-test ticks)
    24   (print* "* Delaying for " ticks " ticks ...")
    25   (delay-for-ticks ticks)
    26   (print " Done *")
    27   (newline) )
     6(use files)
    287
    29 (test-group "macosx-env"
    30   (test-assert (session-info))
    31   (test-assert (machine-name))
    32   (test-assert (short-user-name))
    33   (test-assert (long-user-name))
    34   (test-assert (machine-location))
    35   (test-assert (boolean? (metric?)))
    36   (test-assert (computer-name))
    37   (test-assert (console-user))
    38   (test-assert (local-host-name))
    39   (test-assert (location-name))
    40   (test-assert (main-bundle-path))
    41   (test-assert (tick-count))
    42   ;FIXME what selectors are viable?
    43   #;(test-assert (gestalt 'addr))
    44 )
     8;no -disable-interrupts
     9(define *csc-options* "-inline-global -scrutinize -optimize-leaf-routines -local -inline -specialize -unsafe -no-trace -no-lambda-info -clustering -lfa2")
    4510
    46 (delay-test 50)
     11(define *args* (argv))
    4712
    48 (print-info)
     13(define (test-name #!optional (eggnam EGG-NAME))
     14  (string-append eggnam "-test") )
    4915
    50 (test-group "macosx-url - should launch default browser with \"http://www.apple.com/\""
    51   (open-url "http://www.apple.com/")
    52 )
     16(define (egg-name #!optional (def EGG-NAME))
     17  (cond
     18    ((<= 4 (length *args*))
     19      (cadddr *args*) )
     20    (def
     21      def )
     22    (else
     23      (error 'test "cannot determine egg-name") ) ) )
    5324
    54 (test-exit)
     25;;;
     26
     27(set! EGG-NAME (egg-name))
     28
     29(define (run-test #!optional (eggnam EGG-NAME) (cscopts *csc-options*))
     30  (let ((tstnam (test-name eggnam)))
     31    (print "*** csi ***")
     32    (system (string-append "csi -s " (make-pathname #f tstnam "scm")))
     33    (newline)
     34    (print "*** csc (" cscopts ") ***")
     35    (system (string-append "csc" " " cscopts " " (make-pathname #f tstnam "scm")))
     36    (system (make-pathname (cond-expand (unix "./") (else #f)) tstnam)) ) )
     37
     38(define (run-tests eggnams #!optional (cscopts *csc-options*))
     39  (for-each (cut run-test <> cscopts) eggnams) )
     40
     41;;;
     42
     43(run-test)
Note: See TracChangeset for help on using the changeset viewer.