Overview
Comment: | Fixes to support full rollup of values |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | rollup-runs |
Files: | files | file ages | folders |
SHA1: |
d940f569936770e8c7223dad4f02c08f |
User & Date: | mrwellan on 2011-08-23 12:53:11 |
Other Links: | branch diff | manifest | tags |
Context
2011-08-24
| ||
07:27 | Removing junk file Closed-Leaf check-in: d14b97e156 user: mrwellan tags: rollup-runs | |
2011-08-23
| ||
12:53 | Fixes to support full rollup of values check-in: d940f56993 user: mrwellan tags: rollup-runs | |
2011-08-11
| ||
18:42 | Added reporting script. Made systems during config file loading switchable check-in: f31ee1bcb7 user: mrwellan tags: rollup-runs | |
Changes
Modified db.scm from [b0c8bb015d] to [1b862e72a2].
︙ | |||
60 61 62 63 64 65 66 | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | - | final_logf TEXT DEFAULT 'logs/final.log', logdat BLOB, run_duration INTEGER DEFAULT 0, comment TEXT DEFAULT '', event_time TIMESTAMP, fail_count INTEGER DEFAULT 0, pass_count INTEGER DEFAULT 0, |
︙ | |||
342 343 344 345 346 347 348 | 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 | - - + + | ;; done with run when: ;; 0 tests in LAUNCHED, NOT_STARTED, REMOTEHOSTSTART, RUNNING (define (db:estimated-tests-remaining db run-id) (let ((res 0)) (sqlite3:for-each-row (lambda (count) (set! res count)) |
︙ | |||
456 457 458 459 460 461 462 | 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 | - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + | (lambda (id test-id stepname state status event-time) (set! res (cons (vector id test-id stepname state status event-time) res))) db "SELECT id,test_id,stepname,state,status,event_time FROM test_steps WHERE test_id=? ORDER BY id ASC;" ;; event_time DESC,id ASC; test-id) (reverse res))) |
︙ |
Modified launch.scm from [aadffc4da1] to [f0e35ea73c].
︙ | |||
143 144 145 146 147 148 149 | 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | - + | (set! fullcmd (append launcher (car hosts)(list remote-megatest "-execute" cmdparms)))) (launcher (set! fullcmd (append launcher (list remote-megatest "-execute" cmdparms)))) (else (set! fullcmd (list remote-megatest "-execute" cmdparms)))) (if (args:get-arg "-xterm")(set! fullcmd (append fullcmd (list "-xterm")))) (debug:print 1 "Launching megatest for test " test-name " in " work-area" ...") |
︙ |
Modified megatest-version.scm from [ebeb01abfb] to [9a855b99f9].
1 2 | 1 2 3 | - + | ;; Always use two digit decimal ;; 1.01, 1.02...1.10,1.11 ... 1.99,2.00.. |
Modified megatest.scm from [3957f2b34f] to [3218809c9e].
︙ | |||
35 36 37 38 39 40 41 42 43 44 45 46 47 48 | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | + + + + + + + + | -m comment : insert a comment for this test Run data :runname : required, name for this particular test run :state : required if updating step state; e.g. start, end, completed :status : required if updating step status; e.g. pass, fail, n/a Values and record errors and warnings -set-values : update or set values in the megatest db :value : value measured :expected_value : value expected :tol : tolerance |value-expect| <= tol :first_err : record an error message :first_warn : record a warning message Queries -list-runs patt : list runs matching pattern \"patt\", % is the wildcard -testpatt patt : in list-runs show only these tests, % is the wildcard -itempatt patt : in list-runs show only tests with items that match patt -showkeys : show the keys used in this megatest setup Misc |
︙ | |||
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | 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 | + + + + + + + + | "-runstep" "-logpro" "-m" "-rerun" "-days" "-rename-run" "-to" ;; values and messages ":first_err" ":first_warn" ":value" ":expected_value" ":tol" ;; misc "-debug" ;; for *verbosity* > 2 ) (list "-h" "-force" "-xterm" "-showkeys" "-test-status" "-set-values" "-summarize-items" "-gui" "-runall" ;; run all tests "-remove-runs" "-keepgoing" "-usequeue" "-rebuild-db" |
︙ | |||
358 359 360 361 362 363 364 | 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 | - + | (set-run-config-vars db run-id) ;; environment overrides are done *before* the remaining critical envars. (alist->env-vars env-ovrd) (set-megatest-env-vars db run-id) (set-item-env-vars itemdat) (save-environment-as-files "megatest") (test-set-meta-info db run-id test-name itemdat) |
︙ | |||
446 447 448 449 450 451 452 | 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 | - + | ;; (test-set-status! db run-id test-name "KILLED" "FAIL" ;; itemdat (args:get-arg "-m")) ;; (sqlite3:finalize! db) ;; (exit 1))))) (begin (debug:print 0 "WARNING: Request received to kill job but problem with process, attempting to kill manager process") (test-set-status! db run-id test-name "KILLED" "FAIL" |
︙ | |||
490 491 492 493 494 495 496 | 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 | - + | (test-set-status! db run-id test-name (if kill-job? "KILLED" "COMPLETED") (if (vector-ref exit-info 1) ;; look at the exit-status (if (and (not kill-job?) (eq? (vector-ref exit-info 2) 0)) "PASS" "FAIL") |
︙ | |||
538 539 540 541 542 543 544 545 546 547 548 549 550 551 | 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 | + | (exit 6))) (sqlite3:finalize! db) (set! *didsomething* #t)))) (if (or (args:get-arg "-setlog") ;; since setting up is so costly lets piggyback on -test-status (args:get-arg "-set-toplog") (args:get-arg "-test-status") (args:get-arg "-set-values") (args:get-arg "-runstep") (args:get-arg "-summarize-items")) (if (not (getenv "MT_CMDINFO")) (begin (debug:print 0 "ERROR: MT_CMDINFO env var not set, commands -test-status, -runstep and -setlog must be called *inside* a megatest environment!") (exit 5)) (let* ((startingdir (current-directory)) |
︙ | |||
616 617 618 619 620 621 622 | 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 | - + + + - - - - - - - - - + + + + + + + + + + + + + + + + + + | (teststep-set-status! db run-id test-name stepname "end" exitstat itemdat (args:get-arg "-m")) (sqlite3:finalize! db) (if (not (eq? exitstat 0)) (exit 254)) ;; (exit exitstat) doesn't work?!? ;; open the db ;; mark the end of the test ))) |
︙ |
Modified runs.scm from [3ae6b820e1] to [0a86a73c3e].
︙ | |||
71 72 73 74 75 76 77 | 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 | - + - + - + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + + | (lambda (a . r) (set! res (cons (list->vector (cons a r)) res))) db (conc "SELECT " keystr " FROM runs WHERE runname like ? " key-patt ";") runnamepatt) (vector header res))) |
︙ | |||
402 403 404 405 406 407 408 | 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 | + + + - + + | (let* ((test-path (conc *toppath* "/tests/" test-name)) (test-configf (conc test-path "/testconfig")) (testexists (and (file-exists? test-configf)(file-read-access? test-configf))) (test-conf (if testexists (read-config test-configf #f #t) (make-hash-table))) (waiton (let ((w (config-lookup test-conf "requirements" "waiton"))) (if (string? w)(string-split w)'()))) (tags (let ((t (config-lookup test-conf "setup" "tags"))) ;; we want our tags to be separated by commas and fully delimited by commas ;; so that queries with "like" can tie to the commas at either end of each tag ;; while also allowing the end user to freely use spaces and commas to separate tags |
︙ | |||
451 452 453 454 455 456 457 | 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 | - + | (if (runs:can-run-more-tests db) (begin (let loop2 ((ts (db:get-test-info db run-id test-name item-path)) ;; #f) (ct 0)) (if (and (not ts) (< ct 10)) (begin |
︙ |
Modified tests/tests/runfirst/main.sh from [f575e06d2a] to [b033ad6b4d].
1 2 3 4 5 6 7 8 9 10 | 1 2 3 4 5 6 7 8 9 10 11 | - + | #!/bin/bash # megatest -step wasting_time :state start :status n/a -m "This is a test step comment" # sleep 20 # megatest -step wasting_time :state end :status $? touch ../I_was_here $MT_MEGATEST -runstep wasting_time -logpro wasting_time.logpro "sleep 8;echo all done eh?" -m "This is a test step comment" |
Modified tests/tests/singletest/main.sh from [c23e537bd9] to [e63ffb76fa].
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 | - + | #!/bin/bash # megatest -step wasting_time :state start :status n/a -m "This is a test step comment" # sleep 20 # megatest -step wasting_time :state end :status $? $MT_MEGATEST -runstep wasting_time -logpro wasting_time.logpro "sleep 5;echo all done eh?" -m "This is a test step comment" |
Modified tests/tests/singletest2/main.sh from [c23e537bd9] to [54d3e4ef49].
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 | - + | #!/bin/bash # megatest -step wasting_time :state start :status n/a -m "This is a test step comment" # sleep 20 # megatest -step wasting_time :state end :status $? $MT_MEGATEST -runstep wasting_time -logpro wasting_time.logpro "sleep 5;echo all done eh?" -m "This is a test step comment" |