Comment: | Merged in v1.60 |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | multi-area |
Files: | files | file ages | folders |
SHA1: |
a7184bad299c031d80ea0ebd1cda24e6 |
User & Date: | matt on 2015-06-04 23:09:16 |
Other Links: | branch diff | manifest | tags |
2015-06-16
| ||
22:40 | Merged in v1.60 but not cleaned up Closed-Leaf check-in: c418c9c6fb user: matt tags: multi-area | |
2015-06-04
| ||
23:09 | Merged in v1.60 check-in: a7184bad29 user: matt tags: multi-area | |
22:56 | Merged db fix in check-in: e65b212f1d user: matt tags: v1.60 | |
2015-06-02
| ||
22:31 | merged check-in: 902972c7ce user: matt tags: multi-area | |
Added all-exceptions.ods version [9f8aefbaf1].
cannot compute difference between binary files
Modified common.scm from [2fb43e8a5a] to [8c0414434e].
︙ | |||
279 280 281 282 283 284 285 | 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 | + + + + + + + + + + + - - + + | (or (configf:lookup (megatest:area-configdat area-dat) "setup" "testsuite" ) (pathname-file (megatest:area-path area-dat)))) ;;====================================================================== ;; E X I T H A N D L I N G ;;====================================================================== (define (common:legacy-sync-recommended) (or (args:get-arg "-runtests") (args:get-arg "-server") (args:get-arg "-set-run-status") (args:get-arg "-remove-runs") (args:get-arg "-get-run-status") )) (define (common:legacy-sync-required) (configf:lookup *configdat* "setup" "megatest-db")) |
︙ | |||
313 314 315 316 317 318 319 | 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 | - - + + - - - + + + | (sqlite3:interrupt! db) (sqlite3:finalize! db #t) (vector-set! *task-db* 0 #f)))))) "Cleanup db exit thread")) (th2 (make-thread (lambda () (debug:print 4 "Attempting clean exit. Please be patient and wait a few seconds...") (if no-hurry (thread-sleep! 5) ;; give the clean up few seconds to do it's stuff |
︙ |
Modified dashboard.scm from [5cc910be04] to [0d13806013].
︙ | |||
214 215 216 217 218 219 220 221 222 223 224 225 226 227 | 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 | + | ;; R U N C O N T R O L ;;====================================================================== ;; General displayer ;; (define (dashboard:area-display data adat window-id) (let* ((view-matrix (iup:matrix ;; (runs-for-targ (db:get-runs-by-patt *dbstruct-local* *keys* "%" target #f #f #f)) #:expand "YES" ;; #:fittosize "YES" #:scrollbar "YES" #:numcol 100 #:numlin 100 #:numcol-visible 3 #:numlin-visible 3 |
︙ | |||
238 239 240 241 242 243 244 245 246 247 248 249 250 251 | 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 | + + + + | view-matrix))))) ;; Browse and control a single run ;; (define (runcontrol window-id) (iup:hbox)) ;; NB// Wierd conflict error here ;; ;; (let* ((runs-dat (db:get-runs-by-patt db *keys* "%" #f #f #f #f)) ;;====================================================================== ;; A R E A S ;;====================================================================== (define (dashboard:init-area data area-name apath) (let* ((mtconffile (conc area-name "/megatest.config")) (mtconf (read-config mtconffile (make-hash-table) #f)) ;; megatest.config |
︙ |
Modified db.scm from [63924d8931] to [524fbe8f76].
︙ | |||
164 165 166 167 168 169 170 | 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | - - - + + + - - - + + + - - - - - + + + + + + + + - - - - - - + + + + + + | (sqlite3:execute db (conc "PRAGMA synchronous = " (or syncprag 1) ";")))) ;; open an sql database inside a file lock ;; ;; returns: db existed-prior-to-opening ;; (define (db:lock-create-open fname initproc area-dat) |
︙ | |||
205 206 207 208 209 210 211 | 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | - + | (inmem (if local #f (db:open-inmem-db))) (refdb (if local #f (db:open-inmem-db))) (db (db:lock-create-open dbpath ;; this is the database physically on disk (lambda (db) (handle-exceptions exn (begin |
︙ | |||
494 495 496 497 498 499 500 | 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 | - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + - - - - + + + + | '("description" #f) '("reviewed" #f) '("iterated" #f) '("avg_runtime" #f) '("avg_disk" #f) '("tags" #f) '("jobgroup" #f))))) |
︙ | |||
1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 | 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 | + + + + + + + + + + + + + + + + | (lambda (a . x) (set! res (cons (apply vector a x) res))) db qrystr ))) (debug:print-info 11 "db:get-runs END qrystr: " qrystr " keypatts: " keypatts " offset: " offset " limit: " count) (vector header res))) (define (db:get-changed-run-ids since-time) (let* ((dbdir (db:dbfile-path #f)) ;; (configf:lookup *configdat* "setup" "dbdir")) (alldbs (glob (conc dbdir "/[0-9]*.db"))) (changed (filter (lambda (dbfile) (> (file-modification-time dbfile) since-time)) alldbs))) (delete-duplicates (map (lambda (dbfile) (let* ((res (string-match ".*\\/(\\d)*\\.db" dbfile))) (if res (string->number (cadr res)) (begin (debug:print 2 "WARNING: Failed to process " dbfile " for run-id") 0)))) changed)))) ;; db:get-runs-by-patt ;; get runs by list of criteria ;; register a test run with the db ;; ;; Use: (db:get-value-by-header (db:get-header runinfo)(db:get-rows runinfo)) ;; to extract info from the structure returned |
︙ | |||
1737 1738 1739 1740 1741 1742 1743 | 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 | - + | (runs-info '())) ;; First get all the runname/run-ids (db:delay-if-busy dbdat area-dat) (sqlite3:for-each-row (lambda (run-id runname) (set! runs-info (cons (list run-id runname) runs-info))) db |
︙ | |||
1776 1777 1778 1779 1780 1781 1782 | 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 | - - + + + | ;; db:get-runs-by-patt ;; get runs by list of criteria ;; register a test run with the db ;; ;; Use: (db:get-value-by-header (db:get-header runinfo)(db:get-rows runinfo)) ;; to extract info from the structure returned ;; |
︙ |
Modified megatest-version.scm from [01cc069134] to [3b8d26b409].
1 2 3 4 5 | 1 2 3 4 5 6 7 | - + | ;; Always use two or four digit decimal ;; 1.01, 1.02...1.10,1.11,1,1101 ... 1.99,2.00.. (declare (unit megatest-version)) |
Modified megatest.scm from [f474381aa6] to [2ea3890129].
︙ | |||
141 142 143 144 145 146 147 148 149 150 151 152 153 154 | 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | + + | -list-db-targets : list the target combinations used in the db -show-config : dump the internal representation of the megatest.config file -show-runconfig : dump the internal representation of the runconfigs.config file -dumpmode json : dump in json format instead of sexpr -show-cmdinfo : dump the command info for a test (run in test environment) -section sectionName -var varName : for config and runconfig lookup value for sectionName varName -since N : get list of runs changed since time N (Unix seconds) -fields fieldspec : fields to include in json dump; runs:id,runame+tests:testname+steps Misc -start-dir path : switch to this directory before running megatest -rebuild-db : bring the database schema up to date -cleanup-db : remove any orphan records, vacuum the db -import-megatest.db : migrate a database from v1.55 series to v1.60 series -sync-to-megatest.db : migrate data back to megatest.db |
︙ | |||
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 | + + | "-dumpmode" "-run-id" "-ping" "-refdb2dat" "-o" "-log" "-archive" "-since" "-fields" ) (list "-h" "-help" "--help" "-version" "-force" "-xterm" "-showkeys" "-show-keys" |
︙ | |||
322 323 324 325 326 327 328 | 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 | - + - - - - - | (make-thread (lambda () (thread-sleep! 0.05) ;; delay for startup ;; the query to get megatest-db setting might not work, forcing it to be default on. Use "no" to turn off (let ((legacy-sync (configf:lookup (megatest:area-configdat *area-dat*) "setup" "megatest-db")) (debug-mode (debug:debug-mode 1)) (last-time (current-seconds))) |
︙ | |||
750 751 752 753 754 755 756 | 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 | + + - - - - + + + + + + + + | ;;====================================================================== ;; Weird special calls that need to run *after* the server has started? ;;====================================================================== (if (args:get-arg "-list-targets") (let ((targets (common:get-runconfig-targets))) (print "Found "(length targets) " targets") (case (string->symbol (or (args:get-arg "-dumpmode") "alist")) ((alist) |
︙ | |||
785 786 787 788 789 790 791 | 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 | - + | ((and (args:get-arg "-section") (args:get-arg "-var")) (let ((val (configf:lookup data (args:get-arg "-section")(args:get-arg "-var")))) (if val (print val)))) ((not (args:get-arg "-dumpmode")) (pp (hash-table->alist data))) ((string=? (args:get-arg "-dumpmode") "json") |
︙ | |||
811 812 813 814 815 816 817 | 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 | - - + + | (json-write data)) (else (debug:print 0 "ERROR: -dumpmode of " (args:get-arg "-dumpmode") " not recognised"))) (set! *didsomething* #t) (pop-directory))) (if (args:get-arg "-show-cmdinfo") |
︙ | |||
898 899 900 901 902 903 904 905 906 907 908 909 910 911 | 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 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 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 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 | + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + - - - - + + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + - - - + + + + + - - - - + + + + + + + + + + + + + | (print (rmt:get-run-status run-id)) ))))) *area-dat*)) ;;====================================================================== ;; Query runs ;;====================================================================== ;; -fields runs:id,target,runname,comment+tests:id,testname,item_path+steps ;; ;; csi> (extract-fields-constraints "runs:id,target,runname,comment+tests:id,testname,item_path+steps") ;; => (("runs" "id" "target" "runname" "comment") ("tests" "id" "testname" "item_path") ("steps")) ;; ;; NOTE: remember that the cdr will be the list you expect (cdr ("runs" "id" "target" "runname" "comment")) => ("id" "target" "runname" "comment") ;; and so alist-ref will yield what you expect ;; (define (extract-fields-constraints fields-spec) (map (lambda (table-spec) ;; runs:id,target,runname (let ((dat (string-split table-spec ":"))) ;; ("runs" "id,target,runname") (if (> (length dat) 1) (cons (car dat)(string-split (cadr dat) ",")) ;; "id,target,runname" dat))) (string-split fields-spec "+"))) (define (get-value-by-fieldname datavec test-field-index fieldname) (let ((indx (hash-table-ref/default test-field-index fieldname #f))) (if indx (if (>= indx (vector-length datavec)) #f ;; index to high, should raise an error I suppose (vector-ref datavec indx)) #f))) ;; NOTE: list-runs and list-db-targets operate on local db!!! ;; (if (or (args:get-arg "-list-runs") (args:get-arg "-list-db-targets")) (if (launch:setup-for-run *area-dat*) (let* ((dbstruct (make-dbr:dbstruct path: (megatest:area-path *area-dat*) local: #t)) |
︙ | |||
1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 | 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 | + + + + + + + + + + + | (tdb:step-get-event_time step))) steps))))))))) tests))))) runs) (if (eq? dmode 'json)(json-write data)) (set! *didsomething* #t)))) ;; Don't think I need this. Incorporated into -list-runs instead ;; ;; (if (and (args:get-arg "-since") ;; (launch:setup-for-run)) ;; (let* ((since-time (string->number (args:get-arg "-since"))) ;; (run-ids (db:get-changed-run-ids since-time))) ;; ;; (rmt:get-tests-for-runs-mindata run-ids testpatt states status not-in) ;; (print (sort run-ids <)) ;; (set! *didsomething* #t))) ;;====================================================================== ;; full run ;;====================================================================== ;; get lock in db for full run for this directory ;; for all tests with deps ;; walk tree of tests to find head tasks |
︙ |
Modified mt.scm from [2d7efc3765] to [e14091cd45].
︙ | |||
39 40 41 42 43 44 45 | 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 | - + - + | ;; get runs by list of criteria ;; register a test run with the db ;; ;; Use: (db-get-value-by-header (db:get-header runinfo)(db:get-rows runinfo)) ;; to extract info from the structure returned ;; (define (mt:get-runs-by-patt keys runnamepatt targpatt) |
︙ |
Modified rmt.scm from [c71f3c783b] to [8d17aa6591].
︙ | |||
557 558 559 560 561 562 563 | 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | - + | (define (rmt:set-run-status run-id run-status area-dat #!key (msg #f)) (rmt:send-receive 'set-run-status #f (list run-id run-status msg) area-dat)) (define (rmt:update-run-event_time run-id area-dat) (rmt:send-receive 'update-run-event_time #f (list run-id) area-dat)) |
︙ |
Modified tests.scm from [b503dc41c3] to [7f981c8a71].
︙ | |||
137 138 139 140 141 142 143 | 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | - + | (define (tests:check-waiver-eligibility testdat prev-testdat area-dat) (let* ((test-registry (make-hash-table)) (testconfig (tests:get-testconfig (db:test-get-testname testdat) test-registry #f area-dat)) (test-rundir ;; (sdb:qry 'passstr (db:test-get-rundir testdat)) ;; ) (prev-rundir ;; (sdb:qry 'passstr (db:test-get-rundir prev-testdat)) ;; ) |
︙ |
Modified tests/fullrun/megatest.config from [28073f7970] to [a0ee46acbe].
︙ | |||
26 27 28 29 30 31 32 | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | + - + + + | # turn off faststart, put monitor.db in MT_RUN_AREA_HOME/db # and set the dbdir to /var/tmp/$USER/mt_db to enable keeping # the raw db in /var/tmp/$USER # faststart no monitordir #{getenv MT_RUN_AREA_HOME}/db dbdir #{getenv MT_RUN_AREA_HOME}/db |
︙ | |||
101 102 103 104 105 106 107 108 109 110 111 112 113 114 | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | + + + + + + + + | state start end 0 1 - 2 status pass fail n/a 0 1 running - 2 # These are set before all tests, override them # in the testconfig [pre-launch-env-overrides] section [env-override] ALL_TOPLEVEL_TESTS exit_0 exit_1 ez_exit2_fail ez_fail ez_pass ezlog_fail \ ezlog_fail_then_pass ezlog_pass ezlog_warn lineitem_fail lineitem_pass logpro_required_fail \ manual_example neverrun priority_1 priority_10 priority_10_waiton_1 \ priority_3 priority_4 priority_5 priority_6 priority_7 priority_8 \ priority_9 runfirst singletest singletest2 sqlitespeed test_mt_vars \ ez_fail_quick test1 test2 # This variable is honored by the loadrunner script. The value is in percent MAX_ALLOWED_LOAD 200 # MT_XTERM_CMD overrides the terminal command # MT_XTERM_CMD xterm -bg lightgreen -fg black SPECIAL_ENV_VARS overide them here - should be seen at launch and in the runs |
︙ |
Modified tests/fullrun/tests/all_toplevel/calcresults.logpro from [dfb57c6b97] to [7bd9c74d1a].
︙ | |||
11 12 13 14 15 16 17 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | - + - + | ("ez_pass" 1 20) ("lineitem_pass" 1 20) ("priority_1" 1 20) ("priority_10" 1 20) ("priority_10_waiton_1" 1 20) ("priority_3" 1 20) ("priority_4" 1 20) |
︙ | |||
38 39 40 41 42 43 44 45 46 47 48 | 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 | + - + + + - + + + + + | ("ezlog_fail" 1 20) ("lineitem_fail" 1 20) ("logpro_required_fail" 1 20) ("manual_example" 1 20) ("neverrun" 1 20))) (define warn-specs '(("ezlog_warn" 1 20))) (define nost-specs '(("wait_no_items1" 1 20) ("wait_no_items2" 1 20) ("wait_no_items3" 1 20) ("wait_no_items4" 1 20) |
︙ | |||
79 80 81 82 83 84 85 | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | - + | (for-each (lambda (testdat) (apply check-one-test "COMPLETED" "WARN" testdat)) warn-specs) (for-each (lambda (testdat) |
︙ |
Modified tests/fullrun/tests/all_toplevel/testconfig from [c99d8b6dbc] to [deabaf2573].
1 2 3 4 | 1 2 3 4 5 6 7 8 | - + - - - - - | [ezsteps] calcresults megatest -list-runs $MT_RUNNAME -target $MT_TARGET [requirements] |
Added tests/fullrun/tests/db_sync/calcresults.logpro version [2b1b84e89b].
|
Added tests/fullrun/tests/db_sync/dbdelta.scm version [5e038e3a3e].
|
Added tests/fullrun/tests/db_sync/getdbdir.scm version [2bb1c2296a].
1 | + | (db:dbfile-path #f) |
Added tests/fullrun/tests/db_sync/showdiff.logpro version [95bed654bf].
|
Added tests/fullrun/tests/db_sync/testconfig version [f92575e768].
|