Changes In Branch rollup-runs Through [5cecd7e1d4] Excluding Merge-Ins
This is equivalent to a diff from 6b1fa57fcf to 5cecd7e1d4
2011-08-11
| ||
01:45 | Merged in rollup runs to trunk. Actual rollup of runs not completed yet check-in: d7ffcddcac user: matt tags: trunk, v1.20 | |
01:44 | Updated dashboard to show the test meta data check-in: 425cf09f05 user: matt tags: rollup-runs | |
00:53 | Added test_meta data populating check-in: 5cecd7e1d4 user: matt tags: rollup-runs | |
2011-08-10
| ||
21:57 | Rollup runs, clean up tests check-in: 3e4d4b9027 user: mrwellan tags: rollup-runs | |
2011-08-08
| ||
14:45 | Rollup runs from past N days to new runname, started implementation check-in: 8757213827 user: mrwellan tags: rollup-runs | |
2011-08-06
| ||
23:42 | Added debugging statements, regenerated docs check-in: 6b1fa57fcf user: matt tags: trunk | |
2011-08-04
| ||
09:56 | Added support for using the shell when launching a command (vs. directly kicking off the process) check-in: dc5aae878a user: mrwellan tags: trunk | |
Modified Makefile from [6bee1e6a16] to [6d582f371e].
1 2 3 4 5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | - + - + | FILES=$(glob *.scm) megatest: common.scm configf.scm db.scm keys.scm launch.scm megatest.scm process.scm runs.scm gui.scm csc megatest.scm |
Modified configf.scm from [50f8f33c26] to [2d522c454c].
︙ | |||
23 24 25 26 27 28 29 | 23 24 25 26 27 28 29 30 31 32 33 34 35 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 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 | - - + + - + + - + + + - - + + - - + + - + + + + + + + + + + + - - + + + + + + + - + | (list path fullpath configname) (let ((remcwd (take dir (- (length dir) 1)))) (if (null? remcwd) (list #f #f #f) ;; #f #f) (loop remcwd)))))))) (define (config:assoc-safe-add alist key val) |
︙ |
Modified db.scm from [603c4ba3d8] to [d996c6fe14].
︙ | |||
77 78 79 80 81 82 83 | 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 | - + + - + - + - - - - - + + + + + + + + + + + + + + + + + + - | status TEXT DEFAULT 'n/a',event_time TIMESTAMP, comment TEXT DEFAULT '', CONSTRAINT test_steps_constraint UNIQUE (test_id,stepname,state));") (sqlite3:execute db "CREATE TABLE extradat (id INTEGER PRIMARY KEY, run_id INTEGER, key TEXT, val TEXT);") (sqlite3:execute db "CREATE TABLE metadat (id INTEGER PRIMARY KEY, var TEXT, val TEXT, CONSTRAINT metadat_constraint UNIQUE (id,var));") (db:set-var db "MEGATEST_VERSION" megatest-version) |
︙ | |||
336 337 338 339 340 341 342 343 344 345 346 347 348 349 | 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | ;; (define (db:test-set-rundir! db run-id testname item-path rundir) (sqlite3:execute db "UPDATE tests SET rundir=? WHERE run_id=? AND testname=? AND item_path=?;" rundir run-id testname item-path)) ;;====================================================================== ;; Tests meta data ;;====================================================================== ;; make-vector-record db testmeta id testname author owner description reviewed iterated avg_runtime avg_disk (define (make-db:testmeta)(make-vector 10)) (define-inline (db:testmeta-get-id vec) (vector-ref vec 0)) (define-inline (db:testmeta-get-testname vec) (vector-ref vec 1)) (define-inline (db:testmeta-get-author vec) (vector-ref vec 2)) (define-inline (db:testmeta-get-owner vec) (vector-ref vec 3)) (define-inline (db:testmeta-get-description vec) (vector-ref vec 4)) (define-inline (db:testmeta-get-reviewed vec) (vector-ref vec 5)) (define-inline (db:testmeta-get-iterated vec) (vector-ref vec 6)) (define-inline (db:testmeta-get-avg_runtime vec) (vector-ref vec 7)) (define-inline (db:testmeta-get-avg_disk vec) (vector-ref vec 8)) (define-inline (db:testmeta-get-tags vec) (vector-ref vec 9)) (define-inline (db:testmeta-set-id! vec val)(vector-set! vec 0 val)) (define-inline (db:testmeta-set-testname! vec val)(vector-set! vec 1 val)) (define-inline (db:testmeta-set-author! vec val)(vector-set! vec 2 val)) (define-inline (db:testmeta-set-owner! vec val)(vector-set! vec 3 val)) (define-inline (db:testmeta-set-description! vec val)(vector-set! vec 4 val)) (define-inline (db:testmeta-set-reviewed! vec val)(vector-set! vec 5 val)) (define-inline (db:testmeta-set-iterated! vec val)(vector-set! vec 6 val)) (define-inline (db:testmeta-set-avg_runtime! vec val)(vector-set! vec 7 val)) (define-inline (db:testmeta-set-avg_disk! vec val)(vector-set! vec 8 val)) ;; read the record given a testname (define (db:testmeta-get-record db testname) (let ((res #f)) (sqlite3:for-each-row (lambda (id testname author owner description reviewed iterated avg_runtime avg_disk tags) (set! res (vector id testname author owner description reviewed iterated avg_runtime avg_disk tags))) db "SELECT id,testname,author,owner,description,reviewed,iterated,avg_runtime,avg_disk,tags FROM test_meta WHERE testname=?;" testname) res)) ;; create a new record for a given testname (define (db:testmeta-add-record db testname) (sqlite3:execute db "INSERT OR IGNORE INTO test_meta (testname) VALUES (?);" testname)) ;; update one of the testmeta fields (define (db:testmeta-update-field db testname field value) (sqlite3:execute db (conc "UPDATE test_meta SET " field "=? WHERE testname=?;") value testname)) ;;====================================================================== ;; Steps ;;====================================================================== ;; Run steps ;; make-vector-record "Run steps" db step id test_id stepname step_complete step_pass event_time (define (make-db:step)(make-vector 6)) (define-inline (db:step-get-id vec) (vector-ref vec 0)) |
︙ | |||
427 428 429 430 431 432 433 | 484 485 486 487 488 489 490 491 | + | ;; tests) ;; (filter (lambda (x) ;; (not (hash-table-ref/default non-completed (db:test-get-testname x) #f))) ;; tests))) ;; (pre-dep-names (map db:test-get-testname completed-tests)) ;; (result (lset-difference string=? waiton pre-dep-names))) ;; (print "pre-dep-names: " pre-dep-names " waiton: " waiton " result: " result) |
Modified megatest-version.scm from [c09e9a5825] to [ebeb01abfb].
|
Modified megatest.scm from [fdec59eebf] to [8f3220a6de].
︙ | |||
52 53 54 55 56 57 58 59 60 61 62 63 64 65 | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | + + + | and :runname ,-testpatt and -itempatt and -testpatt -keepgoing : continue running until no jobs are \"LAUNCHED\" or \"NOT_STARTED\" -rerun FAIL,WARN... : re-run if called on a test that previously ran (nullified if -keepgoing is also specified) -rebuild-db : bring the database schema up to date -rollup N : fill run (set by :runname) with latest test(s) from past N days, requires keys -rename-run <runb> : rename run (set by :runname) to <runb>, requires keys Helpers -runstep stepname ... : take remaining params as comand and execute as stepname log will be in stepname.log. Best to put command in quotes -logpro file : with -exec apply logpro file to stepname.log, creates stepname.html and sets log to same If using make use stepname_logpro.log as your target |
︙ | |||
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 | 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 | + + + + | "-itempatt" "-setlog" "-set-toplog" "-runstep" "-logpro" "-m" "-rerun" "-days" "-rename-run" "-to" "-debug" ;; for *verbosity* > 2 ) (list "-h" "-force" "-xterm" "-showkeys" "-test-status" "-summarize-items" "-gui" "-runall" ;; run all tests "-remove-runs" "-keepgoing" "-usequeue" "-rebuild-db" "-rollup" "-v" ;; verbose 2, more than normal (normal is 1) "-q" ;; quiet 0, errors/warnings only ) args:arg-hash 0)) (if (args:get-arg "-h") |
︙ | |||
256 257 258 259 260 261 262 | 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 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 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 | - - - - - + - - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - + - - - - - - + + - - - - - - + - - - - + + + - - - - - - - | ;; 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 (if (args:get-arg "-runall") |
︙ | |||
503 504 505 506 507 508 509 | 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 | + - + | (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") "FAIL") itemdat (args:get-arg "-m")))) ;; for automated creation of the rollup html file this is a good place... (if (not (equal? item-path "")) |
︙ |
Modified runs.scm from [80fea350e5] to [a71e17f8a8].
︙ | |||
424 425 426 427 428 429 430 431 432 433 434 435 436 437 | 424 425 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 | + + + + + + + + + + + + + + + + + + | (if (>= *verbosity* 1)(pp allitems)) (if (>= *verbosity* 5) (begin (print "items: ")(pp (item-assoc->item-list items)) (print "itestable: ")(pp (item-table->item-list itemstable)))) (if (args:get-arg "-m") (db:set-comment-for-run db run-id (args:get-arg "-m"))) ;; Here is where the test_meta table is best updated (let ((currrecord (db:testmeta-get-record db test-name))) (if (not currrecord) (begin (set! currrecord (make-vector 10 #f)) (db:testmeta-add-record db test-name))) (for-each (lambda (key) (let* ((idx (cadr key)) (fld (car key)) (val (config-lookup test-conf "test_meta" fld))) (if (and val (not (equal? (vector-ref currrecord idx) val))) (begin (print "Updating " test-name " " fld " to " val) (db:testmeta-update-field db test-name fld val))))) '(("author" 2)("owner" 3)("description" 4)("reviewed" 5)("tags" 9)))) ;; braindead work-around for poorly specified allitems list BUG!!! FIXME (if (null? allitems)(set! allitems '(()))) (let loop ((itemdat (car allitems)) (tal (cdr allitems))) ;; (lambda (itemdat) ;;; ((ripeness "overripe") (temperature "cool") (season "summer")) ;; Handle lists of items (let* ((item-path (item-list->path itemdat)) ;; (string-intersperse (map cadr itemdat) "/")) |
︙ | |||
631 632 633 634 635 636 637 | 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | ;; (if (null? (glob (conc runpath "/*"))) ;; (begin ;; (debug:print 1 "Removing run dir " runpath) ;; (system (conc "rmdir -p " runpath)))) )))) )) runs))) ;;====================================================================== ;; Routines for manipulating runs ;;====================================================================== ;; Since many calls to a run require pretty much the same setup ;; this wrapper is used to reduce the replication of code (define (general-run-call switchname action-desc proc) (if (not (args:get-arg ":runname")) (begin (debug:print 0 "ERROR: Missing required parameter for " switchname ", you must specify the run name with :runname runname") (exit 2)) (let ((db #f)) (if (not (setup-for-run)) (begin (debug:print 0 "Failed to setup, exiting") (exit 1))) (set! db (open-db)) (if (not (car *configinfo*)) (begin (debug:print 0 "ERROR: Attempted to " action-desc " but run area config file not found") (exit 1)) ;; Extract out stuff needed in most or many calls ;; here then call proc (let* ((keys (db-get-keys db)) (keynames (map key:get-fieldname keys)) (keyvallst (keys->vallist keys #t))) (proc db keys keynames keyvallst))) (sqlite3:finalize! db) (set! *didsomething* #t)))) (define (runs:rollup-run db keys keynames keyvallst n) (let* ((new-run-id (register-run db keys)) (similar-runs (db:get-similar-runs db keys)) (tests-n-days (db:get-tests-n-days db similar-runs))) (for-each (lambda (test-id) (db:rollup-test db run-id test-id)) tests-n-days))) |
Modified tests/test.config from [50c4aca439] to [5ec648d029].
︙ | |||
15 16 17 18 19 20 21 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | + + + + + + + + + + | [include a file that doesn't exist] blah nada # now inlcude a file tha tdoes exist [include megatest.config] [metadata] description This is a multiline description. The leading whitespace is discarded irrespective of amount of indenting. This line is indented more. author matt lastreview never |
Modified tests/tests.scm from [51a14a8524] to [8fcf733fb4].
︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | + | (test "Read a config that doesn't exist" #t (hash-table? (read-config "nada.config"))) (set! conffile (read-config "test.config")) (test "Get available diskspace" #t (number? (get-df "./"))) (test "Get best dir" #t (let ((bestdir (get-best-disk conffile))) (or (equal? "./" bestdir) (equal? "/tmp" bestdir)))) (test "Multiline variable" 4 (length (string-split (config-lookup conffile "metadata" "description") "\n"))) ;; db (define row (vector "a" "b" "c" "blah")) (define header (list "col1" "col2" "col3" "col4")) (test "Get row by header" "blah" (db:get-value-by-header row header "col4")) ;; (define *toppath* "tests") |
︙ | |||
58 59 60 61 62 63 64 | 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | - + | (and (file-exists? "nada.sh") (file-exists? "nada.csh")))) (test "get all legal tests" (list "runfirst" "runwithfirst" "singletest" "singletest2" "sqlitespeed") (sort (get-all-legal-tests) string<=?)) (test "register-test, test info" "NOT_STARTED" (begin |
︙ |
Modified tests/tests/runfirst/testconfig from [9a8e30b98e] to [f0b52bc3c6].
︙ | |||
10 11 12 13 14 15 16 | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | + + + + + + + + | [items] SEASON summer winter fall spring [itemstable] BLOCK a b TOCK 1 2 [test_meta] author matt owner bob description This test must be run before the other tests tags first,single reviewed 1/1/1965 |