Megatest

Diff
Login

Differences From Artifact [33833baced]:

To Artifact [92b16ace59]:


93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109









110
111
112
113
114
115
116
93
94
95
96
97
98
99










100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115







-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+







;; usage logging, careful with this, it is not designed to deal with all real world challenges!
;;
(if (and *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) " ") "\""))
        (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

715
716
717
718
719
720
721
722
723
724
725
726
727
728
729







730
731
732
733
734
735
736
714
715
716
717
718
719
720








721
722
723
724
725
726
727
728
729
730
731
732
733
734







-
-
-
-
-
-
-
-
+
+
+
+
+
+
+







(if (args:get-arg "-env2file")
    (begin
      (save-environment-as-files (args:get-arg "-env2file"))
      (set! *didsomething* #t)))

(if (args:get-arg "-list-disks")
    (let ((toppath (launch:setup)))
      (print 
       (string-intersperse 
	(map (lambda (x)
	       (string-intersperse 
		x
		" => "))
	     (common:get-disks *configdat*))
	"\n"))
      (print (string-intersperse 
	      (map (lambda (x)
		     (string-intersperse 
		      x
		      " => "))
		   (common:get-disks *configdat*))
	      "\n"))
      (set! *didsomething* #t)))

;; csv processing record
(define (make-refdb:csv)
  (vector 
   (make-sparse-array)
   (make-hash-table)
2496
2497
2498
2499
2500
2501
2502
2503
2504


2505
2506
2507
2508
2509
2510
2511
2494
2495
2496
2497
2498
2499
2500


2501
2502
2503
2504
2505
2506
2507
2508
2509







-
-
+
+







			 (db:multi-db-sync 
			  dbstruct
			  'new2old)
			 #f)))
      (if res
	  (begin
	    (common:simple-file-release-lock lockfile)
	    (print "Synced " res " records to megatest.db"))
	  (print "Skipping sync, there is a sync in progress."))
	    (debug:print 0 *default-log-port* "Synced " res " records to megatest.db"))
	  (debug:print 0 *default-log-port* "Skipping sync, there is a sync in progress."))
      (set! *didsomething* #t)))

(if (args:get-arg "-sync-to")
    (let ((toppath (launch:setup)))
      (tasks:sync-to-postgres *configdat* (args:get-arg "-sync-to"))
      (set! *didsomething* #t)))