Changes In Branch reorg-runs-code Through [6fddca5ea1] Excluding Merge-Ins
This is equivalent to a diff from d1ee9f149a to 6fddca5ea1
2011-11-26
| ||
10:13 | Tidied up start test messages a little Closed-Leaf check-in: 346d7c3282 user: matt tags: reorg-runs-code | |
09:50 | Got items back check-in: 6fddca5ea1 user: matt tags: reorg-runs-code | |
2011-11-25
| ||
23:06 | Rework of runs proceeding... it now compiles check-in: 6c65b71621 user: matt tags: reorg-runs-code | |
2011-11-16
| ||
21:31 | Reorg'd code worked fine. Pulling the basic reorg back to trunk. Next batch of changes won't be so kind :) check-in: 47e2caaf9c user: matt tags: trunk | |
20:51 | Reorg runs code start check-in: aaf143afd7 user: matt tags: reorg-runs-code | |
10:49 | Fixed dashboard failing to update sometimes, minor tweak to Makefile check-in: d1ee9f149a user: mrwellan tags: trunk | |
2011-11-15
| ||
21:48 | Improved ez test tests and mt_ezstep script check-in: 1bb1c0782c user: matt tags: trunk | |
Modified Makefile from [ecff33bacb] to [6815fb2e48].
1 2 3 4 5 6 | 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 40 41 42 | + - + - + - - - - + + + + + - + | PREFIX=. CSCOPTS= SRCFILES = common.scm items.scm launch.scm \ ods.scm runconfig.scm server.scm configf.scm \ db.scm keys.scm margs.scm megatest-version.scm \ |
︙ |
Modified configf.scm from [ef264b880e] to [a8e7a14c9a].
︙ | |||
74 75 76 77 78 79 80 | 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 | + - - - - - - - - - - + + + + + + + + + + - + + + + + | (blank-l-rx _ (loop (read-line inp) curr-section-name #f #f)) (include-rx ( x include-file ) (begin (read-config include-file res allow-system environ-patt: environ-patt) (loop (read-line inp) curr-section-name #f #f))) (section-rx ( x section-name ) (loop (read-line inp) section-name #f #f)) (key-sys-pr ( x key cmd ) (if allow-system (let ((alist (hash-table-ref/default res curr-section-name '())) (val-proc (lambda () |
︙ |
Modified dashboard.scm from [55452f0f20] to [16c17747cc].
︙ | |||
451 452 453 454 455 456 457 | 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 | - + + | (define (update-search x val) ;; (print "Setting search for " x " to " val) (hash-table-set! *searchpatts* x val)) (define (mark-for-update) (set! *last-db-update-time* 0) |
︙ |
Modified db.scm from [65214cf6f3] to [6268431c21].
︙ | |||
36 37 38 39 40 41 42 | 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 | - - + + - - - - - - - - - - - + + + + + + + + + + + - + | (let* ((keys (config-get-fields configdat)) (havekeys (> (length keys) 0)) (keystr (keys->keystr keys)) (fieldstr (keys->key/field keys))) (for-each (lambda (key) (let ((keyn (vector-ref key 0))) (if (member (string-downcase keyn) |
︙ | |||
111 112 113 114 115 116 117 118 119 120 121 122 123 124 | 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | + | owner TEXT DEFAULT '', description TEXT DEFAULT '', reviewed TIMESTAMP, iterated TEXT DEFAULT '', avg_runtime REAL, avg_disk REAL, tags TEXT DEFAULT '', jobgroup TEXT DEFAULT 'default', CONSTRAINT test_meta_constraint UNIQUE (testname));") (sqlite3:execute db "CREATE TABLE IF NOT EXISTS test_data (id INTEGER PRIMARY KEY, test_id INTEGER, category TEXT DEFAULT '', variable TEXT, value REAL, expected REAL, |
︙ | |||
171 172 173 174 175 176 177 | 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | - - - - - - - + + + + + + + | (patch-db)) ((< mver 1.21) (sqlite3:execute db "DROP TABLE IF EXISTS metadat;") (sqlite3:execute db "CREATE TABLE IF NOT EXISTS metadat (id INTEGER, var TEXT, val TEXT, CONSTRAINT metadat_constraint UNIQUE (var));") (db:set-var db "MEGATEST_VERSION" 1.21) ;; set before, just in case the changes are already applied (sqlite3:execute db test-meta-def) |
︙ | |||
205 206 207 208 209 210 211 212 213 214 215 216 217 218 | 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | + + + | (db:set-var db "MEGATEST_VERSION" 1.27) (sqlite3:execute db "ALTER TABLE test_data ADD COLUMN type TEXT DEFAULT '';") (patch-db)) ((< mver 1.29) (db:set-var db "MEGATEST_VERSION" 1.29) (sqlite3:execute db "ALTER TABLE test_steps ADD COLUMN logfile TEXT DEFAULT '';") (sqlite3:execute db "ALTER TABLE tests ADD COLUMN shortdir TEXT DEFAULT '';")) ((< mver 1.36) (db:set-var db "MEGATEST_VERSION" 1.36) (sqlite3:execute db "ALTER TABLER test_meta ADD COLUMN jobgroup TEXT DEFAULT 'default';")) ((< mver megatest-version) (db:set-var db "MEGATEST_VERSION" megatest-version)))))) ;;====================================================================== ;; meta get and set vars ;;====================================================================== |
︙ | |||
254 255 256 257 258 259 260 | 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 | - + | (if (null? header) #f (let loop ((hed (car header)) (tal (cdr header)) (n 0)) (if (equal? hed field) (vector-ref row n) (if (null? tal) #f (loop (car tal)(cdr tal)(+ n 1))))))) |
︙ | |||
361 362 363 364 365 366 367 | 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 | - - + + | ;; states and statuses are required to be lists, empty is ok (define (db-get-tests-for-run db run-id testpatt itempatt states statuses) (let ((res '()) (states-str (conc "('" (string-intersperse states "','") "')")) (statuses-str (conc "('" (string-intersperse statuses "','") "')")) ) (sqlite3:for-each-row |
︙ | |||
391 392 393 394 395 396 397 | 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 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 | - - - + + + + + + + + + + + + + + + + | ;; set tests with state currstate and status currstatus to newstate and newstatus ;; use currstate = #f and or currstatus = #f to apply to any state or status respectively ;; WARNING: SQL injection risk (define (db:set-tests-state-status db run-id testnames currstate currstatus newstate newstatus) (for-each (lambda (testname) (let ((qry (conc "UPDATE tests SET state=?,status=? WHERE " |
︙ | |||
453 454 455 456 457 458 459 | 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 | - + - + | res)) (define (db:test-set-comment db run-id testname item-path comment) (sqlite3:execute db "UPDATE tests SET comment=? WHERE run_id=? AND testname=? AND item_path=?;" |
︙ | |||
517 518 519 520 521 522 523 | 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 | - - - + + + | (debug:print 4 "BEFORE: category: " category " variable: " variable " value: " value ", expected: " expected " tol: " tol " units: " units " status: " status " comment: " comment) (if (and (or (not expected)(equal? expected "")) (or (not tol) (equal? expected "")) (or (not units) (equal? expected ""))) (let-values (((new-expected new-tol new-units)(db:get-prev-tol-for-test db test-id category variable))) |
︙ | |||
541 542 543 544 545 546 547 | 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 | - + | ((<) (if (< value expected) "pass" "fail")) ((>=) (if (>= value expected) "pass" "fail")) ((<=) (if (<= value expected) "pass" "fail")) (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) (sqlite3:execute db "INSERT OR REPLACE INTO test_data (test_id,category,variable,value,expected,tol,units,comment,status) VALUES (?,?,?,?,?,?,?,?,?);" |
︙ | |||
569 570 571 572 573 574 575 | 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 | - + | (if (not (eof-object? lin)) (begin (debug:print 4 lin) (db:csv->test-data db test-id lin) (loop (read-line)))))) ;; roll up the current results. (db:test-data-rollup db test-id))) |
︙ | |||
605 606 607 608 609 610 611 | 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 | - + | (values #f #f #f)) ;;====================================================================== ;; S T E P S ;;====================================================================== (define (db:step-get-time-as-string vec) |
︙ | |||
659 660 661 662 663 664 665 | 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 | - - - + + + | ", get-status: " (db:step-get-status step)) (if (and (number? startt)(number? endt)) (seconds->hr-min-sec (- endt startt)) "-1"))) (if (> (string-length (db:step-get-logfile step)) 0) (vector-set! record 5 (db:step-get-logfile step)))) (else |
︙ | |||
696 697 698 699 700 701 702 703 704 705 706 707 708 709 | 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | (if (not (and (equal? (db:test-get-state test) "COMPLETED") (member (db:test-get-status test) '("PASS" "WARN" "CHECK")))) (set! result (cons waitontest-name result)))))) tests) (if (not ever-seen)(set! result (cons waitontest-name result))))) waiton) (delete-duplicates result)))) ;; the new prereqs calculation, looks also at itempath if specified ;; all prereqs must be met: ;; if prereq test with itempath='' is COMPLETED and PASS, WARN, CHECK, or WAIVED then prereq is met ;; if prereq test with itempath=ref-item-path and COMPLETED with PASS, WARN, CHECK, or WAIVED then prereq is met (define (db:get-prereqs-not-met db run-id waitons ref-item-path) (if (or (not waitons) (null? waitons)) '() (let* ((unmet-pre-reqs '()) (result '())) (for-each (lambda (waitontest-name) ;; by getting the tests with matching name we are looking only at the matching test ;; and related sub items (let ((tests (db-get-tests-for-run db run-id waitontest-name #f '() '())) (ever-seen #f) (parent-waiton-met #f) (item-waiton-met #f)) (for-each (lambda (test) ;; (if (equal? waitontest-name (db:test-get-testname test)) ;; by defintion this had better be true ... (let* ((state (db:test-get-state test)) (status (db:test-get-status test)) (item-path (db:test-get-item-path test)) (is-completed (equal? state "COMPLETED")) (is-ok (member status '("PASS" "WARN" "CHECK" "WAIVED"))) (same-itempath (equal? ref-item-path item-path))) (set! ever-seen #t) (cond ;; case 1, non-item (parent test) is ((and (equal? item-path "") ;; this is the parent test is-completed is-ok) (set! parent-waiton-met #t)) ((and same-itempath is-completed is-ok) (set! item-waiton-met #t))))) tests) (if (not (or parent-waiton-met item-waiton-met)) (set! result (cons waitontest-name result))) ;; if the test is not found then clearly the waiton is not met... (if (not ever-seen)(set! result (cons waitontest-name result))))) waitons) (delete-duplicates result)))) ;;====================================================================== ;; Extract ods file from the db ;;====================================================================== ;; runspatt is a comma delimited list of run patterns ;; keypatt-alist must contain *all* keys with an associated pattern: '( ("KEY1" "%") .. ) |
︙ | |||
739 740 741 742 743 744 745 | 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 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 860 861 862 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + | (results (list runsheader)) (testdata-header (list "Run Id" "Testname" "Item Path" "Category" "Variable" "Value" "Expected" "Tol" "Units" "Status" "Comment"))) (debug:print 2 "Using " tempdir " for constructing the ods file. keyqry: " keyqry " keystr: " keysstr " with keys: " (map cadr keypatt-alist)) ;; "Expected Value" ;; "Value Found" ;; "Tolerance" (apply sqlite3:for-each-row |
︙ |
Modified docs/megatest.lyx from [d71eb3594c] to [8cf3af19a7].
︙ | |||
283 284 285 286 287 288 289 | 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 | - + - - - - - + + + + | \end_layout \begin_layout Standard \begin_inset VSpace medskip \end_inset This document is believed to be acurate at the time of writing but as with |
︙ | |||
457 458 459 460 461 462 463 | 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 | + - - + + - - | \begin_layout Subsection Megatest design philosophy \end_layout \begin_layout Standard Megatest is intended to provide the minimum needed resources to make writing a suite of tests and implementing continuous build for software, design |
︙ | |||
1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 | 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 | + + + + + + + + + + + + + + + + + + + | \begin_layout Section Monitor based running \end_layout \begin_layout Subsection Monitor logic \end_layout \begin_layout Standard Note: The monitor is usable but incomplete as of Megatest v1.31. Click on the \begin_inset Quotes eld \end_inset Monitor \begin_inset Quotes erd \end_inset button on the dashboard to start the monitor and give it a try. \end_layout \begin_layout Standard \begin_inset Graphics filename monitor-state-diagram.svg \end_inset \end_layout \begin_layout Section Reference \end_layout \begin_layout Subsection Configuration file Syntax \end_layout \begin_layout Standard Note: whitespace is preserved including at the end of line. Ensure your entries only have whitespace at the end of line when needed to avoid problems. \end_layout \begin_layout Subsubsection Sections \end_layout \begin_layout Standard \begin_inset listings |
︙ | |||
2006 2007 2008 2009 2010 2011 2012 | 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 | - + | \begin_layout Subsection megatest.config \end_layout \begin_layout Standard \begin_inset Tabular |
︙ | |||
2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 | 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | <cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout \end_layout \end_inset </cell> </row> <row> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout [jobgroups] \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout string of letters, numbers and underscore \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout number \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout no \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout Control number of jobs allowed to concurrently run in categories. See [jobgroup] in testconfig \end_layout \end_inset </cell> </row> <row> <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text |
︙ | |||
2741 2742 2743 2744 2745 2746 2747 | 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 | - + | \begin_layout Subsubsection testconfig file \end_layout \begin_layout Standard \begin_inset Tabular |
︙ | |||
2892 2893 2894 2895 2896 2897 2898 | 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 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - + + + - | PASS \end_layout \end_inset </cell> </row> <row> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout jobgroup \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout \end_layout \end_inset </cell> </row> <row> |
︙ | |||
3868 3869 3870 3871 3872 3873 3874 | 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 | - + | \end_inset </cell> <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout |
︙ |
Added docs/monitor-state-diagram.svg version [5c370cf9de].