Megatest

Diff
Login

Differences From Artifact [45e5456322]:

To Artifact [890366c265]:


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
670



671
672
673

674
675
676
677
678
679
680
681
682
  </script>
EOF
)

;; (tests:create-html-tree "test-index.html")
;;
(define (tests:create-html-tree outf)


  (if (common:simple-file-lock (conc outf ".lock"))

      (let* ((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)))

	(s:output-new
	 oup
	 (s:html tests:css-jscript-block
		 (s:title "Summary for " area-name)
		 (s:body 'onload "addEvents();"

			 ;; top list
			 (s:ul 'id "LinkedList1" 'class "LinkedList"
			       (s:li
				"Runs"
				(common:htree->html runs-htree
						    '()
						    (lambda (x p)



						      (apply s:a x p))))))))
	(close-output-port oup)
	(common:simple-file-release-lock (conc outf ".lock"))

	#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))
;; 	 (path           (if logf-info (car  logf-info) #f)))
;;     ;; This query finds the path and changes the directory to it for the test







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







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
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
  </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)
		   (s:body 'onload "addEvents();"
			   (s:h1 "Summary for " area-name)
			   ;; top list
			   (s:ul 'id "LinkedList1" 'class "LinkedList"
				 (s:li
				  "Runs"
				  (common:htree->html runs-htree
						      '()
						      (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))
;; 	 (path           (if logf-info (car  logf-info) #f)))
;;     ;; This query finds the path and changes the directory to it for the test