302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
|
(define *didsomething* #t)
(exit 1)))))
(define (main)
;; remove when configf fully modularized
(read-config-set! configf:read-file)
(define *usage-log-file* #f) ;; put path to file for logging usage in this var in the ~/.megatestrc file
(define *usage-use-seconds* #t) ;; for Epoc seconds in usage logging change this to #t in ~/.megatestrc file
;; set some parameters here - these need to be put in something that can be loaded from other
;; executables such as dashboard and mtutil
;;
(include "transport-mode.scm")
(dbfile:db-init-proc db:initialize-main-db)
|
|
|
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
|
(define *didsomething* #t)
(exit 1)))))
(define (main)
;; remove when configf fully modularized
(read-config-set! configf:read-file)
(define *usage-log-file* "") ;; put path to file for logging usage in this var in the ~/.megatestrc file
(define *usage-use-seconds* #t) ;; for Epoc seconds in usage logging change this to #t in ~/.megatestrc file
;; set some parameters here - these need to be put in something that can be loaded from other
;; executables such as dashboard and mtutil
;;
(include "transport-mode.scm")
(dbfile:db-init-proc db:initialize-main-db)
|
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
|
;;
(let ((debugcontrolf (conc (get-environment-variable "HOME") "/.megatestrc")))
(if (common:file-exists? debugcontrolf)
(load debugcontrolf)))
;; usage logging, careful with this, it is not designed to deal with all real world challenges!
;;
(if (and (string? *usage-log-file*)
(file-write-access? *usage-log-file*))
(with-output-to-file
*usage-log-file*
(lambda ()
(print (if *usage-use-seconds*
(current-seconds)
(time->string
(seconds->local-time (current-seconds))
"%Yww%V.%w %H:%M:%S"))
" "
(current-user-name) " "
(current-directory) " "
"\"" (string-intersperse (argv) " ") "\""))
#:append))
;; Disabled help items
;; -rollup : (currently disabled) fill run (set by :runname) with latest test(s)
;; from prior runs with same keys
;; -daemonize : fork into background and disconnect from stdin/out
(define help (conc "
|
|
|
|
|
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
|
;;
(let ((debugcontrolf (conc (get-environment-variable "HOME") "/.megatestrc")))
(if (common:file-exists? debugcontrolf)
(load debugcontrolf)))
;; usage logging, careful with this, it is not designed to deal with all real world challenges!
;;
(if (not (string=? *usage-log-file* ""))
(if (file-write-access? *usage-log-file*)
(with-output-to-file
*usage-log-file*
(lambda ()
(print (if *usage-use-seconds*
(current-seconds)
(time->string
(seconds->local-time (current-seconds))
"%Yww%V.%w %H:%M:%S"))
" "
(current-user-name) " "
(current-directory) " "
"\"" (string-intersperse (argv) " ") "\""))
#:append)))
;; Disabled help items
;; -rollup : (currently disabled) fill run (set by :runname) with latest test(s)
;; from prior runs with same keys
;; -daemonize : fork into background and disconnect from stdin/out
(define help (conc "
|