Overview
Comment: | Merged in v1.60 but not cleaned up |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | multi-area |
Files: | files | file ages | folders |
SHA1: |
c418c9c6fbadb460bd9ebe88d8d02496 |
User & Date: | matt on 2015-06-16 22:40:54 |
Other Links: | branch diff | manifest | tags |
Context
2015-06-16
| ||
22:40 | Merged in v1.60 but not cleaned up Closed-Leaf check-in: c418c9c6fb user: matt tags: multi-area | |
00:07 | Mulit-dboard, attempt2. check-in: 38bb3b9948 user: matt tags: v1.60 | |
2015-06-04
| ||
23:09 | Merged in v1.60 check-in: a7184bad29 user: matt tags: multi-area | |
Changes
Modified .fossil-settings/ignore-glob from [32534fbc23] to [4907666f99].
︙ | |||
37 38 39 40 41 42 43 | 37 38 39 40 41 42 43 44 45 46 | + + + | tests/installall/megatest.db tests/installall/monitor.db tests/megatest.db tests/fdktestqa/simplelinks/* tests/fdktestqa/testqa/megatest.db tests/fdktestqa/testqa/monitor.db megatest-fossil-hash.scm tests/release/runs/* tests/release/links/* tests/release/megatest.db |
Modified api.scm from [9b234ec5e5] to [78a6b34423].
︙ | |||
38 39 40 41 42 43 44 45 46 47 48 49 50 51 | 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | + | get-run-status register-run get-tests-for-run get-test-id get-tests-for-runs-mindata get-run-name-from-id get-runs get-num-runs get-all-run-ids get-prev-run-ids get-run-ids-matching-target get-runs-by-patt get-steps-data get-steps-for-test login |
︙ | |||
172 173 174 175 176 177 178 179 180 181 182 183 184 185 | 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | + + | ;;====================================================================== ;; READ ONLY QUERIES ;;====================================================================== ;; KEYS ((get-key-val-pairs) (apply db:get-key-val-pairs dbstruct area-dat params)) ((get-keys) (db:get-keys dbstruct area-dat)) ((get-key-vals) (apply db:get-key-vals dbstruct params)) ((get-targets) (db:get-targets dbstruct)) ;; ARCHIVES ((test-get-archive-block-info) (apply db:test-get-archive-block-info dbstruct area-dat params)) ;; TESTS ((test-toplevel-num-items) (apply db:test-toplevel-num-items dbstruct area-dat params)) ((get-test-info-by-id) (apply db:get-test-info-by-id dbstruct area-dat params)) |
︙ | |||
204 205 206 207 208 209 210 211 212 213 214 215 216 217 | 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | + | ((get-run-status) (apply db:get-run-status dbstruct area-dat params)) ((set-run-status) (apply db:set-run-status dbstruct area-dat params)) ((get-tests-for-run) (apply db:get-tests-for-run dbstruct area-dat params)) ((get-test-id) (apply db:get-test-id dbstruct area-dat params)) ((get-tests-for-run-mindata) (apply db:get-tests-for-run-mindata dbstruct area-dat params)) ((get-runs) (apply db:get-runs dbstruct area-dat params)) ((get-all-run-ids) (db:get-all-run-ids dbstruct area-dat)) ((get-num-runs) (apply db:get-num-runs dbstruct params)) ((get-prev-run-ids) (apply db:get-prev-run-ids dbstruct area-dat params)) ((get-run-ids-matching-target) (apply db:get-run-ids-matching-target dbstruct area-dat params)) ((get-runs-by-patt) (apply db:get-runs-by-patt dbstruct area-dat params)) ((get-run-name-from-id) (apply db:get-run-name-from-id dbstruct area-dat params)) ;; STEPS ((get-steps-data) (apply db:get-steps-data dbstruct area-dat params)) |
︙ |
Modified bin/sleeprunner from [7ef4797782] to [64ce489f3b].
1 2 3 | 1 2 3 4 5 6 7 | - + | #!/bin/bash if [[ $SLEEPRUNNER == "" ]];then |
Modified common.scm from [8c0414434e] to [d360fbbd6b].
︙ | |||
426 427 428 429 430 431 432 | 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 | + + - + + - + | "disks" '("none" ""))) ;;====================================================================== ;; T A R G E T S ;;====================================================================== (define (common:args-get-target #!key (split #f)) (let* ((keys (keys:config-get-fields *configdat*)) (numkeys (length keys)) |
︙ |
Modified dashboard-tests.scm from [d0c66f198a] to [3d42f5226e].
︙ | |||
93 94 95 96 97 98 99 | 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | - + | (iup:label "TestComment " #:expand "HORIZONTAL") (lambda (testdat) (let ((newcomment (db:test-get-comment testdat))) (if *dashboard-comment-share-slot* (if (not (equal? (iup:attribute *dashboard-comment-share-slot* "VALUE") newcomment)) |
︙ | |||
416 417 418 419 420 421 422 | 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 | - + - + | (exit 1)) (let* (;; (run-id (if testdat (db:test-get-run_id testdat) #f)) (keydat (if testdat (db:get-key-val-pairs dbstruct run-id) #f)) (rundat (if testdat (db:get-run-info dbstruct run-id) #f)) (runname (if testdat (db:get-value-by-header (db:get-rows rundat) (db:get-header rundat) "runname") #f)) |
︙ | |||
461 462 463 464 465 466 467 | 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 | - - - - - - + + + + + + | (conc "-e " (get-environment-variable "SHELL")) ""))) (system (conc "cd " rundir ";mt_xterm -T \"" (string-translate testfullname "()" " ") "\" " shell "&"))) (message-window (conc "Directory " rundir " not found"))))) (widgets (make-hash-table)) (refreshdat (lambda () |
︙ | |||
693 694 695 696 697 698 699 | 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 | - + + | (db:test-data-get-value x) (db:test-data-get-expected x) (db:test-data-get-tol x) (db:test-data-get-status x) (db:test-data-get-units x) (db:test-data-get-type x) (db:test-data-get-comment x))) |
︙ |
Modified dashboard.scm from [0d13806013] to [5e8da2e6dc].
︙ | |||
66 67 68 69 70 71 72 73 74 75 76 77 78 79 | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | + + + + + + + + + + | (exit))) ;; (if (args:get-arg "-host") ;; (begin ;; (set! (common:get-remote remote) (string-split (args:get-arg "-host" ":"))) ;; (client:launch)) ;; (client:launch)) (define *useserver* (or (args:get-arg "-use-server") (configf:lookup *configdat* "dashboard" "use-server"))) (define *keys* (if *useserver* (rmt:get-keys) (db:get-keys *dbstruct-local*))) (define *tot-run-count* (if *useserver* (rmt:get-num-runs "%") (db:get-num-runs *dbstruct-local* "%"))) ;; ease debugging by loading ~/.dashboardrc (let ((debugcontrolf (conc (get-environment-variable "HOME") "/.dashboardrc"))) (if (file-exists? debugcontrolf) (load debugcontrolf))) (define *runremote* #f) |
︙ | |||
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 | 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 | + + + + + + + + + + + + + + + + + + + + + + + | (iup:attribute-set! lb "VALUE" item))) ;; (number->string i)))) (set! i (+ i 1))) items) i)) (define (pad-list l n)(append l (make-list (- n (length l))))) (allruns (if *useserver* (rmt:get-runs runnamepatt numruns *start-run-offset* keypatts) (db:get-runs *dbstruct-local* runnamepatt numruns ;; (+ numruns 1) ;; (/ numruns 2)) *start-run-offset* keypatts))) (tests (if *useserver* (rmt:get-tests-for-run run-id testnamepatt states statuses #f #f *hide-not-hide* sort-by sort-order 'shortlist) (db:get-tests-for-run *dbstruct-local* run-id testnamepatt states statuses #f #f *hide-not-hide* sort-by sort-order 'shortlist))) (key-vals (if *useserver* (rmt:get-key-vals run-id) (db:get-key-vals *dbstruct-local* run-id)))) (define (mkstr . x) (string-intersperse (map conc x) ",")) (define (update-search x val) (hash-table-set! *searchpatts* x val)) ;;====================================================================== ;; T E S T S ;;====================================================================== (db-target-dat (if *useserver* (rmt:get-targets) (db:get-targets *dbstruct-local*))) ;; Test browser (define (dashboard:tree-browser data adat window-id) ;; (iup:split (let* ((tb (iup:treebox #:selection-cb (lambda (obj id state) |
︙ | |||
215 216 217 218 219 220 221 222 223 224 225 226 227 228 | 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 | + + + | ;;====================================================================== ;; 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)) (runs-for-targ (if *useserver* (rmt:get-runs-by-patt *keys* "%" target #f #f #f) (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 |
︙ | |||
246 247 248 249 250 251 252 253 254 255 256 257 258 259 | 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 | + + + + | ;; NB// Wierd conflict error here ;; ;; (let* ((runs-dat (db:get-runs-by-patt db *keys* "%" #f #f #f #f)) ;;====================================================================== ;; A R E A S ;;====================================================================== (if (number? run-id) (dashboard:update-run-summary-tab)) (debug:print 0 "ERROR: tree-path->run-id returned non-number " run-id))) ))) (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 (area-dat (let ((ad (make-megatest:area area-name ;; area name apath ;; path to area |
︙ | |||
336 337 338 339 340 341 342 | 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 | - + + + + | ;; (states '()) ;; (statuses '()) (nextmintime (current-milliseconds))) (dboard:data-current-window-id-set! data (+ 1 (dboard:data-current-window-id data))) ;; (dboard:data-set-runs! *data* data) ;; make this data available to the rest of the application (iup:show (dashboard:main-panel data (dboard:data-current-window-id data))) ;; Yes, running iup:show will pop up a new panel |
︙ |
Modified db.scm from [524fbe8f76] to [db0d63a8d0].
︙ | |||
1348 1349 1350 1351 1352 1353 1354 | 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 | - + + + + + | ;; Now do rollups for the toplevel tests ;; (db:delay-if-busy dbdat area-dat) (for-each (lambda (toptest) (let ((test-name (list-ref toptest 3))) ;; (run-id (list-ref toptest 5))) |
︙ | |||
2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 | 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 | + + + + + + + + + + + + + + | (else (conc "ERROR: bad tol comparator " tol)))))) (debug:print 4 "AFTER2: category: " category " variable: " variable " value: " value ", expected: " expected " tol: " tol " units: " units " status: " status " comment: " comment) (db:delay-if-busy dbdat area-dat) (sqlite3:execute db "INSERT OR REPLACE INTO test_data (test_id,category,variable,value,expected,tol,units,comment,status,type) VALUES (?,?,?,?,?,?,?,?,?,?);" test-id category variable value expected tol units (if comment comment "") status type))) csvlist))) ;; This routine moved from tdb.scm, tdb:read-test-data ;; (define (db:read-test-data dbstruct run-id test-id categorypatt) (let* ((dbdat (db:get-db dbstruct run-id)) (db (db:dbdat-get-db dbdat)) (res '())) (db:delay-if-busy dbdat) (sqlite3:for-each-row (lambda (id test_id category variable value expected tol units comment status type) (set! res (cons (vector id test_id category variable value expected tol units comment status type) res))) db "SELECT id,test_id,category,variable,value,expected,tol,units,comment,status,type FROM test_data WHERE test_id=? AND category LIKE ? ORDER BY category,variable;" test-id categorypatt) (reverse res))) ;;====================================================================== ;; Misc. test related queries ;;====================================================================== (define (db:get-run-ids-matching-target dbstruct area-dat keynames target res runname testpatt statepatt statuspatt) (let* ((dbdat (db:get-db dbstruct area-dat #f)) |
︙ | |||
2822 2823 2824 2825 2826 2827 2828 | 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 | - - + + + + - + - - + + + - - - + + + + + + + - + | (let ((dbdat (db:get-db dbstruct area-dat run-id))) (if (member state '("LAUNCHED" "REMOTEHOSTSTART")) (db:general-call dbdat 'set-test-start-time (list test-id))) (if msg (db:general-call dbdat 'state-status-msg (list state status msg test-id)) (db:general-call dbdat 'state-status (list state status test-id))))) |
︙ | |||
2896 2897 2898 2899 2900 2901 2902 | 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 | - + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | '(tests:test-set-toplog "UPDATE tests SET final_logf=? WHERE run_id=? AND testname=? AND item_path='';") '(update-cpuload-diskfree "UPDATE tests SET cpuload=?,diskfree=? WHERE id=?;") ;; DONE '(update-uname-host "UPDATE tests SET uname=?,host=? WHERE id=?;") ;; DONE '(update-test-state "UPDATE tests SET state=? WHERE state=? AND run_id=? AND testname=? AND NOT (item_path='' AND testname IN (SELECT DISTINCT testname FROM tests WHERE testname=? AND item_path != ''));") '(update-test-status "UPDATE tests SET status=? WHERE status like ? AND run_id=? AND testname=? AND NOT (item_path='' AND testname IN (SELECT DISTINCT testname FROM tests WHERE testname=? AND item_path != ''));") ;; stuff for roll-up-pass-fail-counts '(update-pass-fail-counts "UPDATE tests |
︙ | |||
3148 3149 3150 3151 3152 3153 3154 | 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 | - + + | ;; if prereq test with itempath=ref-item-path and COMPLETED with PASS, WARN, CHECK, or WAIVED then prereq is met ;; ;; Note: mode 'normal means that tests must be COMPLETED and ok (i.e. PASS, WARN, CHECK, SKIP or WAIVED) ;; mode 'toplevel means that tests must be COMPLETED only ;; mode 'itemmatch or 'itemwait means that tests items must be COMPLETED and (PASS|WARN|WAIVED|CHECK) [[ NB// NOT IMPLEMENTED YET ]] ;; ;; (define (db:get-prereqs-not-met dbstruct area-dat run-id waitons ref-item-path mode) |
︙ |
Modified launch.scm from [7b605ded00] to [f126fd594d].
︙ | |||
320 321 322 323 324 325 326 | 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 | + - + | ;; Since we should have a clean slate at this time there is no need to do ;; any of the other stuff that tests:test-set-status! does. Let's just ;; force RUNNING/n/a ;; (thread-sleep! 0.3) (tests:test-force-state-status! run-id test-id "RUNNING" "n/a") ;; (rmt:roll-up-pass-fail-counts run-id test-name item-path "RUNNING" area-dat) |
︙ | |||
858 859 860 861 862 863 864 | 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 | + - + | (begin (debug:print-info 0 "attempting to preclean directory " (db:test-get-rundir testinfo) " for test " test-name "/" item-path) (runs:remove-test-directory testinfo 'remove-data-only))) ;; remove data only, do not perturb the record ;; prevent overlapping actions - set to LAUNCHED as early as possible ;; (tests:test-set-status! run-id test-id "LAUNCHED" "n/a" #f #f) ;; (if launch-results launch-results "FAILED")) ;; (rmt:roll-up-pass-fail-counts run-id test-name item-path "LAUNCHED" area-dat) |
︙ |
Modified megatest-version.scm from [3b8d26b409] to [7d7023c394].
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 [2ea3890129] to [1954318c08].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | + + + + | ;; Copyright 2006-2012, Matthew Welland. ;; ;; This program is made available under the GNU GPL version 2.0 or ;; greater. See the accompanying file COPYING for details. ;; ;; This program is distributed WITHOUT ANY WARRANTY; without even the ;; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ;; PURPOSE. ;; (include "common.scm") ;; (include "megatest-version.scm") (define (toplevel-command . a) #f) (define (toplevel-command . a) #f) ;; fake out readline usage of toplevel-command (define (toplevel-command . a) #f) (use sqlite3 srfi-1 posix regex regex-case srfi-69 base64 readline apropos json http-client directory-utils rpc ;; (srfi 18) extras) http-client srfi-18 extras format) ;; zmq extras) |
︙ | |||
82 83 84 85 86 87 88 | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | - + - - | license GPL, Copyright Matt Welland 2006-2015 Usage: megatest [options] -h : this help -version : print megatest version (currently " megatest-version ") Launching and managing runs |
︙ | |||
294 295 296 297 298 299 300 | 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 | - + + | "-show-config" "-show-cmdinfo" "-get-run-status" ;; queries "-test-paths" ;; get path(s) to a test, ordered by youngest first |
︙ | |||
885 886 887 888 889 890 891 | 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 | - + | (args:get-arg "-get-run-status")) (general-run-call "-set-run-status" "set run status" (lambda (target runname keys keyvals) (let* ((runsdat (rmt:get-runs-by-patt keys runname (common:args-get-target) |
︙ | |||
940 941 942 943 944 945 946 | 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 | - + | (let* ((dbstruct (make-dbr:dbstruct path: (megatest:area-path *area-dat*) local: #t)) (runpatt (args:get-arg "-list-runs")) (testpatt (if (args:get-arg "-testpatt") (args:get-arg "-testpatt") "%")) (keys (db:get-keys dbstruct)) ;; (runsda t (db:get-runs dbstruct runpatt #f #f '())) |
︙ | |||
964 965 966 967 968 969 970 | 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 | - + - - + + | (db-targets (args:get-arg "-list-db-targets")) (seen (make-hash-table)) (dmode (let ((d (args:get-arg "-dumpmode"))) (if d (string->symbol d) #f))) (data (make-hash-table)) (fields-spec (if (args:get-arg "-fields") (extract-fields-constraints (args:get-arg "-fields")) |
︙ | |||
1000 1001 1002 1003 1004 1005 1006 | 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 | - + + + + - + | (db:get-value-by-header run header x)) keys) "/"))) (if db-targets (if (not (hash-table-ref/default seen targetstr #f)) (begin (hash-table-set! seen targetstr #t) ;; (print "[" targetstr "]")))) |
︙ | |||
1139 1140 1141 1142 1143 1144 1145 | 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 | - + | ;; launch task ;; else ;; put task in deferred queue ;; if still ok to run tasks ;; process deferred tasks per above steps ;; run all tests are are Not COMPLETED and PASS or CHECK |
︙ |
Added multi-dboard.scm version [0d13806013].