Changeset 26023 in project


Ignore:
Timestamp:
03/01/12 20:19:25 (9 years ago)
Author:
sjamaan
Message:

estraier-client: Use system* so we signal an error as early as possible. Also, catch it and re-raise a more helpful error message. The shell will (should) already print *its* useful error message to stderr.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/estraier-client/trunk/tests/run.scm

    r26022 r26023  
    1414
    1515;; This will start the server, we hope
    16 (system "rm -rf masterdir")              ; Just in case
    17 (system "estmaster init masterdir")
     16(handle-exceptions exn
     17  (error (conc "Couldn't start or initialize estmaster. "
     18               "You probably don't have hyper-estraier installed. "
     19               "If you do, check $ESTRAIER_CLIENT_TEST_PORT (default 8080)"))
     20 (system* "rm -rf masterdir")          ; Just in case
     21 (system* "estmaster init masterdir")
    1822;; Try and replace the portnumber with another value.  Ugly, I know
    19 (let* ((contents (with-input-from-file "masterdir/_conf" read-lines))
    20        (changed-contents (map (lambda (l)
    21                                 (if (string-prefix? "portnum:" l)
    22                                     (conc "portnum: " server-port) l))
    23                               contents)))
    24   (with-output-to-file "masterdir/_conf"
    25     (lambda () (for-each print changed-contents))))
    26 (printf "Waiting for estmaster to startup...")
    27 (system "estmaster start -bg masterdir > /dev/null 2>&1")
     23 (let* ((contents (with-input-from-file "masterdir/_conf" read-lines))
     24        (changed-contents (map (lambda (l)
     25                                 (if (string-prefix? "portnum:" l)
     26                                     (conc "portnum: " server-port) l))
     27                               contents)))
     28   (with-output-to-file "masterdir/_conf"
     29     (lambda () (for-each print changed-contents))))
     30 (printf "Waiting for estmaster to startup...")
     31 (system* "estmaster start -bg masterdir > /dev/null 2>&1"))
    2832(sleep 2)
    2933
Note: See TracChangeset for help on using the changeset viewer.