Megatest

Diff
Login

Differences From Artifact [fc69924fac]:

To Artifact [f4f45839ad]:


461
462
463
464
465
466
467

468
469
470
471
472
473
474
475









476
477
478
479
480
481
482
461
462
463
464
465
466
467
468








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







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







    (print "prev-tests: " (length prev-tests) " tests: " (length tests))
    tests))

;; tmptests   - new tests data
;; prev-tests - old tests data
;;
(define (dashboard:merge-changed-tests tests tmptests use-new prev-tests) 
  (let ((start-time (current-seconds))
  (let ((newdat (filter
		 (lambda (x)
		   (not (equal? (db:test-get-state x) "DELETED"))) ;; remove deleted tests but do it after merging
		 (delete-duplicates (if use-new ;; (dboard:tabdat-filters-changed tabdat)
					tmptests
					(append tmptests prev-tests))
				    (lambda (a b)
				      (eq? (db:test-get-id a)(db:test-get-id b)))))))
	(newdat     (filter
		     (lambda (x)
		       (not (equal? (db:test-get-state x) "DELETED"))) ;; remove deleted tests but do it after merging
		     (delete-duplicates (if use-new ;; (dboard:tabdat-filters-changed tabdat)
					    tmptests
					    (append tmptests prev-tests))
					(lambda (a b)
					  (eq? (db:test-get-id a)(db:test-get-id b)))))))
    (print "Time took: " (- (current-seconds) start-time))
    (if (eq? *tests-sort-reverse* 3) ;; +event_time
	(sort newdat dboard:compare-tests)
	newdat)))

;; this calls dboard:get-tests-for-run-duplicate for each run
;;
;; create a virtual table of all the tests