Megatest

Diff
Login

Differences From Artifact [b3465b94fa]:

To Artifact [548de05864]:


93
94
95
96
97
98
99

















100

101
102
103

104
105
106
107
108
109
110
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116

117
118
119

120
121
122
123
124
125
126
127







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


-
+







;;     (client:launch))

;; ease debugging by loading ~/.dashboardrc
(let ((debugcontrolf (conc (get-environment-variable "HOME") "/.dashboardrc")))
  (if (file-exists? debugcontrolf)
      (load debugcontrolf)))

(define *runremote* #f)
(define *data* (make-vector 25 #f))

(dboard:data-set-run-keys! *data* (make-hash-table))

;; List of test ids being viewed in various panels
(dboard:data-set-curr-test-ids! *data* (make-hash-table))

;; Look up test-ids by (key1 key2 ... testname [itempath])
(dboard:data-set-path-test-ids! *data* (make-hash-table))

;; Look up run-ids by ??
(dboard:data-set-path-run-ids! *data* (make-hash-table))

(dboard:data-set-updaters! *data* (make-hash-table))

(define *other* (make-hash-table))
(define *dbdir* (db:dbfile-path #f))
(define *dbdir* (db:dbfile-path #f *area-dat*))
(define *dbstruct-local*  (make-dbr:dbstruct path:  *dbdir*
					     local: #t))
(define *db-file-path* (db:dbfile-path 0))
(define *db-file-path* (db:dbfile-path 0 *area-dat*))

;; HACK ALERT: this is a hack, please fix.
(define *read-only* (not (file-read-access? *db-file-path*)))

(debug:setup)

(define *tim* (iup:timer))
593
594
595
596
597
598
599
600

601
602
603
604
605
606
607





608
609
610
611
612
613
614
615
616
617
618
619

620
621
622
623
624
625
626
610
611
612
613
614
615
616

617
618
619





620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635

636
637
638
639
640
641
642
643







-
+


-
-
-
-
-
+
+
+
+
+











-
+







;; D A S H B O A R D
;;======================================================================

;; Main Panel
(define (main-panel window-id)
  (iup:dialog
   #:title "Megatest Control Panel"
   #:menu (dcommon:main-menu)
   #:menu (dcommon:main-menu *other*)
   #:shrink "YES"
   (let ((tabtop (iup:tabs 
		  (runs window-id)
		  (tests window-id)
		  (runcontrol window-id)
		  (mtest window-id) 
		  (rconfig window-id)
		  (runs       window-id )
		  (tests      window-id )
		  (runcontrol window-id )
		  (mtest      window-id *area-dat*) 
		  (rconfig    window-id )
		  )))
     (iup:attribute-set! tabtop "TABTITLE0" "Runs")
     (iup:attribute-set! tabtop "TABTITLE1" "Tests")
     (iup:attribute-set! tabtop "TABTITLE2" "Run Control")
     (iup:attribute-set! tabtop "TABTITLE3" "megatest.config") 
     (iup:attribute-set! tabtop "TABTITLE4" "runconfigs.config")
     tabtop)))

(define *current-window-id* 0)

(define (newdashboard data)
  (let* ((keys     (db:get-keys dbstruct))
  (let* ((keys     (db:get-keys *dbstruct-local* *area-dat*))
	 (runname  "%")
	 (testpatt "%")
	 (keypatts (map (lambda (k)(list k "%")) keys))
	 (states   '())
	 (statuses '())
	 (nextmintime (current-milliseconds))
	 (my-window-id *current-window-id*))