Overview
Comment: | Merge from v1.55 to development plus some other changes |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | mixed-merge | dev |
Files: | files | file ages | folders |
SHA1: |
b9a4606df412adc84e83f844c6ecf052 |
User & Date: | matt on 2013-06-23 17:11:52 |
Other Links: | branch diff | manifest | tags |
Context
2013-06-23
| ||
17:11 | Merge from v1.55 to development plus some other changes Closed-Leaf check-in: b9a4606df4 user: matt tags: mixed-merge, dev | |
2013-06-22
| ||
20:58 | Added test8 to catch stuck launch issues check-in: 770fb3d129 user: matt tags: dev | |
2013-06-18
| ||
15:43 | The big numbers of items run is working (and exposes a few bugs). Upped timeout so server stalls don't kill the test run check-in: ea8419fe80 user: mrwellan tags: v1.55 | |
Changes
Modified Makefile from [ad5dea3fd5] to [d2bc85de75].
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 | - + | # make install CSCOPTS='-accumulate-profile -profile-name $(PWD)/profile-ww$(shell date +%V.%u)' PREFIX=$(PWD) CSCOPTS= INSTALL=install SRCFILES = common.scm items.scm launch.scm \ ods.scm runconfig.scm server.scm configf.scm \ db.scm keys.scm margs.scm megatest-version.scm \ process.scm runs.scm tasks.scm tests.scm genexample.scm \ fs-transport.scm http-transport.scm \ |
︙ |
Modified dashboard.scm from [d7394c8da8] to [4395c4d695].
︙ | |||
27 28 29 30 31 32 33 34 35 36 37 38 39 40 | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | + | (declare (uses process)) (declare (uses launch)) (declare (uses runs)) (declare (uses dashboard-tests)) (declare (uses dashboard-guimonitor)) ;; (declare (uses dashboard-main)) (declare (uses megatest-version)) (declare (uses mt)) (include "common_records.scm") (include "db_records.scm") (include "run_records.scm") (define help (conc "Megatest Dashboard, documentation at http://www.kiatoa.com/fossils/megatest |
︙ | |||
199 200 201 202 203 204 205 | 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | - + | (set! *last-update* (current-seconds)) (set! *tot-run-count* (length runs)))) ;; ;; trim runs to only those that are changing often here ;; (for-each (lambda (run) (let* ((run-id (db:get-value-by-header run header "id")) |
︙ |
Modified db.scm from [d49da4d572] to [625f685b8f].
1 | 1 2 3 4 5 6 7 8 9 | - + | ;;====================================================================== |
︙ | |||
25 26 27 28 29 30 31 32 33 34 35 36 37 38 | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | + | (declare (unit db)) (declare (uses common)) (declare (uses keys)) (declare (uses ods)) (declare (uses fs-transport)) (declare (uses client)) (declare (uses mt)) (include "common_records.scm") (include "db_records.scm") (include "key_records.scm") (include "run_records.scm") ;; timestamp type (val1 val2 ...) |
︙ | |||
764 765 766 767 768 769 770 | 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 | - - + + - - - + + + - - + + + + + + + + + + + + - - + - - - + + + + + + + + | ;; T E S T S ;;====================================================================== ;; states and statuses are lists, turn them into ("PASS","FAIL"...) and use NOT IN ;; i.e. these lists define what to NOT show. ;; states and statuses are required to be lists, empty is ok ;; not-in #t = above behaviour, #f = must match |
︙ | |||
2033 2034 2035 2036 2037 2038 2039 | 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 | - + | '() (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 |
︙ |
Modified megatest-version.scm from [252b48ae3a] to [76cd76582a].
1 2 3 4 5 | 1 2 3 4 5 6 7 | - + | ;; Always use two digit decimal ;; 1.01, 1.02...1.10,1.11 ... 1.99,2.00.. (declare (unit megatest-version)) |
Modified megatest.scm from [f9a6adce98] to [0890716f13].
︙ | |||
536 537 538 539 540 541 542 | 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 | - + | (if (not (hash-table-ref/default seen targetstr #f)) (begin (hash-table-set! seen targetstr #t) ;; (print "[" targetstr "]")))) (print targetstr)))) (if (not db-targets) (let* ((run-id (db:get-value-by-header run header "id")) |
︙ |
Added mt.scm version [db089a3853].
|
Modified run-tests-queue-new.scm from [b23b3c860e] to [bb09e31e8d].
1 2 | 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 | - + - + - + + | ;; test-records is a hash table testname:item_path => vector < testname testconfig waitons priority items-info ... > |
︙ | |||
76 77 78 79 80 81 82 | 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | - + + - + | (debug:print 0 "ERROR: test " test-name " has listed itself as a waiton, please correct this!") (set! waiton (filter (lambda (x)(not (equal? x hed))) waitons)))) (cond ;; OUTER COND ((not items) ;; when false the test is ok to be handed off to launch (but not before) (if (and (not (tests:match test-patts (tests:testqueue-get-testname test-record) item-path required: required-tests)) (not (null? tal))) |
︙ | |||
135 136 137 138 139 140 141 142 143 144 145 146 147 148 | 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | + | (mutex-lock! registry-mutex) (hash-table-set! test-registry (runs:make-full-test-name test-name item-path) 'done) (mutex-unlock! registry-mutex)) (conc test-name "/" item-path)))) (thread-start! th)) (cdb:remote-run runs:shrink-can-run-more-tests-count #f) ;; DELAY TWEAKER (still needed?) (if (and (null? tal)(null? reg)) ;; What is the logic here? Why redo the loop with the same variable contents? (loop hed tal reg reruns) (loop (runs:queue-next-hed tal reg reglen regfull) (runs:queue-next-tal tal reg reglen regfull) (let ((newl (append reg (list hed)))) (if regfull (cdr newl) newl)) |
︙ | |||
239 240 241 242 243 244 245 | 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 | - + | ;; if items is a proc then need to run items:get-items-from-config, get the list and loop ;; - but only do that if resources exist to kick off the job ((or (procedure? items)(eq? items 'have-procedure)) (let ((can-run-more (cdb:remote-run runs:can-run-more-tests #f jobgroup max-concurrent-jobs))) (if (and (list? can-run-more) (car can-run-more)) |
︙ |
Modified runs.scm from [d409eb1269] to [0e03774c2e].
1 | 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 | - + + |
|
︙ | |||
343 344 345 346 347 348 349 | 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 | - - - - + + + + | (if (not (null? remtests)) (loop (car remtests)(cdr remtests))))))) (if (not (null? required-tests)) (debug:print-info 1 "Adding " required-tests " to the run queue")) ;; NOTE: these are all parent tests, items are not expanded yet. (debug:print-info 4 "test-records=" (hash-table->alist test-records)) |
︙ | |||
563 564 565 566 567 568 569 | 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 | - - - - - - + + + + + + | (exit))) (for-each (lambda (run) (let ((runkey (string-intersperse (map (lambda (k) (db:get-value-by-header run header k)) keys) "/")) (dirs-to-remove (make-hash-table)) (proc-get-tests (lambda (run-id) |
︙ | |||
668 669 670 671 672 673 674 | 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 | - + + + - + | (debug:print 0 "WARNING: not removing " run-dir " as it either doesn't exist or is not a symlink") (debug:print 0 "NOTE: the run dir for this test is undefined. Test may have already been deleted.")) )) (if (not (null? tal)) (loop (car tal)(cdr tal)))))) ((set-state-status) (debug:print-info 2 "new state " (car state-status) ", new status " (cadr state-status)) |
︙ | |||
818 819 820 821 822 823 824 | 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 | - + | ;; This could probably be refactored into one complex query ... (define (runs:rollup-run keys runname user keyvals) (debug:print 4 "runs:rollup-run, keys: " keys " :runname " runname " user: " user) (let* ((db #f) (new-run-id (cdb:remote-run db:register-run #f keyvals runname "new" "n/a" user)) (prev-tests (cdb:remote-run test:get-matching-previous-test-run-records db new-run-id "%" "%")) |
︙ | |||
846 847 848 849 850 851 852 | 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 | - + | (new-test-record #f)) ;; replace these with insert ... select (apply sqlite3:execute db (conc "INSERT OR REPLACE INTO tests (run_id,testname,state,status,event_time,host,cpuload,diskfree,uname,rundir,item_path,run_duration,final_logf,comment) " "VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?);") new-run-id (cddr (vector->list testdat))) |
︙ |
Modified tests.scm from [8111ef0037] to [67080e7193].
︙ | |||
103 104 105 106 107 108 109 110 | 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | + + + - + | (if (null? tal) (string-intersperse (append (reverse res)(list qry)) " OR ") (loop (car tal)(cdr tal)(cons qry res))))))) #f)) ;; get the previous record for when this test was run where all keys match but runname ;; returns #f if no such test found, returns a single test record if found ;; ;; Run this server-side ;; (define (test:get-previous-test-run-record db run-id test-name item-path) |
︙ | |||
128 129 130 131 132 133 134 | 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 | - + + + + - + | (conc "SELECT id FROM runs WHERE " qrystr " AND id != ?;") (append keyvals (list run-id))) ;; for each run starting with the most recent look to see if there is a matching test ;; if found then return that matching test record (debug:print 4 "selstr: " selstr ", qrystr: " qrystr ", keyvals: " keyvals ", previous run ids found: " prev-run-ids) (if (null? prev-run-ids) #f (let loop ((hed (car prev-run-ids)) (tal (cdr prev-run-ids))) |
︙ | |||
166 167 168 169 170 171 172 | 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | - + | ;; collect all matching tests for the runs then ;; extract the most recent test and return that. (debug:print 4 "selstr: " selstr ", qrystr: " qrystr ", keyvals: " keyvals ", previous run ids found: " prev-run-ids) (if (null? prev-run-ids) '() ;; no previous runs? return null (let loop ((hed (car prev-run-ids)) (tal (cdr prev-run-ids))) |
︙ | |||
259 260 261 262 263 264 265 | 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 | - + | ;; was WAIVED if this test is FAIL ;; NOTES: ;; 1. Is the call to test:get-previous-run-record remotified? ;; 2. Add test for testconfig waiver propagation control here ;; (prev-test (if (equal? status "FAIL") |
︙ | |||
362 363 364 365 366 367 368 | 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 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 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | ;; (set! outputfilename (conc path "/" outputfilename))) (print "No such path: " path)) (debug:print 4 "summarize-items with logf " logf ", outputfilename " outputfilename " and force " force) (if (or (equal? logf "logs/final.log") (equal? logf outputfilename) force) (begin |
︙ |
Modified tests/Makefile from [cf69b5cb16] to [b15db3182f].
︙ | |||
17 18 19 20 21 22 23 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | - - + + + + + + | # The NEWTARGET causes some tests to fail. Do not use until this is fixed. NEWTARGET = "$(OS)/$(FS)/$(VER)" TARGET = "ubuntu/nfs/none" all : test1 test2 test3 test4 test5 server : |
︙ |
Modified tests/fdktestqa/testqa/megatest.config from [88ea0dc535] to [b118157a0d].
1 2 3 4 5 6 7 | 1 2 3 4 5 6 7 8 | - + | [setup] testcopycmd cp --remove-destination -rlv TEST_SRC_PATH/. TEST_TARG_PATH/. >> TEST_TARG_PATH/mt_launch.log 2>> TEST_TARG_PATH/mt_launch.log runqueue 2 [include ../fdk.config] [server] |
Modified tests/fullrun/megatest.config from [043f6e3eef] to [627d897d64].
︙ | |||
11 12 13 14 15 16 17 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | - - + - - + + + | [include config/mt_include_1.config] [setup] # Set launchwait to yes to use the old launch run code that waits for the launch process to return before # proceeding. # launchwait yes |
︙ |