Megatest

Check-in [d25299ae49]
Login
Overview
Comment:Cleaned up the left labels, got some semblence of sorting to work
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | guitweaks
Files: files | file ages | folders
SHA1: d25299ae49e23227786295a6a802d78f5c36f5bc
User & Date: mrwellan on 2011-10-26 10:59:21
Other Links: branch diff | manifest | tags
Context
2011-10-26
13:42
Added back the hiding of empty runs Closed-Leaf check-in: 9baa06c1ce user: mrwellan tags: guitweaks
10:59
Cleaned up the left labels, got some semblence of sorting to work check-in: d25299ae49 user: mrwellan tags: guitweaks
10:46
Cleaned up the left labels check-in: a0696770b5 user: mrwellan tags: guitweaks
Changes

Modified dashboard.scm from [f8acda7522] to [bc8cfd9064].

213
214
215
216
217
218
219
220


221
222
223
224
225
226
227
228

229
230
231
232
233
234
235
213
214
215
216
217
218
219

220
221
222
223
224
225
226
227
228

229
230
231
232
233
234
235
236







-
+
+







-
+







	    (debug:print 6 "update-rundat, got " (length runs) " runs")
	    (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))
			       (tests    (let ((tsts (db-get-tests-for-run *db* run-id testnamepatt itemnamepatt states statuses)))
					   (if *tests-sort-reverse* (reverse tsts) tsts)))
			       (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* (if *tests-sort-reverse* (reverse result) result))
	    (set! *allruns* result)
	    (debug:print 6 "*allruns* has " (length *allruns*) " runs")
	    ;; (set! *tot-run-count* (+ 1 (length *allruns*)))
	    maxtests))
	*num-tests*))) ;; FIXME, naughty coding eh?

(define *collapsed* (make-hash-table))
; (define *row-lookup* (make-hash-table)) ;; testname => (rownum lableobj)
469
470
471
472
473
474
475
476
477




478
479
480
481
482
483
484
470
471
472
473
474
475
476


477
478
479
480
481
482
483
484
485
486
487







-
-
+
+
+
+







				      (update-search "test-name" val)))
	      (iup:textbox #:size "60x15" #:fontsize "10" #:value "%"
			   #:action (lambda (obj unk val)
				      (set! *last-db-update-time* 0)
				      (update-search "item-name" val)))))
	    (iup:vbox
	     (iup:hbox
	      (iup:button "Sort" #:acton (lambda (obj)
					   (set! *tests-sort-order* (not *tests-sort-order*)))))
	      (iup:button "Sort" #:action (lambda (obj)
					    (set! *tests-sort-reverse* (not *tests-sort-reverse*))
					    (iup:attribute-set! obj "TITLE" (if *tests-sort-reverse* "+Sort" "-Sort"))
					    (set! *last-db-update-time* 0))))
	     (iup:hbox
	      (iup:button "Quit" #:action (lambda (obj)(sqlite3:finalize! *db*)(exit)))
	      (iup:button "Monitor" #:action (lambda (obj)(system (conc (car (argv))" -guimonitor &")))))
	     ))
	   ;; (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)))))

Modified db.scm from [094ef6cc82] to [75dcd1c1c3].

366
367
368
369
370
371
372
373



374
375
376
377
378
379
380
366
367
368
369
370
371
372

373
374
375
376
377
378
379
380
381
382







-
+
+
+







    (sqlite3:for-each-row 
     (lambda (id run-id testname state status event-time host cpuload diskfree uname rundir item-path run-duration final-logf comment)
       (set! res (cons (vector id run-id testname state status event-time host cpuload diskfree uname rundir item-path run-duration final-logf comment) res)))
     db 
     (conc "SELECT id,run_id,testname,state,status,event_time,host,cpuload,diskfree,uname,rundir,item_path,run_duration,final_logf,comment "
	   " FROM tests WHERE run_id=? AND testname like ? AND item_path LIKE ? " 
	   " AND NOT (state in " states-str " AND status IN " statuses-str ") "
	   " ORDER BY id DESC;")
	   ;; " ORDER BY id DESC;"
	   " ORDER BY event_time ASC;" ;; POTENTIAL ISSUE! CHECK ME! Does anyting depend on this being sorted by id?
	   )
     run-id
     (if testpatt testpatt "%")
     (if itempatt itempatt "%"))
    res))

;; this one is a bit broken BUG FIXME
(define (db:delete-test-step-records db run-id test-name itemdat)