Index: launch.scm ================================================================== --- launch.scm +++ launch.scm @@ -93,11 +93,12 @@ ;; - could be ssh to host from hosts table (update regularly with load) ;; - could be netbatch ;; (launch-test db (cadr status) test-conf)) (define (launch-test db run-id test-conf keyvallst test-name test-path itemdat) (change-directory *toppath*) - (let ((launcher (config-lookup *configdat* "jobtools" "launcher")) + (let ((useshell (config-lookup *configdat* "jobtools" "useshell")) + (launcher (config-lookup *configdat* "jobtools" "launcher")) (runscript (config-lookup test-conf "setup" "runscript")) (diskspace (config-lookup test-conf "requirements" "diskspace")) (memory (config-lookup test-conf "requirements" "memory")) (hosts (config-lookup *configdat* "jobtools" "workhosts")) (remote-megatest (config-lookup *configdat* "setup" "executable")) @@ -157,24 +158,29 @@ (append (list (list "MT_TEST_NAME" test-name) (list "MT_ITEM_INFO" (conc itemdat)) (list "MT_RUNNAME" (args:get-arg ":runname"))) itemdat))) (launch-results (apply cmd-run-proc-each-line - (car fullcmd) + (if useshell + (string-intersperse fullcmd " ") + (car fullcmd)) print - (cdr fullcmd)))) ;; launcher fullcmd)));; (apply cmd-run-proc-each-line launcher print fullcmd))) ;; (cmd-run->list fullcmd)) + (if useshell + '() + (cdr fullcmd))))) ;; launcher fullcmd)));; (apply cmd-run-proc-each-line launcher print fullcmd))) ;; (cmd-run->list fullcmd)) (debug:print 2 "Launching completed, updating db") (debug:print 4 "Launch results: " launch-results) (if (not launch-results) (begin (print "ERROR: Failed to run " (string-intersperse fullcmd " ") ", exiting now") (sqlite3:finalize! db) ;; good ole "exit" seems not to work ;; (_exit 9) ;; but this hack will work! Thanks go to Alan Post of the Chicken email list + ;; NB// Is this still needed? Should be safe to go back to "exit" now? (process-signal (current-process-id) signal/kill) )) (alist->env-vars miscprevvals) (alist->env-vars testprevvals) (alist->env-vars commonprevvals) launch-results))) Index: process.scm ================================================================== --- process.scm +++ process.scm @@ -12,16 +12,19 @@ ;;====================================================================== ;; Process convience utils ;;====================================================================== (define (cmd-run-proc-each-line cmd proc . params) + ;; (print "Called with cmd=" cmd ", proc=" proc ", params=" params) (handle-exceptions exn (begin (print "ERROR: Failed to run command: " cmd " " (string-intersperse params " ")) #f) - (let-values (((fh fho pid) (process cmd params))) + (let-values (((fh fho pid) (if (null? params) + (process cmd) + (process cmd params)))) (let loop ((curr (read-line fh)) (result '())) (if (not (eof-object? curr)) (loop (read-line fh) (append result (list (proc curr))))