Overview
Comment: | Use env var to trigger loading scripts |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v1.60_defunct |
Files: | files | file ages | folders |
SHA1: |
67f07adab1589f83f919deb270a23290 |
User & Date: | mrwellan on 2016-03-21 20:39:16 |
Other Links: | branch diff | manifest | tags |
Context
2016-03-22
| ||
15:27 | Better way of handling scripts. Still needs improvement. check-in: 7254840ac9 user: mrwellan tags: v1.60_defunct | |
2016-03-21
| ||
20:39 | Use env var to trigger loading scripts check-in: 67f07adab1 user: mrwellan tags: v1.60_defunct | |
09:34 | Manual tweaks to display of tests check-in: de6124e350 user: mrwellan tags: v1.60_defunct | |
Changes
Modified common.scm from [0e936fa8d8] to [7f5eb88a88].
︙ | ︙ | |||
462 463 464 465 466 467 468 | (let ((res (or (args:get-arg "-runname") (args:get-arg ":runname") (getenv "MT_RUNNAME")))) ;; (if res (set-environment-variable "MT_RUNNAME" res)) ;; not sure if this is a good idea. side effect and all ... res)) (define (common:args-get-target #!key (split #f)) | | | 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 | (let ((res (or (args:get-arg "-runname") (args:get-arg ":runname") (getenv "MT_RUNNAME")))) ;; (if res (set-environment-variable "MT_RUNNAME" res)) ;; not sure if this is a good idea. side effect and all ... res)) (define (common:args-get-target #!key (split #f)) (let* ((keys (if (hash-table? *configdat*) (keys:config-get-fields *configdat*) '())) (numkeys (length keys)) (target (or (args:get-arg "-reqtarg") (args:get-arg "-target") (getenv "MT_TARGET"))) (tlist (if target (string-split target "/" #t) '())) (valid (if target (or (null? keys) ;; probably don't know our keys yet |
︙ | ︙ |
Modified megatest.scm from [f136b9759b] to [0245af141a].
︙ | ︙ | |||
1859 1860 1861 1862 1863 1864 1865 | ;;====================================================================== ;; Start a repl ;;====================================================================== ;; fakeout readline | > | > > > > > > | | | | | | | | | | | | | | | | | | | | 1859 1860 1861 1862 1863 1864 1865 1866 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 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 | ;;====================================================================== ;; Start a repl ;;====================================================================== ;; fakeout readline (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))) (else (begin (set! *db* dbstruct) (set! *client-non-blocking-mode* #t) (import extras) ;; might not be needed ;; (import csi) (import readline) (import apropos) ;; (import (prefix sqlite3 sqlite3:)) ;; doesn't work ... (include "readline-fix.scm") (gnu-history-install-file-manager (string-append (or (get-environment-variable "HOME") ".") "/.megatest_history")) (current-input-port (make-gnu-readline-port "megatest> ")) (if (args:get-arg "-repl") (repl) (load (args:get-arg "-load"))) (db:close-all dbstruct)) (exit))) (set! *didsomething* #t)))) ;;====================================================================== ;; Wait on a run to complete ;;====================================================================== (if (and (args:get-arg "-run-wait") (not (or (args:get-arg "-run") |
︙ | ︙ |