Megatest

Check-in [ca141ede8f]
Login
Overview
Comment:Cherry pick from 7254840ac9: Better way of handling scripts. Still needs improvement.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | rebase-envprocessing
Files: files | file ages | folders
SHA1: ca141ede8fed7307e2dd5c9efe7f8be7e1e59b4c
User & Date: mrwellan on 2016-04-28 08:43:52
Other Links: branch diff | manifest | tags
Context
2016-04-28
08:44
Cherry pick from 5838fde95e: Partial refactoring fix of tests dependency tree check-in: 251d26c601 user: mrwellan tags: rebase-envprocessing
08:43
Cherry pick from 7254840ac9: Better way of handling scripts. Still needs improvement. check-in: ca141ede8f user: mrwellan tags: rebase-envprocessing
08:41
Cherry pick from 67f07adab1: Use env var to trigger loading scripts check-in: 9b00b2ed30 user: mrwellan tags: rebase-envprocessing
Changes

Modified megatest.scm from [139111b800] to [412258d252].

1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877












1878
1879
1880
1881
1882
1883
1884
1867
1868
1869
1870
1871
1872
1873




1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892







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







(if (or (getenv "MT_RUNSCRIPT")
	(args:get-arg "-repl")
	(args:get-arg "-load"))
    (let* ((toppath (launch:setup))
	   (dbstruct (if toppath (make-dbr:dbstruct path: toppath local: (args:get-arg "-local")) #f)))
      (if dbstruct
	  (cond
	   ((getenv "MT_RUNSCRIPT") ;; special way to run megatest scripts #!/usr/bin/env MT_RUNSCRIPT=yes megatest
	    (let ((fname (cadr (argv))))
	      (print "fname=" fname)
	      (load fname)))
	   ((getenv "MT_RUNSCRIPT")
	    ;; How to run megatest scripts
	    ;;
	    ;; #!/bin/bash
	    ;;
	    ;; export MT_RUNSCRIPT=yes
	    ;; megatest << EOF
	    ;; (print "Hello world")
	    ;; (exit)
	    ;; EOF

	    (repl))
	   (else
	    (begin
	      (set! *db* dbstruct)
	      (set! *client-non-blocking-mode* #t)
	      (import extras) ;; might not be needed
	      ;; (import csi)
	      (import readline)

Modified tests.scm from [5b29cc1f30] to [fd4aa50106].

892
893
894
895
896
897
898
899

900
901
902
903
904
905
906
892
893
894
895
896
897
898

899
900
901
902
903
904
905
906







-
+







  (let ((all-testnames (hash-table-keys test-records)))
    (if (null? all-testnames)
	'()
	(let loop ((hed (car all-testnames))
		   (tal (cdr all-testnames))
		   (res (list "digraph tests {"
			      " size=\"11,11\";"
			      " ratio=0.95;")))
			      " ratio=0.9;")))
	  (let* ((testrec (hash-table-ref test-records hed))
		 (waitons (or (tests:testqueue-get-waitons testrec) '()))
		 (newres  (append res
				  (if (null? waitons)
				      (list (conc "   \"" hed "\";"))
				      (map (lambda (waiton)
					     (conc "   \"" waiton "\" -> \"" hed "\";"))