Overview
Comment: | Removed all traces of itempath |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
b93e6887b8809ccce3778b7b16e5299e |
User & Date: | mrwellan on 2013-02-28 16:40:54 |
Other Links: | manifest | tags |
Context
2013-03-06
| ||
15:38 | Merged network-only-transport and bumped version to v1.53 check-in: 962322e080 user: mrwellan tags: trunk, v1.53 | |
2013-02-28
| ||
23:08 | Converted dashboard to remote calls check-in: c1e7692bac user: matt tags: network-only-transport | |
16:40 | Removed all traces of itempath check-in: b93e6887b8 user: mrwellan tags: trunk | |
2013-02-26
| ||
22:18 | Added server start to Makefile check-in: c4982d7367 user: matt tags: trunk | |
Changes
Modified common.scm from [afd3c8c16f] to [fc2e76989a].
︙ | ︙ | |||
117 118 119 120 121 122 123 | (define (any->number-if-possible val) (let ((num (any->number val))) (if num num val))) (define (patt-list-match item patts) (debug:print-info 8 "patt-list-match item=" item " patts=" patts) | | | 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | (define (any->number-if-possible val) (let ((num (any->number val))) (if num num val))) (define (patt-list-match item patts) (debug:print-info 8 "patt-list-match item=" item " patts=" patts) (if (and item patts) ;; here we are filtering for matches with item patterns (let ((res #f)) ;; look through all the item-patts if defined, format is patt1,patt2,patt3 ... wildcard is % (for-each (lambda (patt) (let ((modpatt (string-substitute "%" ".*" patt #t))) (debug:print-info 10 "patt " patt " modpatt " modpatt) (if (string-match (regexp modpatt) item) (set! res #t)))) |
︙ | ︙ |
Modified dashboard-guimonitor.scm from [74e70b90f3] to [10390e6373].
︙ | ︙ | |||
52 53 54 55 56 57 58 | (apply iup:vbox (map (lambda (var) (iup:hbox (iup:label var #:size "60x15") (iup:textbox #:expand "HORIZONTAL" #:action (lambda (obj a val) (hash-table-set! var-params var val))))) | | | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | (apply iup:vbox (map (lambda (var) (iup:hbox (iup:label var #:size "60x15") (iup:textbox #:expand "HORIZONTAL" #:action (lambda (obj a val) (hash-table-set! var-params var val))))) (list "runname" "testpatts" "params"))))) (controls (iup:frame #:title "Controls" (iup:hbox (iup:frame #:title "Runs" (iup:hbox (iup:button "Start" |
︙ | ︙ |
Modified db.scm from [624516fedb] to [786acaa696].
︙ | ︙ | |||
739 740 741 742 743 744 745 | (debug:print-info 8 "db:get-tests-for-run qry=" qry) (sqlite3:for-each-row (lambda (a . b) ;; id run-id testname state status event-time host cpuload diskfree uname rundir item-path run-duration final-logf comment) (set! res (cons (apply vector a b) res))) ;; id run-id testname state status event-time host cpuload diskfree uname rundir item-path run-duration final-logf comment) res))) db qry run-id | < < | 739 740 741 742 743 744 745 746 747 748 749 750 751 752 | (debug:print-info 8 "db:get-tests-for-run qry=" qry) (sqlite3:for-each-row (lambda (a . b) ;; id run-id testname state status event-time host cpuload diskfree uname rundir item-path run-duration final-logf comment) (set! res (cons (apply vector a b) res))) ;; id run-id testname state status event-time host cpuload diskfree uname rundir item-path run-duration final-logf comment) res))) db qry run-id ) (debug:print-info 11 "db:get-tests-for-run START run-id=" run-id ", testpatt=" testpatt ", states=" states ", statuses=" statuses ", not-in=" not-in ", sort-by=" sort-by) res)) ;; this one is a bit broken BUG FIXME (define (db:delete-test-step-records db test-id) ;; Breaking it into two queries for better file access interleaving |
︙ | ︙ | |||
1048 1049 1050 1051 1052 1053 1054 | (sqlite3:finalize! db) (if (not (null? newres)) (car newres) (if (null? tal) #f (loop (car tal)(cdr tal)))))))))) | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 | (sqlite3:finalize! db) (if (not (null? newres)) (car newres) (if (null? tal) #f (loop (car tal)(cdr tal)))))))))) ;;====================================================================== ;; QUEUE UP META, TEST STATUS AND STEPS REMOTE ACCESS ;;====================================================================== ;; db:updater is run in a thread to write out the cached data periodically ;; (define (db:updater) ;; (debug:print-info 4 "Starting cache processing") |
︙ | ︙ |
Modified megatest.scm from [dd9511bfa6] to [cf6054b955].
︙ | ︙ | |||
140 141 142 143 144 145 146 | "-reqtarg" ":item" ":runname" ":state" ":status" "-list-runs" "-testpatt" | < | 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | "-reqtarg" ":item" ":runname" ":state" ":status" "-list-runs" "-testpatt" "-setlog" "-set-toplog" "-runstep" "-logpro" "-m" "-rerun" "-days" |
︙ | ︙ | |||
234 235 236 237 238 239 240 | (debug:setup) (if (args:get-arg "-logging")(set! *logging* #t)) (if (debug:debug-mode 3) ;; we are obviously debugging (set! open-run-close open-run-close-no-exception-handling)) | < < < < < < < < < < < < < < < < < < < < < < < < < | 233 234 235 236 237 238 239 240 241 242 243 244 245 246 | (debug:setup) (if (args:get-arg "-logging")(set! *logging* #t)) (if (debug:debug-mode 3) ;; we are obviously debugging (set! open-run-close open-run-close-no-exception-handling)) ;;====================================================================== ;; Misc general calls ;;====================================================================== (if (args:get-arg "-env2file") (begin (save-environment-as-files (args:get-arg "-env2file")) |
︙ | ︙ | |||
572 573 574 575 576 577 578 | (args:get-arg "-lock") (args:get-arg "-unlock") user)))) ;;====================================================================== ;; Get paths to tests ;;====================================================================== | | | 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 | (args:get-arg "-lock") (args:get-arg "-unlock") user)))) ;;====================================================================== ;; Get paths to tests ;;====================================================================== ;; Get test paths matching target, runname, and testpatt (if (or (args:get-arg "-test-files")(args:get-arg "-test-paths")) ;; if we are in a test use the MT_CMDINFO data (if (getenv "MT_CMDINFO") (let* ((startingdir (current-directory)) (cmdinfo (read (open-input-string (base64:base64-decode (getenv "MT_CMDINFO"))))) (runremote (assoc/default 'runremote cmdinfo)) (testpath (assoc/default 'testpath cmdinfo)) |
︙ | ︙ | |||
613 614 615 616 617 618 619 | paths))) ;; else do a general-run-call (general-run-call "-test-files" "Get paths to test" (lambda (target runname keys keynames keyvallst) (let* ((db #f) | < | | 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 | paths))) ;; else do a general-run-call (general-run-call "-test-files" "Get paths to test" (lambda (target runname keys keynames keyvallst) (let* ((db #f) (paths (open-run-close db:test-get-paths-matching db keynames target (args:get-arg "-test-files")))) (for-each (lambda (path) (print path)) paths)))))) ;;====================================================================== ;; Archive tests ;;====================================================================== ;; Archive tests matching target, runname, and testpatt (if (args:get-arg "-archive") ;; if we are in a test use the MT_CMDINFO data (if (getenv "MT_CMDINFO") (let* ((startingdir (current-directory)) (cmdinfo (read (open-input-string (base64:base64-decode (getenv "MT_CMDINFO"))))) (runremote (assoc/default 'runremote cmdinfo)) (testpath (assoc/default 'testpath cmdinfo)) |
︙ | ︙ | |||
649 650 651 652 653 654 655 | (begin (debug:print 0 "ERROR: -target is required.") (exit 1))) (if (not (setup-for-run)) (begin (debug:print 0 "Failed to setup, giving up on -archive, exiting") (exit 1))) | < | < | 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 | (begin (debug:print 0 "ERROR: -target is required.") (exit 1))) (if (not (setup-for-run)) (begin (debug:print 0 "Failed to setup, giving up on -archive, exiting") (exit 1))) (let* ((keys (open-run-close db:get-keys db)) (keynames (map key:get-fieldname keys)) (paths (open-run-close db:test-get-paths-matching db keynames target))) (set! *didsomething* #t) (for-each (lambda (path) (print path)) paths))) ;; else do a general-run-call (general-run-call "-test-paths" "Get paths to tests" (lambda (target runname keys keynames keyvallst) (let* ((db #f) (paths (open-run-close db:test-get-paths-matching db keynames target))) (for-each (lambda (path) (print path)) paths)))))) ;;====================================================================== ;; Extract a spreadsheet from the runs database |
︙ | ︙ |
Modified tasks.scm from [c132633749] to [a2249c790f].
︙ | ︙ | |||
332 333 334 335 336 337 338 | ;; for use from the gui (define (tasks:add-from-params mdb action keys key-params var-params) (let ((target (keys:key-vals-hash->target keys key-params)) (owner (car (user-information (current-user-id)))) (runname (hash-table-ref/default var-params "runname" #f)) (testpatts (hash-table-ref/default var-params "testpatts" "%")) | < | | 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 | ;; for use from the gui (define (tasks:add-from-params mdb action keys key-params var-params) (let ((target (keys:key-vals-hash->target keys key-params)) (owner (car (user-information (current-user-id)))) (runname (hash-table-ref/default var-params "runname" #f)) (testpatts (hash-table-ref/default var-params "testpatts" "%")) (params (hash-table-ref/default var-params "params" ""))) (tasks:add mdb action owner target runname testpatts params))) ;; return one task from those who are 'new' OR 'waiting' AND more than 10sec old ;; (define (tasks:snag-a-task mdb) (let ((res #f) (keytxt (conc (current-process-id) "-" (get-host-name) "-" (car (user-information (current-user-id)))))) |
︙ | ︙ | |||
442 443 444 445 446 447 448 | (set! res (cons (apply vector a rem) res))) mdb "SELECT id,pid,strftime('%m/%d/%Y %H:%M',datetime(start_time,'unixepoch'),'localtime'),strftime('%m/%d/%Y %H:%M:%S',datetime(last_update,'unixepoch'),'localtime'),hostname,username FROM monitors ORDER BY last_update ASC;") (reverse res) )) (define (tasks:tasks->text tasks) | | | | | 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 | (set! res (cons (apply vector a rem) res))) mdb "SELECT id,pid,strftime('%m/%d/%Y %H:%M',datetime(start_time,'unixepoch'),'localtime'),strftime('%m/%d/%Y %H:%M:%S',datetime(last_update,'unixepoch'),'localtime'),hostname,username FROM monitors ORDER BY last_update ASC;") (reverse res) )) (define (tasks:tasks->text tasks) (let ((fmtstr "~10a~10a~10a~12a~20a~12a~12a~10a")) (conc (format #f fmtstr "id" "action" "owner" "state" "target" "runname" "testpatts" "params") "\n" (string-intersperse (map (lambda (task) (format #f fmtstr (tasks:task-get-id task) (tasks:task-get-action task) (tasks:task-get-owner task) (tasks:task-get-state task) (tasks:task-get-target task) (tasks:task-get-name task) (tasks:task-get-test task) ;; (tasks:task-get-item task) (tasks:task-get-params task))) tasks) "\n")))) (define (tasks:monitors->text-table monitors) (let ((fmtstr "~4a~8a~20a~20a~10a~10a")) (conc (format #f fmtstr "id" "pid" "start time" "last update" "hostname" "user") "\n" (string-intersperse |
︙ | ︙ |