Megatest

Diff
Login

Differences From Artifact [5dcffd3a63]:

To Artifact [475c9731aa]:


257
258
259
260
261
262
263







264
265
266
267
268
269
270


271
272
273
274
275
276
277
278
279
280
281










282
283
284
285
286
287
288
289
290
291
292
293

294
295
296
297
298
299
300
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276

277
278
279
280
281
282
283






284
285
286
287
288
289
290
291
292
293



294
295
296
297
298
299
300
301

302
303
304
305
306
307
308
309







+
+
+
+
+
+
+






-
+
+





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








-
+







			  'testname
			  'itempath)))
    ;; 
    ;; trim runs to only those that are changing often here
    ;; 
    (for-each (lambda (run)
		(let* ((run-id      (db:get-value-by-header run header "id"))
		       (key-vals    (if *useserver* 
					(rmt:get-key-vals run-id)
					(db:get-key-vals *dbstruct-local* run-id)))
		       (prev-dat    (let ((rec (hash-table-ref/default *allruns-by-id* run-id -1)))
				      (if rec rec (vector run '() key-vals (- (current-seconds) 10)))))
		       (prev-tests  (vector-ref prev-dat 1))
		       (last-update (vector-ref prev-dat 3))
		       (tmptests    (if *useserver*
					(rmt:get-tests-for-run run-id testnamepatt states statuses
							       #f #f
							       *hide-not-hide*
							       sort-by
							       sort-order
							       'shortlist)
							       'shortlist
							       last-update)
					(db:get-tests-for-run *dbstruct-local* run-id testnamepatt states statuses
							      #f #f
							      *hide-not-hide*
							      sort-by
							      sort-order
							      'shortlist)))
		       (tests       (if (eq? *tests-sort-reverse* 3) ;; +event_time
					(sort tmptests compare-tests)
					tmptests))
		       ;; NOTE: bubble-up also sets the global *all-item-test-names*
		       ;; (tests       (bubble-up tmptests priority: bubble-type))
							      'shortlist
							      last-update)))
		       (tests       (let ((newdat (delete-duplicates (append tmptests prev-tests)
								     (lambda (a b)
								       (eq? (db:test-get-id a)(db:test-get-id b))))))
				      (if (eq? *tests-sort-reverse* 3) ;; +event_time
					(sort newdat compare-tests)
					newdat))))
		  ;; NOTE: bubble-up also sets the global *all-item-test-names*
		  ;; (tests       (bubble-up tmptests priority: bubble-type))
		       (key-vals    (if *useserver* 
					(rmt:get-key-vals run-id)
					(db:get-key-vals *dbstruct-local* run-id))))
		  ;; NOTE: 11/01/2013 This routine is *NOT* getting called excessively.
		  ;; (debug:print 0 "Getting data for run " run-id " with key-vals=" key-vals)
		  ;; Not sure this is needed?
		  (set! referenced-run-ids (cons run-id referenced-run-ids))
		  (if (> (length tests) maxtests)
		      (set! maxtests (length tests)))
		  (if (or (not *hide-empty-runs*) ;; this reduces the data burden when set
			  (not (null? tests)))
		      (let ((dstruct (vector run tests key-vals)))
		      (let ((dstruct (vector run tests key-vals last-update)))
			;;
			;; compare the tests with the tests in *allruns-by-id* same run-id 
			;; if different then increment value in *runchangerate*
			;;
			(hash-table-set! *allruns-by-id* run-id dstruct)
			(set! result (cons dstruct result))))))
	      runs)