Changes In Branch v1.65-modularization Through [f5fba357bd] Excluding Merge-Ins
This is equivalent to a diff from b9f1218ee5 to f5fba357bd
2018-03-15
| ||
00:39 | removed configf.o from mtut linking. check-in: ac6f23131f user: matt tags: v1.65-modularization | |
2018-03-14
| ||
16:32 | More modularization with configf 98% done check-in: f5fba357bd user: mrwellan tags: v1.65-modularization | |
2018-03-12
| ||
14:08 | Bumped version to v1.6511 check-in: 1dd24dcdda user: mrwellan tags: v1.65, v1.6511 | |
10:37 | Build improvements for modularization check-in: f5559ef39a user: mrwellan tags: v1.65-modularization | |
2018-03-08
| ||
14:34 | First serious steps for coverting to modules. db and common now have module alternatives in src. NOTE: these cannot be mixed with the current common and db compilation unit based files. check-in: 03ef168ab1 user: mrwellan tags: v1.65-modularization | |
2018-03-07
| ||
20:17 | Added placeholder for gather area db's check-in: b9f1218ee5 user: mrwellan tags: v1.65 | |
2018-03-06
| ||
09:36 | Added tcmt objects to make clean check-in: f5f300b27d user: jmoon18 tags: v1.65 | |
Modified Makefile from [786bb282c9] to [b17c74ed14].
︙ | |||
15 16 17 18 19 20 21 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | - + - + + - - + + + + + + - + | # make install CSCOPTS='-accumulate-profile -profile-name $(PWD)/profile-ww$(shell date +%V.%u)' # rm <files>.o ; make install CSCOPTS='-profile' ; ... ; chicken-profile | less SHELL=/bin/bash PREFIX=$(PWD) CSCOPTS= INSTALL=install |
︙ | |||
63 64 65 66 67 68 69 | 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | - - + + - - - + + - - + + | # ARCHSTR=$(shell bash -c "echo \$$MACHTYPE") PNGFILES = $(shell cd docs/manual;ls *png) #all : $(PREFIX)/bin/.$(ARCHSTR) mtest dboard mtut ndboard all : $(PREFIX)/bin/.$(ARCHSTR) mtest dboard mtut |
︙ | |||
97 98 99 100 101 102 103 | 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | - | margs.o \ mt.o \ megatest-version.o \ ods.o \ portlogger.o \ process.o \ rmt.o \ |
︙ | |||
135 136 137 138 139 140 141 | 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | - + - + - + + + | # # $(PREFIX)/bin/revtagfsl : utils/revtagfsl.scm # csc utils/revtagfsl.scm -o $(PREFIX)/bin/revtagfsl # Special dependencies for the includes tests.o db.o launch.o runs.o dashboard-tests.o dashboard-context-menu.o dashboard-guimonitor.o dashboard-main.o monitor.o dashboard.o \ |
︙ | |||
287 288 289 290 291 292 293 | 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 | - + | mkdir -p ext-tests cd ext-tests;fossil open --nested $(MTQA_FOSSIL) $(MTQA_FOSSIL) : fossil clone https://www.kiatoa.com/fossils/megatest_qa $(MTQA_FOSSIL) clean : |
︙ | |||
330 331 332 333 334 335 336 | 335 336 337 338 339 340 341 342 343 344 345 346 347 348 | - - | csc -deploy $(CSCOPTS) $(OFILES) megatest.scm -o deploytarg mv deploytarg/deploytarg deploytarg/mtest deploytarg/dboard : $(OFILES) $(GOFILES) dashboard.scm deploytarg/apropos.so csc -deploy $(OFILES) $(GOFILES) dashboard.scm -o deploytarg mv deploytarg/deploytarg deploytarg/dboard |
︙ |
Deleted bin/sleeprunner version [2ecd8e9680].
| - - - - - - - - - - - - - - - - - - - - - - |
|
Modified common.scm from [7382d07655] to [36dac86f8a].
︙ | |||
24 25 26 27 28 29 30 | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | - | matchable regex posix (srfi 18) extras ;; tcp (prefix nanomsg nmsg:) (prefix sqlite3 sqlite3:) pkts (prefix dbi dbi:) ) (declare (unit common)) |
︙ | |||
706 707 708 709 710 711 712 713 714 715 716 717 718 719 | 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 | + + - + | (getenv "MT_TESTSUITE_NAME") (if (string? *toppath* ) (pathname-file *toppath*) #f))) ;; (pathname-file (current-directory))))) (define common:get-area-name common:get-testsuite-name) ;; get-db-tmp-area is improved/replicated src/db.scm ;; (define (common:get-db-tmp-area . junk) (if *db-cache-path* *db-cache-path* (if *toppath* ;; common:get-create-writeable-dir (handle-exceptions exn (begin |
︙ | |||
1048 1049 1050 1051 1052 1053 1054 | 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 | - + | (handle-exceptions exn (begin (if message (debug:print-info 0 *default-log-port* message)) #f) (thunk) )) (define (common:file-exists? path-string #!key (silent #f)) |
︙ | |||
1391 1392 1393 1394 1395 1396 1397 | 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 | - | )))))) ;; if it looks like a number -> convert it to a number, else return it ;; (define (common:lazy-convert inval) (let* ((as-num (if (string? inval)(string->number inval) #f))) (or as-num inval))) |
︙ | |||
2834 2835 2836 2837 2838 2839 2840 | 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | (if thread (handle-exceptions exn #t ;; just ignore it, it might have died in the meantime so joining it will throw an exception (thread-join! thread)) ))) (hash-table-keys *common:thread-punchlist*))) ;; moved to common.scm as it is very megatest specific ;; pathenvvar will set the named var to the path of the config (define (common:find-and-read-config fname #!key (environ-patt #f)(given-toppath #f)(pathenvvar #f)) (let* ((curr-dir (current-directory)) (configinfo (find-config fname toppath: given-toppath)) (toppath (car configinfo)) (configfile (cadr configinfo)) (set-fields (lambda (curr-section next-section ht path) (let ((field-names (if ht (common:get-fields ht) '())) (target (or (getenv "MT_TARGET")(args:get-arg "-reqtarg")(args:get-arg "-target")))) (debug:print-info 9 *default-log-port* "set-fields with field-names=" field-names " target=" target " curr-section=" curr-section " next-section=" next-section " path=" path " ht=" ht) (if (not (null? field-names))(keys:target-set-args field-names target #f)))))) (if toppath (change-directory toppath)) (if (and toppath pathenvvar)(setenv pathenvvar toppath)) (let ((configdat (if configfile (read-config configfile #f #t environ-patt: environ-patt post-section-procs: (list (cons "^fields$" set-fields)) #f)))) (if toppath (change-directory curr-dir)) (list configdat toppath configfile fname)))) ;;;; return list (path fullpath configname) (define (common:find-config configname #!key (toppath #f)) (if toppath (let ((cfname (conc toppath "/" configname))) (if (common:file-exists? cfname) (list toppath cfname configname) (list #f #f #f))) (let* ((cwd (string-split (current-directory) "/"))) (let loop ((dir cwd)) (let* ((path (conc "/" (string-intersperse dir "/"))) (fullpath (conc path "/" configname))) (if (common:file-exists? fullpath) (list path fullpath configname) (let ((remcwd (take dir (- (length dir) 1)))) (if (null? remcwd) (list #f #f #f) ;; #f #f) (loop remcwd))))))))) (define (common:setup) (let* ((configf (find-config "megatest.config")) (config (if configf (read-config configf #f #t) #f))) (if config (setenv "RUN_AREA_HOME" (pathname-directory configf))) config)) |
Modified configf.scm from [af30e1aa5d] to [130c283cc4].
︙ | |||
240 241 242 243 244 245 246 247 248 249 250 251 252 253 | 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | (val (cadr bundle)) (meta (if (> (length bundle) 2)(caddr bundle) #f))) (hash-table-set! ht section (config:assoc-safe-add (hash-table-ref ht section) key val metadata: meta)))) vars))))) (hash-table-keys ht)))) ht) ;;====================================================================== ;; Extended config lines, allows storing more hierarchial data in the config lines ;; ABC a=1; b=hello world; c=a ;; ;; NOTE: implementation is quite limited. You currently cannot have ;; semicolons in your string values. ;;====================================================================== ;; convert string a=1; b=2; c=a silly thing; d= ;; to '((a . 1)(b . 2)(c . "a silly thing")(d . "")) ;; (define (configf:val->alist val #!key (convert #f)) (let ((val-list (string-split-fields ";\\s*" val #:infix))) (if val-list (map (lambda (x) (let ((f (string-split-fields "\\s*=\\s*" x #:infix))) (case (length f) ((0) `(,#f)) ;; null string case ((1) `(,(string->symbol (car f)))) ((2) `(,(string->symbol (car f)) . ,(let ((inval (cadr f))) (if convert (common:lazy-convert inval) inval)))) (else f)))) val-list) '()))) ;; I don't want configf to turn into a weak yaml format but this extention is really useful ;; (define (configf:section->val-alist cfgdat section-name #!key (convert #f)) (let ((section (configf:get-section cfgdat section-name))) (map (lambda (item) (let ((key (car item)) (val (cadr item))) ;; BUG IN WAIT. sections are not returned as proper alists, should fix this. (cons key (configf:val->alist val convert: convert)))) section))) ;; read a config file, returns hash table of alists ;; read a config file, returns hash table of alists ;; adds to ht if given (must be #f otherwise) ;; allow-system: ;; #f - do not evaluate [system ;; #t - immediately evaluate [system and store result as string |
︙ | |||
646 647 648 649 650 651 652 | 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 | - + | (set! sechash newhash)) (set! sechash section-hash)) (set! new hed) ;; will append this at the bottom of the loop (set! secname section-name) )) ;; No need to process key cmd, let it fall though to key val (configf:key-val-pr ( x key val ) |
︙ |
Modified megatest.scm from [64480090d8] to [4123bae161].
︙ | |||
49 50 51 52 53 54 55 | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | - - + + | (declare (uses tdb)) (declare (uses mt)) (declare (uses api)) (declare (uses tasks)) ;; only used for debugging. (declare (uses env)) (declare (uses diff-report)) |
︙ |
Modified mtut.scm from [e2f911af30] to [ca124cc324].
| 1 2 3 4 5 6 7 8 | - + |
|
︙ | |||
23 24 25 26 27 28 29 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | - + - + + + + | (define (toplevel-command . a) #f) (use srfi-1 posix srfi-69 readline ;; regex regex-case srfi-69 apropos json http-client directory-utils rpc typed-records;; (srfi 18) extras) srfi-18 extras format pkts regex regex-case (prefix dbi dbi:) nanomsg) |
︙ | |||
302 303 304 305 306 307 308 | 305 306 307 308 309 310 311 312 313 314 315 316 317 318 | - - | ;; given a mtutil param, return the old megatest equivalent ;; (define (megatest-param->mtutil-param param) (let* ((mapping-alist (common:get-param-mapping flavor: 'switch-symbol))) (alist-ref (string->symbol param) mapping-alist eq? param) param)) |
︙ | |||
664 665 666 667 668 669 670 | 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 | - + | ;; ;; Override the run start time record with sched. Usually #f is fine. ;; (define (create-run-pkt mtconf action area runkey target runname mode-patt tag-expr pktsdir reason contour sched dbdest append-conf runtrans) (let* ((good-val (lambda (inval)(and inval (string? inval)(not (string-null? inval))))) |
︙ | |||
763 764 765 766 767 768 769 | 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 | - + | (keyparts (string-split key ":")) ;; contour:ruletype:action:optional (contour (car keyparts)) (len-key (length keyparts)) (ruletype (if (> len-key 1)(cadr keyparts) #f)) (action (if (> len-key 2)(caddr keyparts) #f)) (optional (if (> len-key 3)(cadddr keyparts) #f)) ;; (val-list (string-split-fields ";\\s*" val #:infix)) ;; (string-split val)) ;; runname-rule params |
︙ | |||
1008 1009 1010 1011 1012 1013 1014 | 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 | - + - + | keydats))) ;; sense rules (hash-table-keys rgconf)) ;; now have to run populated (for-each (lambda (contour) (let* ((cval (or (configf:lookup mtconf "contours" contour) "")) |
︙ | |||
1208 1209 1210 1211 1212 1213 1214 | 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 | - + | (if *action* (case (string->symbol *action*) ((run remove rerun rerun-clean rerun-all set-ss archive kill list) (let* ((mtconfdat (simple-setup (args:get-arg "-start-dir"))) (mtconf (car mtconfdat)) (area (args:get-arg "-area")) ;; look up the area to dispatch to from [areas] section (areasec (if area (configf:lookup mtconf "areas" area) #f)) |
︙ | |||
1347 1348 1349 1350 1351 1352 1353 | 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 | - + - - - + + + + + + + + + + + | (let loop ((instr (nn-recv rep))) (print "received " instr ", running \"" script " " instr "\"") (system (conc script " '" instr "'")) (nn-send rep "ok") (loop (nn-recv rep)))) (print "ERROR: Port " portnum " already in use. Try another port"))))))) |
︙ |
Added src/ftail.scm version [96a7ff77a3].