Megatest

Diff
Login

Differences From Artifact [0006139009]:

To Artifact [627ca6b765]:


1898
1899
1900
1901
1902
1903
1904











1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916




1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
                        ;;                                             userdata: (conc "run-id: " run-id))))
                        (hash-table-set! (dboard:tabdat-path-run-ids tabdat) run-path run-id)
                        ;; (set! colnum (+ colnum 1))
                        ))))
	      run-ids)))

(define (dashboard:tests-ht->tests-dat tests-ht)











  (reverse
   (sort
    (hash-table-values tests-ht)
    (lambda (a b) 
      (let ((a-test-name  (db:test-get-testname a))
            (a-item-path  (db:test-get-item-path a))
            (b-test-name  (db:test-get-testname b))
            (b-item-path  (db:test-get-item-path b))
            (a-event-time (db:test-get-event_time a))
            (b-event-time (db:test-get-event_time b)))
        (if (not (equal? a-test-name b-test-name))
            (> a-event-time b-event-time)




            (cond
             ((< 0 (string-compare3 a-test-name b-test-name)) #t)
             ((> 0 (string-compare3 a-test-name b-test-name)) #f)
             ((< 0 (string-compare3 a-item-path b-item-path)) #t)
             (else #f))))))))


(define (dashboard:run-id->tests-mindat run-id tabdat runs-hash)
  (let* ((run          (hash-table-ref/default runs-hash run-id #f))
         (key-vals     (rmt:get-key-vals run-id))
         (testnamepatt (or (dboard:tabdat-test-patts tabdat) "%/%"))
         (tests-ht     (dboard:get-tests-for-run-duplicate tabdat run-id run testnamepatt key-vals))







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







1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
                        ;;                                             userdata: (conc "run-id: " run-id))))
                        (hash-table-set! (dboard:tabdat-path-run-ids tabdat) run-path run-id)
                        ;; (set! colnum (+ colnum 1))
                        ))))
	      run-ids)))

(define (dashboard:tests-ht->tests-dat tests-ht)
  (let ((oldest-item (make-hash-table))) ;;
    ;; populate the oldest-item table
    (for-each
     (lambda (tdat)
       (let ((tname (db:test-get-testname tdat))
	     (etime (db:test-get-event_time tdat)))
	 (if (hash-table-exists? oldest-item tname)
	     (if (< (hash-table-ref oldest-item tname) etime)
		 (hash-table-set! oldest-item tname etime))
	     (hash-table-set! oldest-item tname etime))))
     (hash-table-values tests-ht))
    (reverse
     (sort
      (hash-table-values tests-ht)
      (lambda (a b) 
	(let ((a-test-name  (db:test-get-testname a))
	      (a-item-path  (db:test-get-item-path a))
	      (b-test-name  (db:test-get-testname b))
	      (b-item-path  (db:test-get-item-path b))
	      (a-event-time (db:test-get-event_time a))
	      (b-event-time (db:test-get-event_time b)))
	  (if (equal? a-test-name b-test-name)
	      (> a-event-time b-event-time)
	      (> (hash-table-ref oldest-item a-test-name)
		 (hash-table-ref oldest-item b-test-name)))))))))
;;	  (if (not (equal? a-test-name b-test-name))
;;	      (> a-event-time b-event-time)
;;	      (cond
;;	       ((< 0 (string-compare3 a-test-name b-test-name)) #t)
;;	       ((> 0 (string-compare3 a-test-name b-test-name)) #f)
;;	       ((< 0 (string-compare3 a-item-path b-item-path)) #t)
;;	       (else #f)))))))))


(define (dashboard:run-id->tests-mindat run-id tabdat runs-hash)
  (let* ((run          (hash-table-ref/default runs-hash run-id #f))
         (key-vals     (rmt:get-key-vals run-id))
         (testnamepatt (or (dboard:tabdat-test-patts tabdat) "%/%"))
         (tests-ht     (dboard:get-tests-for-run-duplicate tabdat run-id run testnamepatt key-vals))