Comment: | Improved exit handling of state/status for tests. If RUNNING then automatic handling is done. If other than RUNNING, simply preserve the values and roll up if an itemized test. Added to tests to better enforce this behavior. Previous behavior was mostly right but failed in some corner cases. Added database cleanup routine. Properly handle removal of tests and mark tests for a run as deleted if the run is removed |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | dev |
Files: | files | file ages | folders |
SHA1: |
cdf61d9fc0d5d186c24dfa3a9821e079 |
User & Date: | mrwellan on 2013-07-25 14:33:29 |
Other Links: | branch diff | manifest | tags |
2013-07-25
| ||
16:25 | Improved dashboard for case when there are many state/status combinations. Fixed couple issues with -runstep check-in: cf0a7961a9 user: mrwellan tags: dev | |
14:33 | Improved exit handling of state/status for tests. If RUNNING then automatic handling is done. If other than RUNNING, simply preserve the values and roll up if an itemized test. Added to tests to better enforce this behavior. Previous behavior was mostly right but failed in some corner cases. Added database cleanup routine. Properly handle removal of tests and mark tests for a run as deleted if the run is removed check-in: cdf61d9fc0 user: mrwellan tags: dev | |
2013-07-24
| ||
10:41 | Added notes on centos issues. Added logpro to installall.sh check-in: d0b7b33922 user: fdktest tags: dev | |
Modified client.scm from [a87cd08699] to [b5dec59d45].
︙ | |||
58 59 60 61 62 63 64 65 66 67 68 69 70 71 | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | + | ;; client:setup (define (client:setup #!key (numtries 50)) (if (not *toppath*) (if (not (setup-for-run)) (begin (debug:print 0 "ERROR: failed to find megatest.config, exiting") (exit)))) (change-directory *toppath*) ;; This is probably NOT needed (debug:print-info 11 "*transport-type* is " *transport-type* ", *runremote* is " *runremote*) (let* ((hostinfo (if (not *transport-type*) ;; If we dont' already have transport type set then figure it out (open-run-close tasks:get-best-server tasks:open-db) #f))) ;; if have hostinfo then extract the transport type ;; else fall back to fs (debug:print-info 11 "CLIENT SETUP, hostinfo=" hostinfo) |
︙ |
Modified db.scm from [aba54015ac] to [9d188be987].
︙ | |||
457 458 459 460 461 462 463 464 465 466 467 468 469 470 | 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 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | (db:set-var db "MEGATEST_VERSION" 1.36) (sqlite3:execute db "ALTER TABLE test_meta ADD COLUMN jobgroup TEXT DEFAULT 'default';")) ((< mver 1.37) (db:set-var db "MEGATEST_VERSION" 1.37) (sqlite3:execute db "ALTER TABLE tests ADD COLUMN archived INTEGER DEFAULT 0;")) ((< mver megatest-version) (db:set-var db "MEGATEST_VERSION" megatest-version)))))) ;; Clean out old junk and vacuum the database ;; ;; Ultimately do something like this: ;; ;; 1. Look at test records either deleted or part of deleted run: ;; a. If test dir exists, set the the test to state='UNKNOWN', Set the run to 'unknown' ;; b. If test dir gone, delete the test record ;; 2. Look at run records ;; a. If have tests that are not deleted, set state='unknown' ;; b. .... ;; (define (db:clean-up db) (let ((statements (map (lambda (stmt) (sqlite3:prepare db stmt)) (list ;; delete all tests that belong to runs that are 'deleted' "DELETE FROM tests WHERE run_id in (SELECT run_id FROM runs WHERE state='deleted');" ;; delete all tests that are 'DELETED' "DELETE FROM tests WHERE state='DELETED';" ;; delete all tests that have no run "DELETE FROM tests WHERE run_id NOT IN (SELECT run_id FROM runs);" ;; delete all runs that are state='deleted' "DELETE FROM runs WHERE state='deleted';" ;; delete empty runs "DELETE FROM runs WHERE id NOT IN (SELECT DISTINCT r.id FROM runs AS r INNER JOIN tests AS t ON t.run_id=r.id);" )))) (sqlite3:with-transaction db (lambda () (map sqlite3:execute statements))) (map sqlite3:finalize! statements) (sqlite3:execute db "VACUUM;"))) ;; (define (db:report-junk-records db) ;;====================================================================== ;; meta get and set vars ;;====================================================================== ;; returns number if string->number is successful, string otherwise ;; also updates *global-delta* |
︙ | |||
770 771 772 773 774 775 776 | 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 | + + - - - - + + + + + + + + | (debug:print-info 11 "db:set-comment-for-run START run-id: " run-id " comment: " comment) (sqlite3:execute db "UPDATE runs SET comment=? WHERE id=?;" comment run-id) (debug:print-info 11 "db:set-comment-for-run END run-id: " run-id " comment: " comment)) ;; does not (obviously!) removed dependent data. But why not!!? (define (db:delete-run db run-id) (common:clear-caches) ;; don't trust caches after doing any deletion ;; First set any related tests to DELETED (let ((stmt1 (sqlite3:prepare db "UPDATE tests SET state='DELETED' WHERE run_id=?;")) |
︙ | |||
1343 1344 1345 1346 1347 1348 1349 | 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 | + - - - - - + + + + + + | ((zmq)(with-output-to-string (lambda ()(serialize obj)))) (else obj))) (define (db:string->obj msg) (case *transport-type* ((fs) msg) ((http) (if (string? msg) |
︙ |
Modified launch.scm from [7a5f293c75] to [243e14f03c].
︙ | |||
325 326 327 328 329 330 331 | 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 | - - + + - - - - + + + + - - + + + + + + + + + + + | (thread-start! th1) (thread-start! th2) (thread-join! th2) (mutex-lock! m) (let* ((item-path (item-list->path itemdat)) (testinfo (cdb:get-test-info-by-id *runremote* test-id))) ;; )) ;; run-id test-name item-path))) ;; Am I completed? |
︙ |
Modified megatest.scm from [8483909d81] to [ce68e14db0].
︙ | |||
106 107 108 109 110 111 112 113 114 115 116 117 118 119 | 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | + | -show-config : dump the internal representation of the megatest.config file -show-runconfig : dump the internal representation of the runconfigs.config file -dumpmode json : dump in json format instead of sexpr -show-cmdinfo : dump the command info for a test (run in test environment) Misc -rebuild-db : bring the database schema up to date -cleanup-db : remove any orphan records, vacuum the db -update-meta : update the tests metadata for all tests -env2file fname : write the environment to fname.csh and fname.sh -setvars VAR1=val1,VAR2=val2 : Add environment variables to a run NB// these are overwritten by values set in config files. -server -|hostname : start the server (reduces contention on megatest.db), use - to automatically figure out hostname -transport http|fs : use http or direct access for transport (default is http) |
︙ | |||
226 227 228 229 230 231 232 233 234 235 236 237 238 239 | 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 | + | "-show-cmdinfo" ;; queries "-test-paths" ;; get path(s) to a test, ordered by youngest first "-runall" ;; run all tests "-remove-runs" "-rebuild-db" "-cleanup-db" "-rollup" "-update-meta" "-gen-megatest-area" "-logging" "-v" ;; verbose 2, more than normal (normal is 1) "-q" ;; quiet 0, errors/warnings only |
︙ | |||
1005 1006 1007 1008 1009 1010 1011 | 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 | - + + + + + + + + + + + | (if (args:get-arg "-gen-megatest-test") (let ((testname (args:get-arg "-gen-megatest-test"))) (genexample:mk-megatest-test testname) (set! *didsomething* #t))) ;;====================================================================== |
︙ |
Modified runs.scm from [6ee79e71cd] to [3d772722d6].
︙ | |||
516 517 518 519 520 521 522 | 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 | - + + - + - + + + | (else (debug:print 4 "FAILS: " fails) ;; If one or more of the prereqs-not-met are FAIL then we can issue ;; a message and drop hed from the items to be processed. (if (null? fails) (begin ;; couldn't run, take a breather |
︙ |
Modified tests/fullrun/config/mt_include_1.config from [bbc52b1b03] to [a782579a4c].
1 2 | 1 2 3 4 5 6 7 8 9 10 | - + | [setup] # exectutable /path/to/megatest |
︙ |
Added tests/fullrun/tests/blocktestxz/main.sh version [c5c5020d12].
|
Added tests/fullrun/tests/blocktestxz/testconfig version [4fa5a854fa].
|
Modified tests/fullrun/tests/runfirst/main.sh from [e4be557feb] to [2d77d9ebfd].
︙ | |||
21 22 23 24 25 26 27 28 | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | + + + + - + + | faz,bar,10,8mA,,,"this is a comment" EOF $MT_MEGATEST -load-test-data << EOF cat, var, val, exp, comp, units, comment, status, type ameas,iout,1.2,1.9,>,Amps,Comment,,meas EOF loadstatus=$? if [[ `basename $PWD` == "mustfail" ]];then $MT_MEGATEST -test-status :state COMPLETED :status FAIL else |
Modified tests/fullrun/tests/runfirst/testconfig from [f0b52bc3c6] to [e478348cce].
1 2 3 4 5 6 7 8 9 10 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | - + | [setup] runscript main.sh [pre-launch-env-vars] # These are set before the test is launched on the originating # host. This can be used to control remote launch tools, e.g. to # to choose the target host, select the launch tool etc. SPECIAL_ENV_VAR override with everything after the first space. [items] |
︙ |
Added tests/fullrun/tests/testxz/testconfig version [b0661b0db5].
|
tests/installall/config/megatest.config.dat became a symlink with target [736a5da885].
tests/installall/config/runconfigs.config.dat became a symlink with target [3b8f260acb].
Modified tests/installall/runconfigs.config from [d70e7613fc] to [636657cf41].
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 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | - + + + + + | # # [CHICKEN_VERSION/MEGATEST_VERSION/IUPMODE/PLATFORM/BUILD_TAG] # [default] ALLTESTS see this variable PREFIX #{getenv MT_RUN_AREA_HOME}/#{getenv BUILD_TAG}/#{getenv MT_RUNNAME} DOWNLOADS #{getenv MT_RUN_AREA_HOME}/downloads IUPLIB 26g4 |