Megatest

Check-in [85c2621ab5]
Login
Overview
Comment:Moved quit button to lower left
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 85c2621ab5dfc1d0487f5bbd36b4bfa9180ca498
User & Date: mrwellan on 2011-10-10 15:40:28
Other Links: manifest | tags
Context
2011-10-11
21:24
Fixed install of nbfake to work right check-in: fe03d0b115 user: mrwellan tags: trunk
2011-10-10
15:40
Moved quit button to lower left check-in: 85c2621ab5 user: mrwellan tags: trunk
11:00
Couple tweaks to toggles for hiding based on state and status; added more states/statuses check-in: 92f8a89d60 user: mrwellan tags: trunk
Changes

Modified dashboard.scm from [fe2312dc60] to [0ed20ba503].

187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
	 (header      (db:get-header allruns))
	 (runs        (db:get-rows   allruns))
	 (result      '())
	 (maxtests    0)
	 (states      (hash-table-keys *state-ignore-hash*))
	 (statuses    (hash-table-keys *status-ignore-hash*)))
    ;; Instead of this mechanism lets try setting number of runs based on "result" below
    ;; (if (> (+ *last-update* 300) (current-seconds)) ;; every five minutes
    ;;     (begin
    ;;       (set! *last-update* (current-seconds))
    ;;       (set! *tot-run-count* (db:get-num-runs *db* runnamepatt))))
    (for-each (lambda (run)
		(let* ((run-id   (db:get-value-by-header run header "id"))
		       (tests    (db-get-tests-for-run *db* run-id testnamepatt itemnamepatt states statuses))
		       (key-vals (get-key-vals *db* run-id)))
		  (if (> (length tests) maxtests)
		      (set! maxtests (length tests)))
		  (if (not (null? tests))
		      (set! result (cons (vector run tests key-vals) result)))))
	      runs)
    (set! *header*  header)
    (set! *allruns* result)
    (set! *tot-run-count* (+ 1 (length *allruns*)))
    maxtests))

(define *collapsed* (make-hash-table))
; (define *row-lookup* (make-hash-table)) ;; testname => (rownum lableobj)

(define (toggle-hide lnum) ; fulltestname)
  (let* ((btn (vector-ref (vector-ref uidat 0) lnum))







|
|
|
|











|







187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
	 (header      (db:get-header allruns))
	 (runs        (db:get-rows   allruns))
	 (result      '())
	 (maxtests    0)
	 (states      (hash-table-keys *state-ignore-hash*))
	 (statuses    (hash-table-keys *status-ignore-hash*)))
    ;; Instead of this mechanism lets try setting number of runs based on "result" below
    (if (> (+ *last-update* 300) (current-seconds)) ;; every five minutes
        (begin
          (set! *last-update* (current-seconds))
          (set! *tot-run-count* (db:get-num-runs *db* runnamepatt))))
    (for-each (lambda (run)
		(let* ((run-id   (db:get-value-by-header run header "id"))
		       (tests    (db-get-tests-for-run *db* run-id testnamepatt itemnamepatt states statuses))
		       (key-vals (get-key-vals *db* run-id)))
		  (if (> (length tests) maxtests)
		      (set! maxtests (length tests)))
		  (if (not (null? tests))
		      (set! result (cons (vector run tests key-vals) result)))))
	      runs)
    (set! *header*  header)
    (set! *allruns* result)
    ;; (set! *tot-run-count* (+ 1 (length *allruns*)))
    maxtests))

(define *collapsed* (make-hash-table))
; (define *row-lookup* (make-hash-table)) ;; testname => (rownum lableobj)

(define (toggle-hide lnum) ; fulltestname)
  (let* ((btn (vector-ref (vector-ref uidat 0) lnum))
429
430
431
432
433
434
435

436
437
438
439
440
441
442
443
444

445

446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465




466
467
468
469
470
471
472
473
	 (hdrlst  '())
	 (bdylst  '())
	 (result  '())
	 (i       0))
    ;; controls (along bottom)
    (set! controls
	  (iup:hbox

	   (iup:frame 
	    #:title "filter test and items"
	    (iup:hbox
	     (iup:textbox #:size "60x15" #:fontsize "10" #:value "%"
			  #:action (lambda (obj unk val)
				     (update-search "test-name" val)))
	     (iup:textbox #:size "60x15" #:fontsize "10" #:value "%"
			  #:action (lambda (obj unk val)
				     (update-search "item-name" val)))))

	   (iup:button "Quit" #:action (lambda (obj)(sqlite3:finalize! *db*)(exit)))

	   ;; (iup:button "<-  Left" #:action (lambda (obj)(set! *start-run-offset*  (+ *start-run-offset* 1))))
	   ;; (iup:button "Up     ^" #:action (lambda (obj)(set! *start-test-offset* (if (> *start-test-offset* 0)(- *start-test-offset* 1) 0))))
	   ;; (iup:button "Down   v" #:action (lambda (obj)(set! *start-test-offset* (if (>= *start-test-offset* (length *alltestnamelst*))(length *alltestnamelst*)(+ *start-test-offset* 1)))))
	   ;; (iup:button "Right ->" #:action (lambda (obj)(set! *start-run-offset*  (if (> *start-run-offset* 0)(- *start-run-offset* 1) 0))))
	   (iup:frame 
	    #:title "hide"
	    (iup:vbox
	     (iup:hbox
	      (iup:toggle "PASS"  #:action   (lambda (obj val)
					       (if (eq? val 1)
						   (hash-table-set! *status-ignore-hash* "PASS" #t)
						   (hash-table-delete! *status-ignore-hash* "PASS"))))
	      (iup:toggle "FAIL"   #:action   (lambda (obj val)
						(if (eq? val 1)
						    (hash-table-set! *status-ignore-hash* "FAIL" #t)
						    (hash-table-delete! *status-ignore-hash* "FAIL"))))
	      (iup:toggle "WARN"   #:action   (lambda (obj val)
						(if (eq? val 1)
						    (hash-table-set! *status-ignore-hash* "WARN" #t)
						    (hash-table-delete! *status-ignore-hash* "WARN"))))




	      (iup:toggle "WAIVED"   #:action   (lambda (obj val)
						  (if (eq? val 1)
						      (hash-table-set! *status-ignore-hash* "WAIVED" #t)
						      (hash-table-delete! *status-ignore-hash* "WAIVED"))))
	      (iup:toggle "STUCK/DEAD"   #:action   (lambda (obj val)
						  (if (eq? val 1)
						      (hash-table-set! *status-ignore-hash* "STUCK/DEAD" #t)
						      (hash-table-delete! *status-ignore-hash* "STUCK/DEAD"))))







>
|
|
|
|
|
|
|
|
|
>
|
>




















>
>
>
>
|







429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
	 (hdrlst  '())
	 (bdylst  '())
	 (result  '())
	 (i       0))
    ;; controls (along bottom)
    (set! controls
	  (iup:hbox
	   (iup:vbox
	    (iup:frame 
	     #:title "filter test and items"
	     (iup:hbox
	      (iup:textbox #:size "60x15" #:fontsize "10" #:value "%"
			   #:action (lambda (obj unk val)
				      (update-search "test-name" val)))
	      (iup:textbox #:size "60x15" #:fontsize "10" #:value "%"
			   #:action (lambda (obj unk val)
				      (update-search "item-name" val)))))
	    (iup:hbox
	     (iup:button "Quit" #:action (lambda (obj)(sqlite3:finalize! *db*)(exit)))
	     ))
	   ;; (iup:button "<-  Left" #:action (lambda (obj)(set! *start-run-offset*  (+ *start-run-offset* 1))))
	   ;; (iup:button "Up     ^" #:action (lambda (obj)(set! *start-test-offset* (if (> *start-test-offset* 0)(- *start-test-offset* 1) 0))))
	   ;; (iup:button "Down   v" #:action (lambda (obj)(set! *start-test-offset* (if (>= *start-test-offset* (length *alltestnamelst*))(length *alltestnamelst*)(+ *start-test-offset* 1)))))
	   ;; (iup:button "Right ->" #:action (lambda (obj)(set! *start-run-offset*  (if (> *start-run-offset* 0)(- *start-run-offset* 1) 0))))
	   (iup:frame 
	    #:title "hide"
	    (iup:vbox
	     (iup:hbox
	      (iup:toggle "PASS"  #:action   (lambda (obj val)
					       (if (eq? val 1)
						   (hash-table-set! *status-ignore-hash* "PASS" #t)
						   (hash-table-delete! *status-ignore-hash* "PASS"))))
	      (iup:toggle "FAIL"   #:action   (lambda (obj val)
						(if (eq? val 1)
						    (hash-table-set! *status-ignore-hash* "FAIL" #t)
						    (hash-table-delete! *status-ignore-hash* "FAIL"))))
	      (iup:toggle "WARN"   #:action   (lambda (obj val)
						(if (eq? val 1)
						    (hash-table-set! *status-ignore-hash* "WARN" #t)
						    (hash-table-delete! *status-ignore-hash* "WARN"))))
	      (iup:toggle "CHECK"   #:action   (lambda (obj val)
                                                  (if (eq? val 1)
                                                      (hash-table-set! *status-ignore-hash* "CHECK" #t)
                                                      (hash-table-delete! *status-ignore-hash* "CHECK"))))
              (iup:toggle "WAIVED"   #:action   (lambda (obj val)
						  (if (eq? val 1)
						      (hash-table-set! *status-ignore-hash* "WAIVED" #t)
						      (hash-table-delete! *status-ignore-hash* "WAIVED"))))
	      (iup:toggle "STUCK/DEAD"   #:action   (lambda (obj val)
						  (if (eq? val 1)
						      (hash-table-set! *status-ignore-hash* "STUCK/DEAD" #t)
						      (hash-table-delete! *status-ignore-hash* "STUCK/DEAD"))))

Modified db.scm from [bb72d6bc7f] to [931afe1758].

15
16
17
18
19
20
21

22
23
24
25
26
27
28

(use sqlite3 srfi-1 posix regex regex-case srfi-69 csv-xml)
(import (prefix sqlite3 sqlite3:))

(declare (unit db))
(declare (uses common))
(declare (uses keys))


(include "common_records.scm")
(include "db_records.scm")
(include "key_records.scm")

(define (open-db) ;;  (conc *toppath* "/megatest.db") (car *configinfo*)))
  (let* ((dbpath    (conc *toppath* "/megatest.db")) ;; fname)







>







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

(use sqlite3 srfi-1 posix regex regex-case srfi-69 csv-xml)
(import (prefix sqlite3 sqlite3:))

(declare (unit db))
(declare (uses common))
(declare (uses keys))
(declare (uses ods))

(include "common_records.scm")
(include "db_records.scm")
(include "key_records.scm")

(define (open-db) ;;  (conc *toppath* "/megatest.db") (car *configinfo*)))
  (let* ((dbpath    (conc *toppath* "/megatest.db")) ;; fname)

Modified ods.scm from [0b786a4409] to [9b470d03a5].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
;; Copyright 2011, Matthew Welland.
;; 
;;  This program is made available under the GNU GPL version 2.0 or
;;  greater. See the accompanying file COPYING for details.
;; 
;;  This program is distributed WITHOUT ANY WARRANTY; without even the
;;  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
;;  PURPOSE

(use csv-xml)
(declare (unit ods))
(declare (uses common))

(define ods:dirs
  '("Configurations2"
    "Configurations2/toolpanel"
    "Configurations2/menubar"









|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
;; Copyright 2011, Matthew Welland.
;; 
;;  This program is made available under the GNU GPL version 2.0 or
;;  greater. See the accompanying file COPYING for details.
;; 
;;  This program is distributed WITHOUT ANY WARRANTY; without even the
;;  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
;;  PURPOSE

(use csv-xml regex)
(declare (unit ods))
(declare (uses common))

(define ods:dirs
  '("Configurations2"
    "Configurations2/toolpanel"
    "Configurations2/menubar"