Comment: | Fixed item based waiting. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v1.60 | v1.6018 |
Files: | files | file ages | folders |
SHA1: |
e2d83122bee039cf4bd51a06841ada94 |
User & Date: | matt on 2015-07-05 16:58:25 |
Other Links: | branch diff | manifest | tags |
2015-07-05
| ||
21:17 | Fixed regression in item running check-in: c897553b7a user: matt tags: v1.60, v1.6018 | |
16:58 | Fixed item based waiting. check-in: e2d83122be user: matt tags: v1.60, v1.6018 | |
2015-07-02
| ||
00:03 | Extended calls to triggers to all situations where state/status are being directly set. check-in: ff986ee455 user: matt tags: v1.60 | |
Modified docs/manual/getting_started.txt from [cdb37e57c9] to [d4e6b12deb].
︙ | |||
18 19 20 21 22 23 24 | 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 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | Megatest. See the script installall.sch in the utils directory of the distribution for a mostly automated way to install everything needed for building Megatest on Linux. footnote:[An example footnote.] indexterm:[Example index entry] |
Modified docs/manual/howto.txt from [b28c4b0da6] to [ca4fcd3031].
︙ | |||
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | 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 61 62 63 64 65 66 67 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 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - - - + + + + + + + + + + + + | ---------------- Examining The Environment ~~~~~~~~~~~~~~~~~~~~~~~~~ During Config File Processing ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ It is often helpful to know the content of variables in various contexts as Megatest does the actions needed to run your tests. A handy technique is to force the startup of an xterm in the context being examined. For example, if an item list is not being generated as expected you can inject the startup of an xterm as if it were an item: .Original items table ----------------- [items] CELLNAME [system getcellname.sh] ----------------- .Items table modified for debug ----------------- [items] DEBUG [system xterm] CELLNAME [system getcellnames.sh] ----------------- When this test is run an xterm will pop up. In that xterm the environment is exactly that in which the script "getcellnames.sh" would run. You can now debug the script to find out why it isn't working as expected. Organising Your Tests and Tasks ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The default location "tests" for storing tests can be extended by adding to your tests-paths section. ---------------------------- [misc] parent #{shell dirname $(readlink -f .)} [tests-paths] 1 #{get misc parent}/simplerun/tests ---------------------------- |
Modified docs/manual/megatest_manual.html from [7c0b2d6913] to [30ce50bdb0].
1 2 3 4 | 1 2 3 4 5 6 7 8 9 10 11 12 | - + | <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
︙ | |||
82 83 84 85 86 87 88 | 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | - + + + + + + + | ul, ol, li > p { margin-top: 0; } ul > li { color: #aaa; } ul > li > * { color: black; } |
︙ | |||
214 215 216 217 218 219 220 | 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | - + | div.exampleblock > div.content { border-left: 3px solid #dddddd; padding-left: 0.5em; } div.imageblock div.content { padding-left: 0; } |
︙ | |||
410 411 412 413 414 415 416 | 416 417 418 419 420 421 422 423 424 425 426 427 428 429 | - - - - - - | /* * xhtml11 specific * * */ |
︙ | |||
449 450 451 452 453 454 455 | 449 450 451 452 453 454 455 456 457 458 459 460 461 462 | - - - - - - | /* * html5 specific * * */ |
︙ | |||
534 535 536 537 538 539 540 541 542 543 544 545 546 547 | 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 | + + | body.manpage div.sectionbody { margin-left: 3em; } @media print { body.manpage div#toc { display: none; } } @media screen { body { max-width: 50em; /* approximately 80 characters wide */ margin-left: 16em; } #toc { |
︙ | |||
823 824 825 826 827 828 829 | 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 | - - - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - + | <div class="paragraph"><p>Note 1: This road-map is tentative and subject to change without notice.</p></div> <div class="paragraph"><p>Note 2: Starting over. Old plan is commented out.</p></div> <div class="sect1"> <h2 id="_current_items">Current Items</h2> <div class="sectionbody"> <div class="sect2"> <h3 id="_ww05_migrate_to_inmem_db">ww05 - migrate to inmem-db</h3> |
︙ | |||
903 904 905 906 907 908 909 | 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + | <div class="sect2"> <h3 id="_dependencies">Dependencies</h3> <div class="paragraph"><p>Chicken scheme and a number of "eggs" are required for building Megatest. See the script installall.sch in the utils directory of the distribution for a mostly automated way to install everything needed for building Megatest on Linux.</p></div> <div class="paragraph"><p><span class="footnote"><br>[An example footnote.]<br></span></p></div> |
︙ | |||
1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 | 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 | + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + - + + - - + + - - - - + + + + | <div class="sect1"> <h2 id="_debugging_tricks">Debugging Tricks</h2> <div class="sectionbody"> <div class="sect2"> <h3 id="_examining_the_environment">Examining The Environment</h3> <div class="sect3"> <h4 id="_during_config_file_processing">During Config File Processing</h4> <div class="paragraph"><p>It is often helpful to know the content of variables in various contexts as Megatest does the actions needed to run your tests. A handy technique is to force the startup of an xterm in the context being examined.</p></div> <div class="paragraph"><p>For example, if an item list is not being generated as expected you can inject the startup of an xterm as if it were an item:</p></div> <div class="listingblock"> <div class="title">Original items table</div> <div class="content monospaced"> <pre>[items] CELLNAME [system getcellname.sh]</pre> </div></div> <div class="listingblock"> <div class="title">Items table modified for debug</div> <div class="content monospaced"> <pre>[items] DEBUG [system xterm] CELLNAME [system getcellnames.sh]</pre> </div></div> <div class="paragraph"><p>When this test is run an xterm will pop up. In that xterm the environment is exactly that in which the script "getcellnames.sh" would run. You can now debug the script to find out why it isn’t working as expected.</p></div> </div> <div class="sect3"> <h4 id="_organising_your_tests_and_tasks">Organising Your Tests and Tasks</h4> <div class="paragraph"><p>The default location "tests" for storing tests can be extended by adding to your tests-paths section.</p></div> <div class="listingblock"> <div class="content monospaced"> <pre>[misc] parent #{shell dirname $(readlink -f .)} |
︙ | |||
1104 1105 1106 1107 1108 1109 1110 | 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 | + - + + - + - - - + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + - + - + + + - + + + + + - + + + + + + + + + + | </div> <div class="sect3"> <h4 id="_mode">Mode</h4> <div class="paragraph"><p>The default (i.e. if mode is not specified) is normal. All pre-dependent tests must be COMPLETED and PASS, CHECK or WAIVED before the test will start</p></div> <div class="listingblock"> <div class="content monospaced"> <pre>[requirements] |
︙ | |||
1220 1221 1222 1223 1224 1225 1226 | 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 | - + | <div class="content monospaced"> <pre>[triggers] COMPLETED/ xterm -e bash -s --</pre> </div></div> <div class="admonitionblock"> <table><tr> <td class="icon"> |
︙ | |||
1248 1249 1250 1251 1252 1253 1254 | 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 | - + | <h2 id="_programming_api">Programming API</h2> <div class="sectionbody"> <div class="paragraph"><p>These routines can be called from the megatest repl.</p></div> <table class="tableblock frame-topbot grid-all" style=" width:70%; "> |
︙ | |||
1288 1289 1290 1291 1292 1293 1294 | 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 | - + | </tr> </tbody> </table> <table class="tableblock frame-topbot grid-all" style=" width:70%; "> |
︙ | |||
1337 1338 1339 1340 1341 1342 1343 | 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 | - + | <div class="sectionbody"> <div class="paragraph"><p>One or more optional appendixes go here at section level zero.</p></div> <div class="sect2"> <h3 id="_appendix_sub_section">Appendix Sub-section</h3> <div class="admonitionblock"> <table><tr> <td class="icon"> |
︙ | |||
1409 1410 1411 1412 1413 1414 1415 | 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 | - + + | </div> </div> </div> <div id="footnotes"><hr></div> <div id="footer"> <div id="footer-text"> Version 1.0<br> |
Modified docs/manual/reference.txt from [457cb0a364] to [a1ff3c5d06].
︙ | |||
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 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 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 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 164 165 166 167 168 | + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - + - + + + - - + + + + + + + + + + + + + + + | Mode ^^^^ The default (i.e. if mode is not specified) is normal. All pre-dependent tests must be COMPLETED and PASS, CHECK or WAIVED before the test will start ------------------- [requirements] mode normal ------------------- The toplevel mode requires only that the prior tests are COMPLETED. ------------------- [requirements] mode toplevel ------------------- |
︙ |
Modified docs/manual/server.png from [ae7d7ee58e] to [524d8b2847].
cannot compute difference between binary files
Modified docs/manual/writing_tests.txt from [c8c94e2e18] to [83549d4dfd].
1 2 3 4 | 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 | - - - - + + + + + + + + + + + + + + + + + + + + + + + + | Writing Tests ============= |
Modified docs/plan.txt from [0ead7d4df0] to [37ebd56f39].
1 2 3 4 5 6 7 8 9 10 11 12 13 | 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 | - - - + - - - - - - - - - - + - + + + | Road Map ======== Note 1: This road-map is tentative and subject to change without notice. Note 2: Starting over. Old plan is commented out. Current Items ------------- ww05 - migrate to inmem-db ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
︙ |
Modified megatest.scm from [6c0791ddb1] to [5bdead879c].
︙ | |||
63 64 65 66 67 68 69 | 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | - + | ;; Disabled help items ;; -rollup : (currently disabled) fill run (set by :runname) with latest test(s) ;; from prior runs with same keys (define help (conc " Megatest, documentation at http://www.kiatoa.com/fossils/megatest version " megatest-version " |
︙ | |||
280 281 282 283 284 285 286 | 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 | - + | "-show-config" "-show-cmdinfo" "-get-run-status" ;; queries "-test-paths" ;; get path(s) to a test, ordered by youngest first |
︙ | |||
302 303 304 305 306 307 308 309 310 311 312 313 314 315 | 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 | + + + + + + + | "-logging" "-v" ;; verbose 2, more than normal (normal is 1) "-q" ;; quiet 0, errors/warnings only ) args:arg-hash 0)) (if (and (not (null? remargs)) (not (or (args:get-arg "-runstep")) ;; add more args that use remargs here )) (debug:print 0 "ERROR: Unrecognised arguments: " (string-intersperse remargs " "))) ;; The watchdog is to keep an eye on things like db sync etc. ;; (define *time-zero* (current-seconds)) (define *watchdog* (make-thread (lambda () (thread-sleep! 0.05) ;; delay for startup |
︙ | |||
1136 1137 1138 1139 1140 1141 1142 | 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 | - + + | (if (or (args:get-arg "-runall")(args:get-arg "-run")) (general-run-call "-runall" "run all tests" (lambda (target runname keys keyvals) (runs:run-tests target runname |
︙ |
Modified runs.scm from [d899deed31] to [8e1563ef2c].
︙ | |||
32 33 34 35 36 37 38 39 40 41 42 43 44 45 | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | + + | (define (runs:test-get-full-path test) (let* ((testname (db:test-get-testname test)) (itempath (db:test-get-item-path test))) (conc testname (if (equal? itempath "") "" (conc "(" itempath ")"))))) ;; This is the *new* methodology. One record to inform them and in the chaos, organise them. ;; ;; NOT YET UTILIZED ;; (define (runs:create-run-record) (let* ((mconfig (if *configdat* *configdat* (if (launch:setup-for-run) *configdat* (begin |
︙ | |||
214 215 216 217 218 219 220 | 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | - + | (deferred '()) ;; delay running these since they have a waiton clause (runconfigf (conc *toppath* "/runconfigs.config")) (test-records (make-hash-table)) ;; need to process runconfigs before generating these lists (all-tests-registry #f) ;; (tests:get-all)) ;; (tests:get-valid-tests (make-hash-table) test-search-path)) ;; all valid tests to check waiton names (all-test-names #f) ;; (hash-table-keys all-tests-registry)) (test-names #f) ;; (tests:filter-test-names all-test-names test-patts)) |
︙ | |||
257 258 259 260 261 262 263 264 265 266 267 268 269 270 | 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 | + + + + + + + | ;; Now generate all the tests lists (set! all-tests-registry (tests:get-all)) (set! all-test-names (hash-table-keys all-tests-registry)) (set! test-names (tests:filter-test-names all-test-names test-patts)) ;; I think seeding required-tests with all test-names makes sense but lack analysis to back that up. ;; NEW STRATEGY HERE: ;; 1. fill required tests with test-patts ;; 2. scan testconfigs and if waitons, itemwait, itempatt calc prior test test-patt ;; 3. repeat until all deps propagated ;; any tests with direct mention in test-patts can be added to required ;; (set! required-tests (lset-intersection equal? (string-split test-patts ",") all-test-names)) ;; (set! required-tests (lset-intersection equal? test-names all-test-names)) ;; look up all tests matching the comma separated list of globs in ;; test-patts (using % as wildcard) |
︙ | |||
374 375 376 377 378 379 380 | 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 | + + + + + + - - + + + + + + + + + + - + | (else #f))) ;; not iterated #f ;; itemsdat 5 #f ;; spare - used for item-path ))) (for-each (lambda (waiton) (if (and waiton (not (member waiton test-names))) (let ((new-test-patts (tests:extend-test-patts test-patts hed waiton #f))) ;; need to account for test-patt here, if I am test "a", selected with a test-patt of "hed/b%" ;; and we are waiting on "waiton" we need to add "waiton/,waiton/b%" to test-patt ;; is this satisfied by merely appending "/" to the waiton name added to the list? ;; ;; This approach causes all of the items in an upstream test to be run |
︙ | |||
425 426 427 428 429 430 431 432 433 434 435 436 437 438 | 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 | + | ;; if run-count > 0 call, set -preclean and -rerun STUCK/DEAD (if (> run-count 0) (begin (if (not (hash-table-ref/default flags "-preclean" #f)) (hash-table-set! flags "-preclean" #t)) (if (not (hash-table-ref/default flags "-rerun" #f)) (hash-table-set! flags "-rerun" "STUCK/DEAD,n/a,ZERO_ITEMS")) ;; recursive call to self (runs:run-tests target runname test-patts user flags run-count: (- run-count 1))))) (debug:print-info 0 "No tests to run"))) (debug:print-info 4 "All done by here") (rmt:tasks-set-state-given-param-key task-key "done") ;; (sqlite3:finalize! tasks-db) )) |
︙ |
Modified tests.scm from [e113e6dd48] to [55460ac9b9].
︙ | |||
70 71 72 73 74 75 76 77 78 79 80 81 82 83 | 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | + + + + + + + + + + + + + + | (define (tests:filter-test-names test-names test-patts) (delete-duplicates (filter (lambda (testname) (tests:match test-patts testname #f)) test-names))) ;; given test-b that is waiting on test-a extend test-patt appropriately ;; (define (tests:extend-test-patts test-patt test-b test-a itemmap) (let* ((patts (string-split test-patt ",")) (test-b-len (+ (string-length test-b) 1)) (patts-b (map (lambda (x) (let ((newpatt (conc test-a "/" (substring x test-b-len (string-length x))))) (print "in map, x=" x ", newpatt=" newpatt) newpatt)) (filter (lambda (x) (eq? (substring-index (conc test-b "/") x) 0)) patts)))) (string-intersperse (delete-duplicates (append patts patts-b)) ","))) ;; tests:glob-like-match (define (tests:glob-like-match patt str) (let ((like (substring-index "%" patt))) (let* ((notpatt (equal? (substring-index "~" patt) 0)) (newpatt (if notpatt (substring patt 1) patt)) (finpatt (if like (string-substitute (regexp "%") ".*" newpatt #f) |
︙ |
Modified tests/fdktestqa/testqa/tests/bigrun3/testconfig from [e9786b9270] to [d62ae5987e].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | + + + + + + + + | # Add additional steps here. Format is "stepname script" [ezsteps] step1 step1.sh # Test requirements are specified here [requirements] waiton bigrun2 priority 0 mode itemwait # pattern replacement # # Remove everything up to the last / # itemmap .*/ # # Replace foo/ with bar/ # itemmap foo/ bar/ # itemmap .*/ # Iteration for your tests are controlled by the items section [items] NUMBER #{scheme (string-intersperse (map (lambda (x)(conc "blah/" x)) \ (map number->string (sort (let loop ((a 0)(res '())) \ (if (<= a (or (any->number (get-environment-variable "NUMTESTS")) 2500)) \ |
︙ |