Megatest

Diff
Login

Differences From Artifact [48cd715560]:

To Artifact [1a07bf0839]:


692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
;;         ((and (list? *verbosity*)     ;; list   list
;;      	 (list? n))
;;          (not (null? (lset-intersection! eq? *verbosity* n))))
;;         ((and (number? *verbosity*)
;;      	 (list? n))
;;          (member *verbosity* n))))

;; TODO: for multiple areas, we will have multiple watchdogs; and multiple threads to manage
(define *watchdog* (make-thread
		    (lambda ()
		      (handle-exceptions
			  exn
			  (begin
			    (print-call-chain)
			    (print " message: " ((condition-property-accessor 'exn 'message) exn) ", exn=" exn))
			(common:watchdog)))
		    "Watchdog thread"))

     ;;(if (not (args:get-arg "-server"))
     ;;    (thread-start! *watchdog*)) ;; if starting a server; wait till we get to running state before kicking off watchdog
     (let* ((no-watchdog-args
            '("-list-runs"
              "-testdata-csv"
              "-list-servers"
              "-server"
     	 "-adjutant"
              "-list-disks"
              "-list-targets"
              "-show-runconfig"
              ;;"-list-db-targets"
              "-show-runconfig"
              "-show-config"
              "-show-cmdinfo"
     	 "-cleanup-db"
                 ))
            (no-watchdog-argvals (list '("-archive" . "replicate-db")))
            (start-watchdog-specail-arg-val (let loop ((hed  (car no-watchdog-argvals))
                                                       (tail (cdr   no-watchdog-argvals)))
                                                  ;; (print "hed" hed " arg " (args:get-arg (car hed)) " val:" (cdr hed)  " eql" (equal? (args:get-arg (car hed)) (cdr hed)))  
                                                  (if (equal? (args:get-arg (car hed)) (cdr hed))
                                                    #f
                                                    (if (null? tail)
                                                      #t
                                                      (loop (car tail) (cdr tail))))))      
            (no-watchdog-args-vals (filter (lambda (x) x)
                                           (map args:get-arg no-watchdog-args)))
            (start-watchdog (and (null? no-watchdog-args-vals) start-watchdog-specail-arg-val)))
            ;(print  "no-watchdog-args="no-watchdog-args "no-watchdog-args-vals="no-watchdog-args-vals " start-watchdog-specail-arg-val:" start-watchdog-specail-arg-val " start-watchdog:" start-watchdog) 
       (if start-watchdog
           (thread-start! *watchdog*)))
     
     
     ;; bracket open-output-file with code to make leading directory if it does not exist and handle exceptions
     (define (open-logfile logpath-in)
       (condition-case
        (let* ((log-dir (or (pathname-directory logpath-in) "."))
     	  (fname   (pathname-strip-directory logpath-in))
     	  (logpath (if (> (string-length fname) 250)







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







692
693
694
695
696
697
698












































699
700
701
702
703
704
705
;;         ((and (list? *verbosity*)     ;; list   list
;;      	 (list? n))
;;          (not (null? (lset-intersection! eq? *verbosity* n))))
;;         ((and (number? *verbosity*)
;;      	 (list? n))
;;          (member *verbosity* n))))













































     
     ;; bracket open-output-file with code to make leading directory if it does not exist and handle exceptions
     (define (open-logfile logpath-in)
       (condition-case
        (let* ((log-dir (or (pathname-directory logpath-in) "."))
     	  (fname   (pathname-strip-directory logpath-in))
     	  (logpath (if (> (string-length fname) 250)