Megatest

Check-in [6ae61495e7]
Login
Overview
Comment:Added data get for runs summary html page
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | html-tree
Files: files | file ages | folders
SHA1: 6ae61495e799d771ff172a35e3c5a4cd1b7549f2
User & Date: matt on 2016-10-17 01:32:40
Other Links: branch diff | manifest | tags
Context
2016-10-17
11:00
Cleaned up html generation a little Closed-Leaf check-in: 962be10405 user: mrwellan tags: html-tree
01:32
Added data get for runs summary html page check-in: 6ae61495e7 user: matt tags: html-tree
01:09
runs index works check-in: fd65f92d77 user: matt tags: html-tree
Changes

Modified tests.scm from [890366c265] to [34fb215fdd].

635
636
637
638
639
640
641




642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
          }
        }
      }
    }
  </script>
EOF
)





;; (tests:create-html-tree "test-index.html")
;;
(define (tests:create-html-tree outf)
  (let* ((lockfile  (conc outf ".lock"))
	 (runs-to-process '()))
    (if (common:simple-file-lock lockfile)
	(let* ((linktree  (common:get-linktree))
	       (oup       (open-output-file outf))
	       (area-name (common:get-testsuite-name))
	       (keys      (rmt:get-keys))
	       (numkeys   (length keys))
	       (runsdat   (rmt:get-runs "%" #f #f (map (lambda (x)(list x "%")) keys)))
	       (header    (vector-ref runsdat 0))
	       (runs      (vector-ref runsdat 1))
	       (runtreedat (map (lambda (x)
				  (append (take (vector->list x) numkeys)
					  (list (vector-ref x (+ 1 numkeys))))) ;; gets the runname
				runs))
	       (runs-htree (common:list->htree runtreedat)))
	  (set! runs-to-process runs)
	  (s:output-new
	   oup
	   (s:html tests:css-jscript-block
		   (s:title "Summary for " area-name)







>
>
>
>
















|
<







635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662

663
664
665
666
667
668
669
          }
        }
      }
    }
  </script>
EOF
)

(define (tests:run-record->test-path run numkeys)
   (append (take (vector->list run) numkeys)
	   (list (vector-ref run (+ 1 numkeys)))))

;; (tests:create-html-tree "test-index.html")
;;
(define (tests:create-html-tree outf)
  (let* ((lockfile  (conc outf ".lock"))
	 (runs-to-process '()))
    (if (common:simple-file-lock lockfile)
	(let* ((linktree  (common:get-linktree))
	       (oup       (open-output-file outf))
	       (area-name (common:get-testsuite-name))
	       (keys      (rmt:get-keys))
	       (numkeys   (length keys))
	       (runsdat   (rmt:get-runs "%" #f #f (map (lambda (x)(list x "%")) keys)))
	       (header    (vector-ref runsdat 0))
	       (runs      (vector-ref runsdat 1))
	       (runtreedat (map (lambda (x)
				  (tests:run-record->test-path x numkeys))

				runs))
	       (runs-htree (common:list->htree runtreedat)))
	  (set! runs-to-process runs)
	  (s:output-new
	   oup
	   (s:html tests:css-jscript-block
		   (s:title "Summary for " area-name)
675
676
677
678
679
680
681

682
















683
684
685
686
687
688
689
						      (lambda (x p)
							(let ((targpath (string-intersperse p "/"))
							      (runname  (car (reverse p))))
							  (s:a runname 'href (conc targpath "/runsummary.html"))))
							    ))))))
	  (close-output-port oup)
	  (common:simple-file-release-lock lockfile)

	  ; (
















	  #t)
	#f)))

;;   (let* ((outputfilename (conc "megatest-rollup-" test-name ".html"))
;; 	 (orig-dir       (current-directory))
;; 	 (logf-info      (rmt:test-get-logfile-info run-id test-name))
;; 	 (logf           (if logf-info (cadr logf-info) #f))







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







678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
						      (lambda (x p)
							(let ((targpath (string-intersperse p "/"))
							      (runname  (car (reverse p))))
							  (s:a runname 'href (conc targpath "/runsummary.html"))))
							    ))))))
	  (close-output-port oup)
	  (common:simple-file-release-lock lockfile)
	  (for-each
	   (lambda (run)
	     (let* ((test-subpath (tests:run-record->test-path run numkeys))
		    (run-id       (db:get-value-by-header run header "id"))
		    (testdats     (rmt:get-tests-for-run
				   run-id "%" ;; testnamepatt
				   '()        ;; states
				   '()        ;; statuses
				   #f         ;; offset
				   #f         ;; num-to-get
				   #f         ;; hide/not-hide
				   #f         ;; sort-by
				   #f         ;; sort-order
				   #f         ;; 'shortlist                           ;; qrytype
                                   0         ;; last update
				   #f)))
	       (print "testdats: " testdats)))
	   runs)
	  #t)
	#f)))

;;   (let* ((outputfilename (conc "megatest-rollup-" test-name ".html"))
;; 	 (orig-dir       (current-directory))
;; 	 (logf-info      (rmt:test-get-logfile-info run-id test-name))
;; 	 (logf           (if logf-info (cadr logf-info) #f))