Megatest

Check-in [a0f86ec564]
Login
Overview
Comment:Fixed missing param in call to db:get-tests-for-run
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.61
Files: files | file ages | folders
SHA1: a0f86ec5642cae2fd72a10e89fc300262cac5c66
User & Date: mrwellan on 2016-07-07 14:10:36
Other Links: branch diff | manifest | tags
Context
2016-07-07
17:45
Fixed wrong params to get-tests-for-run (regression) check-in: d17a82cfd4 user: mrwellan tags: v1.61
14:10
Fixed missing param in call to db:get-tests-for-run check-in: a0f86ec564 user: mrwellan tags: v1.61
11:14
Merged dashboard refactor back into v1.61 (actually did it this time) check-in: 56322320c5 user: mrwellan tags: v1.61
Changes

Modified dashboard.scm from [92d982c9d9] to [7490e24250].

393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409










410
411
412
413
414
415
416
393
394
395
396
397
398
399










400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416







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







	 (bubble-type (if (member sort-order '(testname))
			  'testname
			  'itempath))
	 (prev-dat    (let ((rec (hash-table-ref/default (dboard:tabdat-allruns-by-id tabdat) run-id #f)))
			(if rec rec (vector run '() key-vals -100)))) ;; -100 is before time began
	 (prev-tests  (vector-ref prev-dat 1))
	 (last-update (vector-ref prev-dat 3))
	 (tmptests    (rmt:get-tests-for-run run-id testnamepatt states statuses
						 #f #f
						 (dboard:tabdat-hide-not-hide tabdat)
						 sort-by
						 sort-order
						 'shortlist
						 (if (dboard:tabdat-filters-changed tabdat)
						     0
						     last-update)
						 *dashboard-mode*)) ;; use dashboard mode
	 (tmptests    (rmt:get-tests-for-run run-id testnamepatt states statuses  ;; run-id testpatt states statuses
					     #f #f                                ;; offset limit 
					     (dboard:tabdat-hide-not-hide tabdat) ;; no-in
					     sort-by                              ;; sort-by
					     sort-order                           ;; sort-order
					     'shortlist                           ;; qrytype
					     (if (dboard:tabdat-filters-changed tabdat) 
						 0
						 last-update) ;; last-update
					     *dashboard-mode*)) ;; use dashboard mode
	 (tests       (let ((newdat (filter
				     (lambda (x)
				       (not (equal? (db:test-get-state x) "DELETED"))) ;; remove deleted tests but do it after merging
				     (delete-duplicates (if (dboard:tabdat-filters-changed tabdat)
							    tmptests
							    (append tmptests prev-tests))
							(lambda (a b)
1083
1084
1085
1086
1087
1088
1089
1090

1091
1092
1093
1094
1095




1096
1097
1098
1099
1100
1101
1102
1083
1084
1085
1086
1087
1088
1089

1090
1091




1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102







-
+

-
-
-
-
+
+
+
+








(define dashboard:update-run-summary-tab #f)
(define dashboard:update-new-view-tab #f)

(define (dboard:get-tests-dat tabdat run-id last-update)
  (let ((tdat (if run-id (rmt:get-tests-for-run run-id 
					     (hash-table-ref/default (dboard:tabdat-searchpatts tabdat) "test-name" "%/%")
					     (hash-table-keys (dboard:tabdat-state-ignore-hash tabdat)) ;; '()
					     (hash-table-keys (dboard:tabdat-state-ignore-hash tabdat))  ;; '()
					     (hash-table-keys (dboard:tabdat-status-ignore-hash tabdat)) ;; '()
					     #f #f
					     (dboard:tabdat-hide-not-hide tabdat)
					     #f #f
					     "id,testname,item_path,state,status"
					     #f #f                                                       ;; offset limit
					     (dboard:tabdat-hide-not-hide tabdat)                        ;; not-in
					     #f #f                                                       ;; sort-by sort-order
					     "id,testname,item_path,state,status"                        ;; qryval
					     (if (dboard:tabdat-filters-changed tabdat)
						 0
						 last-update)
					     *dashboard-mode*)
		  '()))) ;; get 'em all
    (debug:print 0 *default-log-port* "dboard:get-tests-dat: got " (length tdat) " test records for run " run-id)
    (sort tdat (lambda (a b)

Modified db.scm from [e7431a19fd] to [9f0dd86e3d].

2300
2301
2302
2303
2304
2305
2306
2307

2308
2309
2310
2311
2312
2313
2314
2300
2301
2302
2303
2304
2305
2306

2307
2308
2309
2310
2311
2312
2313
2314







-
+







		   test-id)))
    res))

;; get a useful subset of the tests data (used in dashboard
;; use db:mintest-get-{id ,run_id,testname ...}
;;
(define (db:get-tests-for-run-mindata dbstruct run-id testpatt states statuses not-in)
  (db:get-tests-for-run dbstruct run-id testpatt states statuses #f #f not-in #f #f "id,run_id,testname,state,status,event_time,item_path" #f))
  (db:get-tests-for-run dbstruct run-id testpatt states statuses #f #f not-in #f #f "id,run_id,testname,state,status,event_time,item_path" 0 #f))

;; do not use.
;;
(define (db:get-tests-for-runs dbstruct run-ids testpatt states statuses #!key (not-in #f)(qryvals #f))
  ;; (db:delay-if-busy)
  (let ((res '()))
    (for-each 

Modified rmt.scm from [b21fc584be] to [0c1d01abd4].

620
621
622
623
624
625
626
627



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

627
628
629
630
631
632
633
634
635
636







-
+
+
+







	(let ((prev-run-ids (rmt:get-prev-run-ids run-id)))
	  ;; for each run starting with the most recent look to see if there is a matching test
	  ;; if found then return that matching test record
	  (debug:print 4 *default-log-port* "selstr: " selstr ", qrystr: " qrystr ", keyvals: " keyvals ", previous run ids found: " prev-run-ids)
	  (if (null? prev-run-ids) #f
	      (let loop ((hed (car prev-run-ids))
			 (tal (cdr prev-run-ids)))
		(let ((results (rmt:get-tests-for-run hed (conc test-name "/" item-path) '() '() #f #f #f #f #f #f #f 'normal)))
		(let ((results (rmt:get-tests-for-run hed (conc test-name "/" item-path) '() '() ;; run-id testpatt states statuses
						      #f #f #f #f         ;; offset limit not-in hide/not-hide
						      #f #f #f #f 'normal))) ;; sort-by sort-order qryvals last-update mode
		  (debug:print 4 *default-log-port* "Got tests for run-id " run-id ", test-name " test-name ", item-path " item-path ": " results)
		  (if (and (null? results)
			   (not (null? tal)))
		      (loop (car tal)(cdr tal))
		      (if (null? results) #f
			  (car results))))))))))

Modified runs.scm from [700013b501] to [b6e930b10f].

930
931
932
933
934
935
936
937
938
939



940
941
942
943
944
945
946
930
931
932
933
934
935
936



937
938
939
940
941
942
943
944
945
946







-
-
-
+
+
+







  (let ((curr-sec (current-seconds)))
    (if (> (- curr-sec (runs:gendat-inc-results-last-update *runs:general-data*)) 5) ;; at least five seconds since last update
	(let* ((run-dat  (or (runs:gendat-run-info *runs:general-data*)(rmt:get-run-info run-id)))
	       (runname  (or (runs:gendat-runname *runs:general-data*)
			     (db:get-value-by-header (db:get-rows run-dat)
						     (db:get-header run-dat) "runname")))
	       (target   (or (runs:gendat-target *runs:general-data*)(rmt:get-target run-id)))
	       (testsdat (rmt:get-tests-for-run run-id "%" '() '()
						#f #f
						#f ;; hide/not-hide
	       (testsdat (rmt:get-tests-for-run run-id "%" '() '() ;; run-id testpatt states statuses
						#f #f ;; offset limit
						#f ;; not-in
						#f ;; sort-by
						#f ;; sort-order
						#f ;; get full data (not 'shortlist)
						(runs:gendat-inc-results-last-update *runs:general-data*) ;; last update time
						'dashboard)))
	  (if (not (runs:gendat-run-info *runs:general-data*))
	      (runs:gendat-run-info-set! *runs:general-data* run-dat))