Changeset 15096 in project


Ignore:
Timestamp:
06/29/09 07:09:35 (11 years ago)
Author:
Ivan Raikov
Message:

initial attempt at porting salmonella to chicken 4

Location:
release/4/salmonella
Files:
4 deleted
3 edited
1 copied

Legend:

Unmodified
Added
Removed
  • release/4/salmonella/trunk/salmonella

    r9880 r15096  
    44|#
    55
    6 (use http-client utils posix (srfi 1 13))
    7 
    8 (define chicken-setup (make-parameter "chicken-setup"))
    9 (define lib-dir (make-pathname '("lib" "chicken") "3"))
     6(use setup-download utils posix (srfi 1 13))
     7
     8(define chicken-install (make-parameter "chicken-install"))
     9(define lib-dir (make-pathname '("lib" "chicken") "4"))
    1010(define repo-test-dir (make-parameter (make-pathname (current-directory) "salmonella-repo")))
    1111(define repo-test-lib-dir (make-parameter (make-pathname (repo-test-dir) lib-dir)))
    12 (define chicken-setup-args (make-parameter
    13                             (lambda ()
    14                               (string-append " -d "
    15                                              (cond ((string> (under-test-chicken-version) "3.0.0")
    16                                                     (string-append " -R " (repo-test-lib-dir) " "))
    17                                                    ((string> (under-test-chicken-version) "2.5")
    18                                                     (string-append " -destdir " (repo-test-dir) " "))
    19                                                    (else ""))))))
    20 (define env-vars (make-parameter (string-append "CHICKEN_REPOSITORY=" (repo-test-lib-dir) " "
    21                                                 "CHICKEN_INCLUDE_PATH=" (repo-test-lib-dir))))
    22 (define skip-eggs (make-parameter '()))
    23 (define verbose (make-parameter #f))
    24 (define logfile (make-parameter "salmonella.log"))
    25 (define system-deps (make-parameter #f))
    26 (define pkg-manager (make-parameter #f))
    27 (define resume (make-parameter #f))
    28 (define dont-ask (make-parameter #f))
     12(define chicken-install-args (make-parameter (lambda () (string-append " -prefix " (repo-test-dir)))))
     13
     14(define env-vars      (make-parameter (string-append
     15                                       "CHICKEN_INSTALL_PREFIX=" (repo-test-dir)
     16                                       " "
     17                                       "CHICKEN_INCLUDE_PATH=" (repo-test-lib-dir))))
     18(define skip-eggs     (make-parameter '()))
     19(define verbose       (make-parameter #f))
     20(define logfile       (make-parameter "salmonella.log"))
     21(define system-deps   (make-parameter #f))
     22(define pkg-manager   (make-parameter #f))
     23(define resume        (make-parameter #f))
     24(define dont-ask      (make-parameter #f))
    2925(define progress-file (make-parameter "salmonella.progress"))
    30 (define html-output (make-parameter "salmonella-report"))
    31 (define css-file (make-parameter #f))
    32 (define ->html (make-parameter #f))
     26(define html-output   (make-parameter "salmonella-report"))
     27(define css-file      (make-parameter #f))
     28(define ->html        (make-parameter #f))
    3329
    3430(define (show . msg)
     
    3632    (print "  " (string-concatenate (map ->string msg)))))
    3733
    38 (define repository-data (make-parameter (lambda () #f)))
     34(define egg-information (make-parameter (lambda () #f)))
    3935
    4036(define eggs (make-parameter (lambda () #f)))
    41 
    42 (define (under-test-chicken-version)
    43   (system:output (string-append (chicken-setup) " -e '(display (chicken-version))'")))
    4437
    4538(define (system:system . command)
     
    6760
    6861             == Expression ==                   == Default ==
    69  (chicken-setup \"<path to chicken-setup>\")    chicken-setup
    70  (chicken-setup-args \"<args>\"                 a procedure which returns \"-d -destdir (repo-test-dir)\" if chicken
    71                                               version is greater than 2.5 or \"-d\" otherwise.
    72  (env-vars \"<environment variables settings>\" CHICKEN_REPOSITORY=(repo-test-dir) CHICKEN_INCLUDE_PATH=(repo-test-dir)
     62 (chicken-install \"<path to chicken-install>\")    chicken-install
     63 (chicken-install-args \"<args>\"                 a procedure which returns chicken-install options
     64 (env-vars \"<environment variables settings>\" CHICKEN_INCLUDE_PATH=(repo-test-lib-dir)
     65                                                CHICKEN_INSTALL_PREFIX=(repo-test-dir)
    7366 (repo-test-dir \"<path to repo-test-dir>\")    `pwd`/salmonella-repo
    7467 (skip-eggs (list \"egg1\" \"egg2\" ...))         '()
    7568 (verbose <bool>)                             #f
    7669 (logfile \"filename\")                         salmonella.log
    77  (eggs (lambda () ...))                       a procedure which fetches eggs list from call/cc.org
    78  (repository-data (lambda () ...))            a procedure which returns data from the call/cc.org eggs repository
     70 (egg-information (lambda () ...))              a procedure which returns egg information for all eggs found in ./chicken-eggs
     71 (eggs (lambda () ...))                         a procedure which returns the names of all eggs found in ./chicken-eggs
    7972 (system-deps \"filename\")                     #f
    8073 (pkg-manager \"system pkg manager & args\")    #f
     
    8982Example:
    9083
    91  salmonella '(chicken-setup \"/usr/local/chicken/bin/chicken-setup\") (verbose #t)'
     84 salmonella '(chicken-install \"/usr/local/chicken/bin/chicken-install\") (verbose #t)'
    9285")
    9386
     
    117110
    118111(define (install-egg egg)
    119   (system:system (sprintf"~a ~a ~a ~a" (env-vars) (chicken-setup) ((chicken-setup-args)) egg)))
     112  (system:system (sprintf"~a ~a ~a ~a" (env-vars) (chicken-install) ((chicken-install-args)) egg)))
    120113
    121114(define (report egg status msg #!key (action 'egg-install))
     
    135128salmonella -- a tool for testing Chicken eggs (http://chicken.wiki.br/salmonella)
    136129#(string-trim-both (current-time))
    137 #(system:output (chicken-setup) " -version")
     130#(system:output (chicken-install) " -version")
    138131Options:
    139   chicken-setup: #(chicken-setup)
     132  chicken-install: #(chicken-install)
    140133  repo-test-dir: #(repo-test-dir)
    141   chicken-setup-args: #((chicken-setup-args))
     134  chicken-install-args: #((chicken-install-args))
    142135  env-vars: #(env-vars)
    143136  skip-eggs:  #(skip-eggs)
     
    214207    (unless ((eggs))
    215208      (eggs (lambda ()
    216               (show "Downloading eggs list...")
     209              (show "Fetching eggs list...")
    217210              (map (compose ->string car) ((repository-data))))))
    218211
    219     (unless ((repository-data))
    220       (repository-data
    221        (let ((data '()))
    222          (lambda ()
    223            (let ((repo "http://www.call-with-current-continuation.org/eggs/3/repository"))
    224              (when (null? data)
    225                (set! data (with-input-from-string
    226                               (http:GET repo)
    227                             read)))
    228              data)))))
     212    (unless ((repository-data))
     213      (repository-data
     214       (let ((egg-data #f))
     215         (lambda () (if (not egg-data)
     216                        (set! egg-data (gather-egg-information "chicken-eggs"))
     217                        egg-data)))))
    229218   
    230219    (when (->html)
  • release/4/salmonella/trunk/salmonella.meta

    r12441 r15096  
     1;;;; -*- Hen -*-
     2
    13((synopsis "A tool for testing eggs")
    24 (author "Mario Domenech Goulart")
     
    57 (doc-from-wiki)
    68 (egg "salmonella.egg")
    7  (needs files http)
    89 (files "salmonella"
    910        "salmonella.setup"))
  • release/4/salmonella/trunk/salmonella.setup

    r7880 r15096  
     1;;;; -*- Hen -*-
     2
    13(install-script
    24 'salmonella
    35 "salmonella"
    4  '((version 1.4)
     6 '((version 1.0)
    57   (documentation "salmonella.html")))
Note: See TracChangeset for help on using the changeset viewer.