Overview
Comment: | Added sexpr output for list runs. Added example of runname to .mtutil.scm |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v1.64 |
Files: | files | file ages | folders |
SHA1: |
6fde6a49d7ade943d8fb79f77bfd555d |
User & Date: | matt on 2017-03-20 22:48:36 |
Other Links: | branch diff | manifest | tags |
Context
2017-03-21
| ||
00:25 | Switched to hash tables instead of alists for mappers. Added example for corporate work week with incrementing last letter. check-in: 6718647e1f user: matt tags: v1.64 | |
2017-03-20
| ||
22:48 | Added sexpr output for list runs. Added example of runname to .mtutil.scm check-in: 6fde6a49d7 user: matt tags: v1.64 | |
17:56 | Support for /QUICK check-in: b93c0e396c user: matt tags: v1.64 | |
Changes
Modified .mtutil.scm from [dc76b9e3b2] to [b7f06c67b4].
1 2 3 4 5 6 7 8 9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 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 | + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + | (use json) (use ducttape-lib) (define (get-last-runname area-path target) (let* ((run-data (with-input-from-pipe (conc "megatest -list-runs % -target " target " -fields runs:runname,event_time -dumpmode sexpr -start-dir " area-path) read))) (if (or (not run-data) (null? run-data)) #f (let* ((name-time (let ((dat (map cdadr (alist-ref target run-data equal?)))) ;; (("runname" . "2017w07.0-0047") ("event_time" . "1487490424")) ;; (print "dat=" dat) (map (lambda (item) (cons (alist-ref "runname" item equal?) (string->number (alist-ref "event_time" item equal?)))) dat))) (sorted (sort name-time (lambda (a b)(> (cdr a)(cdr b))))) (last-name (if (null? sorted) #f (caar sorted)))) last-name)))) ;; example of how to set up and write target mappers ;; (define *target-mappers* `((prefix-contour . ,(lambda (target run-name area area-path reason contour mode-patt) (conc contour "/" target))) (prefix-area-contour . ,(lambda (target run-name area area-path reason contour mode-patt) (conc area "/" contour "/" target))))) |
Modified megatest.config from [8614e9baa4] to [1f188e0dbd].
1 2 3 4 5 6 7 8 9 10 11 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | - - + + - + | [setup] pktsdirs /tmp/pkts /some/other/source [areas] # path-to-area map-target-script(future, optional) fullrun path=tests/fullrun # targtrans is name of scheme proc stored in .mtutil.scm, which lives in PWD where mtutil is run ext-tests path=ext-tests; targtrans=prefix-contour [contours] # mode-patt/tag-expr |
Modified megatest.scm from [f0fc76328a] to [95d4de0210].
︙ | |||
1088 1089 1090 1091 1092 1093 1094 | 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 | - + | ;; res))) ;; (if (null? tal) ;; (reverse new-res) ;; (loop (car tal)(cdr tal) new-res))))) ;; runstmp)) (db-targets (args:get-arg "-list-db-targets")) (seen (make-hash-table)) |
︙ | |||
1147 1148 1149 1150 1151 1152 1153 | 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 | - + | (string-intersperse adj-tests-spec ",") ;; db:test-record-fields #f) #f 'normal) '()))) (case dmode |
︙ | |||
1202 1203 1204 1205 1206 1207 1208 | 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 | - + | (final_logf (if (member "final_logf" tests-spec)(get-value-by-fieldname test test-field-index "final_logf" ) #f)) ;; (db:test-get-final_logf test)) (run_duration (if (member "run_duration" tests-spec)(get-value-by-fieldname test test-field-index "run_duration") #f)) ;; (db:test-get-run_duration test)) (fullname (conc testname (if (equal? itempath "") "" (conc "(" itempath ")"))))) (case dmode |
︙ | |||
1285 1286 1287 1288 1289 1290 1291 | 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 | + - + + | ((cond ((and (number? first)(number? second)) <) ((and (string? first)(string? second)) string<=?) (else equal?)) first second)))) tests)))))) runs) (case dmode |
︙ | |||
1358 1359 1360 1361 1362 1363 1364 | 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 | - + | ;; (print "Target: " target "/" runname " tests:") ;; (pp tests) (cons (conc target "/" runname) (cons (list (conc target "/" runname)) (cons '() (cons run-fields tests))))) (begin |
︙ |
Modified mtut.scm from [61449c6dc0] to [7cf8bec557].
︙ | |||
23 24 25 26 27 28 29 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | - + + | (declare (uses configf)) ;; (declare (uses rmt)) (include "megatest-fossil-hash.scm") (require-library stml) |
︙ | |||
254 255 256 257 258 259 260 261 262 263 264 265 266 267 | 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 | + | (loop (get-line) date node time)))) (else ;; have some unrecognised junk? spit out error message (print "ERROR: fossil timeline returned unrecognisable junk \"" inl "\"") (loop (get-line) date node time)))) (else ;; no more datat and last node on branch not found (close-input-port timeline-port) (values (common:date-time->seconds (conc date " " time)) node)))))) ;;====================================================================== ;; GLOBALS ;;====================================================================== ;; Card types: ;; |
︙ |
Modified runconfigs.config from [54666c6a32] to [c1bc50c43c].
︙ | |||
15 16 17 18 19 20 21 22 23 24 25 26 27 28 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | + | # tip will be replaced with hashkey? [v1.63/tip/dev] # file: files changes since last run trigger new run # script: script is called with unix seconds as last parameter (other parameters are preserved) # # contour:sensetype:action params data quick:file:run run-name=auto;glob=/home/matt/data/megatest/*.scm snazy:file:run run-name=auto;glob=/home/matt/data/megatest/*.scm # script returns change-time (unix epoch), new-target-name, run-name # # quick:script:run checkfossil = http://www.kiatoa.com/fossils/megatest v1.63;\ # checkfossil = http://www.kiatoa.com/fossils/megatest_qa trunk # fossil based trigger |
︙ |