Changes In Branch v1.62-no-rpc Through [dee83609d2] Excluding Merge-Ins
This is equivalent to a diff from 3e767a9aad to dee83609d2
2016-12-01
| ||
23:00 | Fixed some server functions. Misc. cleanup check-in: 632d7c9f79 user: matt tags: v1.62-no-rpc | |
16:17 | server fixes check-in: dee83609d2 user: mrwellan tags: v1.62-no-rpc | |
15:58 | server fixes check-in: f0c98a8cd8 user: mrwellan tags: v1.62-no-rpc | |
2016-11-30
| ||
17:01 | Filter working check-in: d9859999af user: ritikaag tags: db-new | |
2016-11-18
| ||
20:46 | Try tmp db without rpc check-in: d06a3ab427 user: matt tags: v1.62-no-rpc | |
2016-11-17
| ||
16:27 | Beginnings of fix for testconfig disks issue Closed-Leaf check-in: 7e67a7638f user: mrwellan tags: testconfig-disks-fix | |
2016-11-16
| ||
16:57 | moved rpc-transport updates into mainline v1.62 branch check-in: f736d3db6e user: bjbarcla tags: v1.62 | |
16:08 | Merged v1.62 into rpc-transport Closed-Leaf check-in: 534875ccf1 user: mrwellan tags: rpc-transport-merge-v1.62 | |
13:48 | Try using md5sum instead of sha1. Much faster but what is the collison risk? check-in: 3e767a9aad user: mrwellan tags: v1.62, v1.6208 | |
10:12 | Fixed remotediff example. Broken by unknown goof up. check-in: 9833288949 user: mrwellan tags: v1.62 | |
Modified Makefile from [83b5fe2a28] to [1b85fc3382].
70 71 72 73 74 75 76 | 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | - + | tests.o db.o launch.o runs.o dashboard-tests.o dashboard-guimonitor.o dashboard-main.o monitor.o dashboard.o \ archive.o megatest.o : db_records.scm tests.o runs.o dashboard.o dashboard-tests.o dashboard-main.o : run_records.scm db.o ezsteps.o keys.o launch.o megatest.o monitor.o runs-for-ref.o runs.o tests.o : key_records.scm tests.o tasks.o dashboard-tasks.o : task_records.scm runs.o : test_records.scm megatest.o : megatest-fossil-hash.scm |
Modified api.scm from [bcdab13d33] to [fe7a2f21be].
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | 15 16 17 18 19 20 21 22 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 | + + + + - + + | (declare (uses tasks)) ;; allow these queries through without starting a server ;; (define api:read-only-queries '(get-key-val-pairs get-keys get-key-vals test-toplevel-num-items get-test-info-by-id test-get-rundir-from-test-id get-count-tests-running-for-testname get-count-tests-running get-count-tests-running-in-jobgroup get-previous-test-run-record get-matching-previous-test-run-records test-get-logfile-info test-get-records-for-index-file get-testinfo-state-status test-get-top-process-pid test-get-paths-matching-keynames-target-new get-prereqs-not-met get-count-tests-running-for-run-id get-run-info get-run-status get-run-stats get-targets get-target |
Modified client.scm from [b597605018] to [50265f350f].
168 169 170 171 172 173 174 | 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | - + - + - + - + | (hostname (tasks:hostinfo-get-hostname server-dat)) (port (tasks:hostinfo-get-port server-dat)) (start-res (case *transport-type* ((http)(http-transport:client-connect iface port)) ;;((nmsg)(nmsg-transport:client-connect hostname port)) )) (ping-res (case *transport-type* |
Modified common.scm from [41eb86f112] to [544bde0493].
1 2 3 4 5 6 7 8 9 10 11 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | - + | ;;====================================================================== ;; Copyright 2006-2012, Matthew Welland. ;; ;; This program is made available under the GNU GPL version 2.0 or ;; greater. See the accompanying file COPYING for details. ;; ;; This program is distributed WITHOUT ANY WARRANTY; without even the ;; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ;; PURPOSE. ;;====================================================================== |
41 42 43 44 45 46 47 | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | - - + - + + | (debug:print-error 0 *default-log-port* "bad value for setenv, key=" key ", value=" val))) (define home (getenv "HOME")) (define user (getenv "USER")) ;; GLOBAL GLETCHES |
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 | - - + - + + - - - + - - + + - + + + + + + - - + - - - + + + + + + + + + + + + - + - | (define *configinfo* #f) ;; raw results from setup, includes toppath and table from megatest.config (define *runconfigdat* #f) ;; run configs data (define *configdat* #f) ;; megatest.config data (define *configstatus* #f) ;; status of data; 'fulldata : all processing done, #f : no data yet, 'partialdata : partial read done (define *toppath* #f) (define *already-seen-runconfig-info* #f) |
186 187 188 189 190 191 192 | 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 | - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + | (define (common:version-changed?) (not (equal? (common:get-last-run-version) (common:version-signature)))) ;; Move me elsewhere ... ;; RADT => Why do we meed the version check here, this is called only if version misma ;; |
343 344 345 346 347 348 349 | 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 448 449 450 451 452 453 454 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 487 488 489 490 491 492 493 494 | - - - + + + + + + - - + - - - - + + + - - - + + + - - - + + + - - + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | (delete-file* fname)) ;;====================================================================== ;; S T A T E S A N D S T A T U S E S ;;====================================================================== (define *common:std-states* |
390 391 392 393 394 395 396 397 398 399 400 | 502 503 504 505 506 507 508 509 510 511 512 513 514 515 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 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 | + + + + + + + + + + + + + - - + + - - - - - - + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + - - - - - - - | (define (common:get-testsuite-name) (or (configf:lookup *configdat* "setup" "testsuite" ) (if *toppath* (pathname-file *toppath*) (pathname-file (current-directory))))) (define (common:get-db-tmp-area) (if *db-cache-path* *db-cache-path* (let ((dbpath (create-directory (conc "/tmp/" (current-user-name) "/megatest_localdb/" (common:get-testsuite-name) "/" (string-translate *toppath* "/" ".")) #t))) (set! *db-cache-path* dbpath) dbpath))) (define (common:get-area-path-signature) (message-digest-string (md5-primitive) *toppath*)) ;;====================================================================== ;; E X I T H A N D L I N G ;;====================================================================== |
547 548 549 550 551 552 553 554 555 556 557 558 559 560 | 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 | + + + + + + + + + + + + + + + + + + + + + | exn #f (pathname-directory (pathname-directory (pathname-directory exe-path)))) #f))) ;; return first path that can be created or already exists and is writable ;; (define (common:get-create-writeable-dir dirs) (if (null? dirs) #f (let loop ((hed (car dirs)) (tal (cdr dirs))) (let ((res (or (and (directory? hed) (file-write-access? hed) hed) (handle-exceptions exn #f (create-directory hed #t))))) (if (and (string? res) (directory? res)) res (if (null? tal) #f (loop (car tal)(cdr tal)))))))) ;;====================================================================== ;; T A R G E T S , S T A T E , S T A T U S , ;; R U N N A M E A N D T E S T P A T T ;;====================================================================== ;; Lookup a value in runconfigs based on -reqtarg or -target (define (runconfigs-get config var) |
611 612 613 614 615 616 617 618 619 620 621 622 623 624 | 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | tlist target) (if target (begin (debug:print-error 0 *default-log-port* "Invalid target, spaces or blanks not allowed \"" target "\", target should be: " (string-intersperse keys "/") ", have " tlist " for elements") #f) #f)))) ;; logic for getting homehost. Returns (host . at-home) ;; IF *toppath* is not set, wait up to five seconds trying every two seconds ;; (this is to accomodate the watchdog) ;; (define (common:get-homehost #!key (trynum 5)) ;; called often especially at start up. use mutex to eliminate collisions (mutex-lock! *homehost-mutex*) (cond (*home-host* (mutex-unlock! *homehost-mutex*) *home-host*) ((not *toppath*) (mutex-unlock! *homehost-mutex*) (launch:setup) ;; safely mutexed now (if (> trynum 0) (begin (thread-sleep! 2) (common:get-homehost trynum: (- trynum 1))) #f)) (else (let* ((currhost (get-host-name)) (bestadrs (server:get-best-guess-address currhost)) ;; first look in config, then look in file .homehost, create it if not found (homehost (or (configf:lookup *configdat* "server" "homehost" ) (let ((hhf (conc *toppath* "/.homehost"))) (if (file-exists? hhf) (with-input-from-file hhf read-line) (if (file-write-access? *toppath*) (begin (with-output-to-file hhf (lambda () (print bestadrs))) (begin (mutex-unlock! *homehost-mutex*) (car (common:get-homehost)))) #f))))) (at-home (or (equal? homehost currhost) (equal? homehost bestadrs)))) (set! *home-host* (cons homehost at-home)) (mutex-unlock! *homehost-mutex*) *home-host*)))) ;; am I on the homehost? ;; (define (common:on-homehost?) (let ((hh (common:get-homehost))) (if hh (cdr hh) #f))) ;;====================================================================== ;; M I S C L I S T S ;;====================================================================== ;; items in lista are matched value and position in listb ;; return the remaining items in listb or #f |
634 635 636 637 638 639 640 641 642 643 644 645 646 647 | 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 | + | (talb (cdr listb))) (if (equal? heda hedb) (if (null? tala) ;; we are done talb (loop (car tala) (cdr tala) (car talb) (cdr talb))) #f))))) ;; Needed for long lists to be sorted where (apply max ... ) dies ;; (define (common:max inlst) (let loop ((max-val (car inlst)) |
921 922 923 924 925 926 927 | 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 | - - - - + - - - - + + + - - - - + + + + + + + + + + + + + + - + | (if match (let ((newval (string->number (cadr match)))) (if (number? newval) (set! freespc newval)))))) (car df-results)) freespc)) |
Modified common_records.scm from [9b8dfbfc6d] to [0e6990e6a2].
41 42 43 44 45 46 47 48 49 50 51 52 53 54 | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | + + + + + + + + + | (print-call-chain (current-error-port)) (with-output-to-port (current-error-port) (lambda () (print ((condition-property-accessor 'exn 'message) exn)) (print "Callback error in " procname) (print "Full condition info:\n" (condition->list exn))))) (proc))) ;; Need a mutex protected way to get and set values ;; or use (define-simple-syntax ?? ;; (define-inline (with-mutex mtx accessor record . val) (mutex-lock! mtx) (let ((res (apply accessor record val))) (mutex-unlock! mtx) res)) ;; this was cached based on results from profiling but it turned out the profiling ;; somehow went wrong - perhaps too many processes writing to it. Leaving the caching ;; in for now but can probably take it out later. ;; (define (debug:calc-verbosity vstr) (or (hash-table-ref/default *verbosity-cache* vstr #f) |
Modified dashboard-tests.scm from [2a1074e05f] to [cd363a9628].
15 16 17 18 19 20 21 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | - - + + | (use format fmt) (require-library iup) (import (prefix iup iup:)) (use canvas-draw) |
156 157 158 159 160 161 162 | 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | - + | ;;====================================================================== ;; Run info panel ;;====================================================================== (define (run-info-panel db keydat testdat runname) (let* ((run-id (db:test-get-run_id testdat)) |
284 285 286 287 288 289 290 | 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 | - + + | (apply iup:hbox (iup:label "STATE:" #:size "30x") (let* ((btns (map (lambda (state) (let ((btn (iup:button state #:expand "HORIZONTAL" #:size "50x" #:font "Courier New, -10" #:action (lambda (x) |
317 318 319 320 321 322 323 | 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 | - + + | (if wtxtbox (begin (iup:attribute-set! wtxtbox "VALUE" c) (if (not *dashboard-comment-share-slot*) (set! *dashboard-comment-share-slot* wtxtbox))) )))) (begin |
413 414 415 416 417 418 419 | 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 | - - - + + + | dlog)) ;;====================================================================== ;; ;;====================================================================== (define (dashboard-tests:examine-test run-id test-id) ;; run-id run-key origtest) |
511 512 513 514 515 516 517 | 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 | - + | request-update)) (newtestdat (if need-update ;; NOTE: BUG HIDER, try to eliminate this exception handler (handle-exceptions exn (debug:print-info 0 *default-log-port* "test db access issue in examine test for run-id " run-id ", test-id " test-id ": " ((condition-property-accessor 'exn 'message) exn)) (rmt:get-test-info-by-id run-id test-id ))))) |
Modified dashboard.scm from [ef1ffd321d] to [5d219ac9eb].
51 52 53 54 55 56 57 58 59 60 61 62 63 64 | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | + | version " megatest-version " license GPL, Copyright (C) Matt Welland 2012-2016 Usage: dashboard [options] -h : this help -test run-id,test-id : control test identified by testid -skip-version-check : skip the version check -use-db-cache : access database via cache Misc -rows R : set number of rows -cols C : set number of columns ")) ;; -server host:port : connect to host:port instead of db access |
79 80 81 82 83 84 85 | 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | - + + | ) (list "-h" "-use-server" "-guimonitor" "-main" "-v" "-q" |
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | 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 | + + + + + + + + + - | ;; TODO: Move this inside (main) ;; (if (not (launch:setup)) (begin (print "Failed to find megatest.config, exiting") (exit 1))) ;; create a watch dog to move changes from lt/.db/*.db to megatest.db ;; (if (file-write-access? (conc *toppath* "/megatest.db")) (thread-start! (make-thread common:watchdog "Watchdog thread")) (if (not (args:get-arg "-use-db-cache")) (begin (debug:print-info 0 *default-log-port* "Forcing db-cache mode due to read-only access to megatest.db") (hash-table-set! args:arg-hash "-use-db-cache" #t)))) ;; data common to all tabs goes here ;; (defstruct dboard:commondat ((curr-tab-num 0) : number) please-update tabdats update-mutex updaters updating uidat ;; needs to move to tabdat at some time hide-not-hide-tabs ) |
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 | 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 | + - + | ((searchpatts (make-hash-table)) : hash-table) ;; ((state-ignore-hash (make-hash-table)) : hash-table) ;; hash of STATE => #t/#f for display control ((status-ignore-hash (make-hash-table)) : hash-table) ;; hash of STATUS => #t/#f (target #f) (test-patts #f) ;; db info to file the .db files for the area (access-mode (db:get-access-mode)) ;; use cached db or not (dbdir #f) (dbfpath #f) (dbkeys #f) ((last-db-update (make-hash-table)) : hash-table) ;; last db file timestamp (monitor-db-path #f) ;; where to find monitor.db ro ;; is the database read-only? ;; tests data ((num-tests 10) : number) ;; total number of tests to show (used in the old runs display) ;; runs tree ((path-run-ids (make-hash-table)) : hash-table) ;; path (target / runname) => id (runs-tree #f) |
295 296 297 298 299 300 301 | 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 | - - + + - + | (define (dboard:tabdat-make-data) (let ((dat (make-dboard:tabdat))) (dboard:setup-tabdat dat) (dboard:setup-num-rows dat) dat)) (define (dboard:setup-tabdat tabdat) |
477 478 479 480 481 482 483 | 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 | + - + - - + + | ;; This is roughly the same as dboard:get-tests-dat, should merge them if possible ;; ;; gets all the tests for run-id that match testnamepatt and key-vals, merges them ;; ;; NOTE: Yes, this is used ;; (define (dboard:get-tests-for-run-duplicate tabdat run-id run testnamepatt key-vals) (let* ((access-mode (dboard:tabdat-access-mode tabdat)) |
514 515 516 517 518 519 520 | 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 554 555 556 557 558 559 | + - - - - - - - - - - - + + + + + + + + + + + - - + + | (db-path (or (dboard:rundat-db-path run-dat) (let* ((db-dir (tasks:get-task-db-path)) (db-pth (conc db-dir "/" run-id ".db"))) (dboard:rundat-db-path-set! run-dat db-pth) db-pth))) (tmptests (if (or do-not-use-db-file-timestamps (>= (common:lazy-modification-time db-path) last-update)) (db:dispatch-query access-mode rmt:get-tests-for-run db:get-tests-for-run |
590 591 592 593 594 595 596 | 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 | + - - - + + + + + - + | ;; this calls dboard:get-tests-for-run-duplicate for each run ;; ;; create a virtual table of all the tests ;; keypatts: ( (KEY1 "abc%def")(KEY2 "%") ) ;; (define (update-rundat tabdat runnamepatt numruns testnamepatt keypatts) (let* ((access-mode (dboard:tabdat-access-mode tabdat)) |
660 661 662 663 664 665 666 | 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 | - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | maxtests) (if (> (dboard:rundat-run-data-offset run-struct) 0) (loop run tal new-res newmaxtests) ;; not done getting data for this run (loop (car tal)(cdr tal) new-res newmaxtests))))))) (dboard:tabdat-filters-changed-set! tabdat #f) (dboard:update-tree tabdat runs-hash header tb))) |
1474 1475 1476 1477 1478 1479 1480 | 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 | + - + + | (define (tree-path->run-id tabdat path) (if (not (null? path)) (hash-table-ref/default (dboard:tabdat-path-run-ids tabdat) path #f) #f)) (define (dboard:get-tests-dat tabdat run-id last-update) (let* ((access-mode (dboard:tabdat-access-mode tabdat)) |
1505 1506 1507 1508 1509 1510 1511 | 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 | + - + + - + | (define (dashboard:safe-cadr-assoc name lst) (let ((res (assoc name lst))) (if (and res (> (length res) 1)) (cadr res) #f))) (define (dboard:update-tree tabdat runs-hash runs-header tb) (let* ((access-mode (dboard:tabdat-access-mode tabdat)) |
1583 1584 1585 1586 1587 1588 1589 | 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 | + - - + + + - - + + + + - + | (dashboard:run-id->tests-mindat src-run-id tabdat runs-hash) (dashboard:run-id->tests-mindat dest-run-id tabdat runs-hash) hide-clean: hide-clean) #f))) (define (dashboard:get-runs-hash tabdat) (let* ((access-mode (dboard:tabdat-access-mode tabdat)) |
2032 2033 2034 2035 2036 2037 2038 | 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 | - | (debug:catch-and-dump (lambda () (mark-for-update tabdat) (update-search commondat tabdat "test-name" val)) "make-controls"))) (iup:hbox (iup:button "Quit" #:action (lambda (obj) |
2565 2566 2567 2568 2569 2570 2571 | 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 | - - + + - + - - + + | (iup:attribute-set! *tim* "TIME" 300) (iup:attribute-set! *tim* "RUN" "YES") (define *last-recalc-ended-time* 0) (define (dashboard:recalc modtime please-update-buttons last-db-update-time) (or please-update-buttons |
2605 2606 2607 2608 2609 2610 2611 2612 2613 | 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 | + + + + - + - - + + - + | (define (dboard:get-last-db-update tabdat context) (hash-table-ref/default (dboard:tabdat-last-db-update tabdat) context 0)) (define (dboard:set-last-db-update! tabdat context newtime) (hash-table-set! (dboard:tabdat-last-db-update tabdat) context newtime)) ;; DOES NOT WORK RELIABLY WITH /tmp WAL mode files. Timestamps only change when the db ;; is closed (I think). If db dir starts with /tmp always return true ;; (define (dashboard:database-changed? commondat tabdat #!key (context-key 'default)) (let* ((run-update-time (current-seconds)) (dbdir (dboard:tabdat-dbdir tabdat)) |
2711 2712 2713 2714 2715 2716 2717 | 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 | + - - + + + + | (lambda (a b) (< (db:test-get-event_time (hash-table-ref testsdat (car a))) (db:test-get-event_time (hash-table-ref testsdat (car b)))))))))) ;; run times tab data updater ;; (define (dashboard:run-times-tab-run-data-updater commondat tabdat tab-num) (let* ((access-mode (dboard:tabdat-access-mode tabdat)) |
3254 3255 3256 3257 3258 3259 3260 | 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 | - + + | ;; removing the tabdat-values proc ;; ;; (define (tabdat-values tabdat) ;; runs update-rundat using the various filters from the gui ;; (define (dashboard:do-update-rundat tabdat) |
3280 3281 3282 3283 3284 3285 3286 3287 3288 | 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 | + - + | (debug:catch-and-dump (lambda () (let* ((tabdat (dboard:common-get-tabdat commondat tab-num: tab-num)) (dbkeys (dboard:tabdat-dbkeys tabdat))) ;;(print "RA => calling runs-tab-updater with commondat " commondat " tab-num " tab-num) ;;(tabdat-values tabdat) ;;RA added ;; (pp (dboard:tabdat->alist tabdat)) ;; (if (dashboard:database-changed? commondat tabdat context-key: 'runs-rundat) (dashboard:do-update-rundat tabdat) (let ((uidat (dboard:commondat-uidat commondat))) |
3317 3318 3319 3320 3321 3322 3323 | 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 | - + | (dashboard-tests:examine-test run-id test-id) (begin (debug:print 3 *default-log-port* "INFO: tried to open test with invalid run-id,test-id. " (args:get-arg "-test")) (exit 1))))) ;; ((args:get-arg "-guimonitor") ;; (gui-monitor (dboard:tabdat-dblocal tabdat))) (else |
3355 3356 3357 3358 3359 3360 3361 | 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 | + + - + | (thread-join! th2))))) ;; ease debugging by loading ~/.dashboardrc (let ((debugcontrolf (conc (get-environment-variable "HOME") "/.dashboardrc"))) (if (file-exists? debugcontrolf) (load debugcontrolf))) (if (args:get-arg "-repl") (repl) |
Modified db.scm from [bd53297b84] to [fef1f3f2e3].
36 37 38 39 40 41 42 43 | 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 | + + + - - - - - - - - - - + + + + + + + + + + + + + + - - - + | (define *number-of-writes* 0) (define *number-non-write-queries* 0) ;;====================================================================== ;; R E C O R D S ;;====================================================================== ;; each db entry is a pair ( db . dbfilepath ) ;; I propose this record evolves into the area record ;; (defstruct dbr:dbstruct |
84 85 86 87 88 89 90 | 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 | - + - - + - - - - + - - - - + - - - - - - - - - + + + + + + + + + - + + + + - + - + | ;; Get/open a database ;; if run-id => get run specific db ;; if #f => get main db ;; if db already open - return inmem ;; if db not open, open inmem, rundb and sync then return inmem ;; inuse gets set automatically for rundb's ;; |
167 168 169 170 171 172 173 | 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 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 321 322 323 324 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 364 365 366 367 | - - - - - + + + + + - - - + + + - - - + + + - - - - - - + + - + - - - + + + - - - - - - - - - - - + + - - - + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - + + + + + + - - - - - - - + + + + + - - + - - - - - - - - - + - - - - - - - + - + - - - - + + + + - - - - - - - + + + + + + + - - - - - - - - - - + + + + + + + + + + - + - - - - + + - - - - - - - - - + + + + + + + + + + + - - + + - - + - - + - - + - - - + - + - - - + - - - - + - - - - + - - + - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - + + - - - - + + + + + + - - - - - + + + + + - - - - - - + + + + + + | ;; (filedb:get-path db id))) ;; NB// #f => return dbdir only ;; (was planned to be; zeroth db with name=main.db) ;; ;; If run-id is #f return to create and retrieve the path where the db will live. ;; |
487 488 489 490 491 492 493 | 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 | - - + + | '("units" #f) '("comment" #f) '("status" #f) '("type" #f)))) ;; needs db to get keys, this is for syncing all tables ;; |
511 512 513 514 515 516 517 518 519 520 521 522 523 524 | 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 | + + + + | '("description" #f) '("reviewed" #f) '("iterated" #f) '("avg_runtime" #f) '("avg_disk" #f) '("tags" #f) '("jobgroup" #f))))) (define (db:sync-all-tables-list dbstruct) (append (db:sync-main-list dbstruct) db:sync-tests-only)) ;; use bunch of Unix commands to try to break the lock and recreate the db ;; (define (db:move-and-recreate-db dbdat) (let* ((dbpath (db:dbdat-get-path dbdat)) (dbdir (pathname-directory dbpath)) (fname (pathname-strip-directory dbpath)) |
589 590 591 592 593 594 595 | 513 514 515 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 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 | + + + + - + - - - - - - - + - - - - + + + + + + + + - + + + + | (finalize! db) #t)))))) ;; tbls is ( ("tablename" ( "field1" [#f|proc1] ) ( "field2" [#f|proc2] ) .... ) ) ;; db's are dbdat's ;; ;; if last-update specified ("field-name" . time-in-seconds) ;; then sync only records where field-name >= time-in-seconds ;; IFF field-name exists ;; |
718 719 720 721 722 723 724 | 647 648 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 | + - + - + - - - + | fromdat-lst)) )) fromdats) (sqlite3:finalize! stmth))) (append (list todb) slave-dbs)))) tbls) (let* ((runtime (- (current-milliseconds) start-time)) (should-print (or (debug:debug-mode 12) |
760 761 762 763 764 765 766 | 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 | - + - + | BEGIN UPDATE " table-name " SET last_update=(strftime('%s','now')) WHERE id=old.id; END;")) ) '("tests" "test_steps" "test_data"))) |
794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 | 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 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 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + - - - - - - - + + + - - - - - - - + + + + + + + - - - - - - + + + + + + + + - - - - - - + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + - + | last_update INTEGER DEFAULT (strftime('%s','now')))") (sqlite3:execute maindb "CREATE TRIGGER IF NOT EXISTS update_run_stats_trigger AFTER UPDATE ON run_stats FOR EACH ROW BEGIN UPDATE run_stats SET last_update=(strftime('%s','now')) WHERE id=old.id; END;")) (define *global-db-store* (make-hash-table)) (define (db:get-access-mode) (if (args:get-arg "-use-db-cache") 'cached 'rmt)) ;; Add db direct ;; (define (db:dispatch-query access-mode rmt-cmd db-cmd . params) (if (eq? access-mode 'cached) (print "not doing cached calls right now")) ;; (apply db:call-with-cached-db db-cmd params) (apply rmt-cmd params)) ;;) ;; return the target db handle so it can be used ;; (define (db:cache-for-read-only source target #!key (use-last-update #f)) (if (and (hash-table-ref/default *global-db-store* target #f) (>= (file-modification-time target)(file-modification-time source))) (hash-table-ref *global-db-store* target) (let* ((toppath (launch:setup)) (targ-db-last-mod (if (file-exists? target) (file-modification-time target) 0)) (cache-db (or (hash-table-ref/default *global-db-store* target #f) (db:open-megatest-db path: target))) (source-db (db:open-megatest-db path: source)) (curr-time (current-seconds)) (res '()) (last-update (if use-last-update (cons "last_update" targ-db-last-mod) #f))) (db:sync-tables (db:sync-main-list source-db) last-update source-db cache-db) (db:sync-tables db:sync-tests-only last-update source-db cache-db) (hash-table-set! *global-db-store* target cache-db) cache-db))) ;; call a proc with a cached db ;; (define (db:call-with-cached-db proc . params) ;; first cache the db in /tmp (let* ((cname-part (conc "megatest_cache/" (common:get-testsuite-name))) (fname (conc (common:get-area-path-signature) ".db")) (cache-dir (common:get-create-writeable-dir (list (conc "/tmp/" (current-user-name) "/" cname-part) (conc "/tmp/" (current-user-name) "-" cname-part) (conc "/tmp/" (current-user-name) "_" cname-part)))) (megatest-db (conc *toppath* "/megatest.db"))) ;; (debug:print-info 0 *default-log-port* "Using cache dir " cache-dir) (if (not cache-dir) (begin (debug:print 0 *default-log-port* "ERROR: Failed to find an area to write the cache db") (exit 1)) (let* ((th1 (make-thread (lambda () (if (and (file-exists? megatest-db) (file-write-access? megatest-db)) (begin (common:sync-to-megatest.db 'timestamps) ;; internally mutexes on *db-local-sync* (debug:print-info 2 *default-log-port* "Done syncing to megatest.db")))) "call-with-cached-db sync-to-megatest.db")) (cache-db (db:cache-for-read-only megatest-db (conc cache-dir "/" fname) use-last-update: #t))) (thread-start! th1) (apply proc cache-db params) )))) ;; options: ;; ;; 'killservers - kills all servers ;; 'dejunk - removes junk records ;; 'adj-testids - move test-ids into correct ranges ;; 'old2new - sync megatest.db records to .db/{main,1,2 ...}.db ;; 'new2old - sync .db/{main,1,2,3 ...}.db to megatest.db ;; 'closeall - close all opened dbs ;; 'schema - attempt to apply schema changes ;; ;; run-ids: '(1 2 3 ...) or #f (for all) ;; |
1312 1313 1314 1315 1316 1317 1318 | 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 | - + | ;; (blocks '())) ;; a block is an archive chunck that can be added too if there is space ;; (sqlite3:for-each-row #f) ;;====================================================================== ;; L O G G I N G D B ;;====================================================================== |
1368 1369 1370 1371 1372 1373 1374 | 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 | - + - + | ;; in RUNNING or REMOTEHOSTSTART for more than 10 minutes ;; ;; HOWEVER: this code in run:test seems to work fine ;; (> (- (current-seconds)(+ (db:test-get-event_time testdat) ;; (db:test-get-run_duration testdat))) ;; 600) |
1432 1433 1434 1435 1436 1437 1438 | 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 | - + - + - + - + + + | ;; in RUNNING or REMOTEHOSTSTART for more than 10 minutes ;; ;; HOWEVER: this code in run:test seems to work fine ;; (> (- (current-seconds)(+ (db:test-get-event_time testdat) ;; (db:test-get-run_duration testdat))) ;; 600) |
1527 1528 1529 1530 1531 1532 1533 | 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 | - + - + | ;; delete all tests that have no run "DELETE FROM tests WHERE run_id NOT IN (SELECT DISTINCT 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);" )))) |
1568 1569 1570 1571 1572 1573 1574 | 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 | - + - + | (sqlite3:prepare db stmt)) (list ;; delete all tests that belong to runs that are 'deleted' ;; (conc "DELETE FROM tests WHERE run_id NOT IN (" (string-intersperse (map conc valid-runs) ",") ");") ;; delete all tests that are 'DELETED' "DELETE FROM tests WHERE state='DELETED';" )))) |
1615 1616 1617 1618 1619 1620 1621 | 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 | - + - + | ))) (dead-runs '())) (sqlite3:for-each-row (lambda (run-id) (set! dead-runs (cons run-id dead-runs))) db "SELECT id FROM runs WHERE state='deleted';") |
1787 1788 1789 1790 1791 1792 1793 | 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 | - + - + - + | (allvals (append (list runname state status user) (map cadr keyvals))) (qryvals (append (list runname) (map cadr keyvals))) (key=?str (string-intersperse (map (lambda (k)(conc k "=?")) keys) " AND "))) (debug:print 3 *default-log-port* "keys: " keys " allvals: " allvals " keyvals: " keyvals " key=?str is " key=?str) (debug:print 2 *default-log-port* "NOTE: using target " (string-intersperse (map cadr keyvals) "/") " for this run") (if (and runname (null? (filter (lambda (x)(not x)) keyvals))) ;; there must be a better way to "apply and" (let ((res #f)) |
1852 1853 1854 1855 1856 1857 1858 | 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 | - + | ))) (debug:print-info 11 *default-log-port* "db:get-runs END qrystr: " qrystr " keypatts: " keypatts " offset: " offset " limit: " count) (vector header res))) ;; TODO: Switch this to use max(update_time) from each run db? Then if using a server there is no disk traffic (using inmem db) ;; (define (db:get-changed-run-ids since-time) |
1991 1992 1993 1994 1995 1996 1997 | 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 | - + | (let* ((dbdat (db:get-db dbstruct #f)) (db (db:dbdat-get-db dbdat)) (totals (make-hash-table)) (curr (make-hash-table)) (res '()) (runs-info '())) ;; First get all the runname/run-ids |
2088 2089 2090 2091 2092 2093 2094 | 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 | - + | (res (vector #f #f #f #f)) (keys (db:get-keys dbstruct)) (remfields (list "id" "runname" "state" "status" "owner" "event_time")) (header (append keys remfields)) (keystr (conc (keys->keystr keys) "," (string-intersperse remfields ",")))) (debug:print-info 11 *default-log-port* "db:get-run-info run-id: " run-id " header: " header " keystr: " keystr) |
2116 2117 2118 2119 2120 2121 2122 | 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 | - - - - - - + + + + + + + + + | ;; does not (obviously!) removed dependent data. But why not!!? (define (db:delete-run dbstruct run-id) ;; First set any related tests to DELETED (let* ((rdbdat (db:get-db dbstruct run-id)) (rdb (db:dbdat-get-db rdbdat)) (dbdat (db:get-db dbstruct #f)) (db (db:dbdat-get-db dbdat))) |
2149 2150 2151 2152 2153 2154 2155 | 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 | - + | (sqlite3:execute db "INSERT INTO access_log (user,accessed,args) VALUES(?,strftime('%s','now'),?);" user (conc newlockval " " run-id)) (debug:print-info 1 *default-log-port* "" newlockval " run number " run-id))))) (define (db:set-run-status dbstruct run-id status msg) (let* ((dbdat (db:get-db dbstruct #f)) (db (db:dbdat-get-db dbdat))) |
2183 2184 2185 2186 2187 2188 2189 | 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 | - + - + | (let* ((keys (db:get-keys dbstruct)) (res '()) (dbdat (db:get-db dbstruct #f)) (db (db:dbdat-get-db dbdat))) (for-each (lambda (key) (let ((qry (conc "SELECT " key " FROM runs WHERE id=?;"))) |
2409 2410 2411 2412 2413 2414 2415 2416 | 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 | + - + - - - - + + - - - - + + + + + + + + + - | (let* ((dbdat (db:get-db dbstruct run-id)) (db (db:dbdat-get-db dbdat))) (db:general-call dbdat 'delete-test-step-records (list test-id)) ;; (db:delay-if-busy) (db:general-call dbdat 'delete-test-data-records (list test-id)) (sqlite3:execute db "UPDATE tests SET state='DELETED',status='n/a',comment='' WHERE id=?;" test-id))) ;; (define (db:delete-old-deleted-test-records dbstruct) |
2471 2472 2473 2474 2475 2476 2477 | 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 | - + | (else (if newstate (sqlite3:execute db "UPDATE tests SET state=? WHERE id=?;" newstate test-id)) (if newstatus (sqlite3:execute db "UPDATE tests SET status=? WHERE id=?;" newstatus test-id)) (if newcomment (sqlite3:execute db "UPDATE tests SET comment=? WHERE id=?;" newcomment ;; (sdb:qry 'getid newcomment) test-id)))) (mt:process-triggers run-id test-id newstate newstatus)))) |
2535 2536 2537 2538 2539 2540 2541 | 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 | - + | (define (db:get-count-tests-running-in-jobgroup dbstruct run-id jobgroup) (let* ((dbdat (db:get-db dbstruct #f)) (db (db:dbdat-get-db dbdat))) (if (not jobgroup) 0 ;; (let ((testnames '())) ;; get the testnames |
2581 2582 2583 2584 2585 2586 2587 | 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 | - + - + | (db:with-db dbstruct run-id #f (lambda (db) (db:first-result-default db |
2638 2639 2640 2641 2642 2643 2644 | 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 | - + | ;; NOTE: This needs rundir decoding? Decide, decode here or where used? For the moment decode where used. (define (db:get-all-tests-info-by-run-id dbstruct run-id) (let* ((dbdat (if (vector? dbstruct) (db:get-db dbstruct run-id) dbstruct)) ;; still settling on when to use dbstruct or dbdat (db (db:dbdat-get-db dbdat)) (res '())) |
2744 2745 2746 2747 2748 2749 2750 | 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 | - + - - + + | ;; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 (set! res (cons (apply vector a b) res))) db (conc "SELECT " db:test-record-qry-selector " FROM tests WHERE id in (" (string-intersperse (map conc test-ids) ",") ");")) res)))) |
2833 2834 2835 2836 2837 2838 2839 | 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 | - + | ;; if all are pass (any case) and the test status is PASS or NULL or '' then set test status to PASS. ;; if one or more are fail (any case) then set test status to PASS, non "pass" or "fail" are ignored (define (db:test-data-rollup dbstruct run-id test-id status) (let* ((dbdat (db:get-db dbstruct run-id)) (db (db:dbdat-get-db dbdat)) (fail-count 0) (pass-count 0)) |
2983 2984 2985 2986 2987 2988 2989 | 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 | - + - + | ((>) (if (> value expected) "pass" "fail")) ((<) (if (< value expected) "pass" "fail")) ((>=) (if (>= value expected) "pass" "fail")) ((<=) (if (<= value expected) "pass" "fail")) (else (conc "ERROR: bad tol comparator " tol)))))) (debug:print 4 *default-log-port* "AFTER2: category: " category " variable: " variable " value: " value ", expected: " expected " tol: " tol " units: " units " status: " status " comment: " comment) |
3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 | 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 | + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + | (regexp "_") "=" msg #t))) (lambda ()(deserialize))) (begin (debug:print-error 0 *default-log-port* "reception failed. Received " msg " but cannot translate it.") msg))) ;; crude reply for when things go awry ((zmq nmsg)(with-input-from-string msg (lambda ()(deserialize)))) (else msg))) ;; rpc ;; This is to be the big daddy call (define (db:test-set-status-state dbstruct run-id test-id status state msg) (let ((dbdat (db:get-db dbstruct run-id))) (if (member state '("LAUNCHED" "REMOTEHOSTSTART")) (db:general-call dbdat 'set-test-start-time (list test-id))) |
3182 3183 3184 3185 3186 3187 3188 | 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 | - + - + - - + | (SELECT status FROM tests WHERE id=?) NOT IN ('WARN','FAIL') THEN 'PASS' ELSE status END WHERE id=?;") ;; DONE '(test-set-log "UPDATE tests SET final_logf=? WHERE id=?;") ;; DONE ;; '(test-set-rundir-by-test-id "UPDATE tests SET rundir=? WHERE id=?") ;; DONE ;; '(test-set-rundir "UPDATE tests SET rundir=? AND testname=? AND item_path=?;") ;; DONE |
3286 3287 3288 3289 3290 3291 3292 | 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 | - + | WHEN (SELECT count(id) FROM tests WHERE testname=? AND item_path != '' AND state = 'COMPLETED' AND status = 'PASS') > 0 THEN 'PASS' WHEN pass_count > 0 AND fail_count=0 THEN 'PASS' ELSE 'UNKNOWN' END |
3308 3309 3310 3311 3312 3313 3314 | 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 | - + - - + + - + | immediate flush sync set-verbosity killserver )) |
3378 3379 3380 3381 3382 3383 3384 | 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 | - + - + | ;; can use wildcards. Also can likely be factored in with get test paths? ;; ;; Run this remotely!! ;; (define (db:get-matching-previous-test-run-records dbstruct run-id test-name item-path) (let* ((dbdat (db:get-db dbstruct #f)) (db (db:dbdat-get-db dbdat)) |
Deleted debugger.scm version [f446c83fb1].
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Added docs/inprogress/graph-draw-arch.fig version [c5d001fa40].
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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | #FIG 3.2 Produced by xfig version 3.2.5-alpha5 Landscape Center Inches Letter 100.00 Single -2 1200 2 6 5700 3075 8400 3675 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 5700 3075 8400 3075 8400 3675 5700 3675 5700 3075 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 9 5700 3525 5925 3525 5925 3225 6750 3225 6750 3450 7350 3450 7350 3600 8325 3600 8250 3525 -6 6 7425 6825 10125 7425 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 7425 6825 10125 6825 10125 7425 7425 7425 7425 6825 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 9 7425 7275 7650 7275 7650 6975 8475 6975 8475 7200 9075 7200 9075 7350 10050 7350 9975 7275 -6 2 4 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 5 3000 4650 3000 3225 600 3225 600 4650 3000 4650 2 4 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 5 2550 5100 2550 3675 150 3675 150 5100 2550 5100 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 0 0 1.00 60.00 120.00 3000 3825 5550 3450 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 5475 2400 8475 2400 8475 4650 5475 4650 5475 2400 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 0 0 1.00 60.00 120.00 7275 4725 8175 6375 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 1 8175 6375 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 6225 6300 11025 6300 11025 9000 6225 9000 6225 6300 2 4 2 1 0 7 50 -1 -1 3.000 0 0 7 0 0 5 8850 5850 8850 900 75 900 75 5850 8850 5850 2 4 0 1 0 7 50 -1 -1 3.000 0 0 7 0 0 5 4875 5550 4875 4500 3450 4500 3450 5550 4875 5550 2 1 0 1 0 7 50 -1 -1 3.000 0 0 -1 1 0 2 0 0 1.00 60.00 120.00 4500 4500 5475 4200 4 0 0 50 -1 0 12 0.0000 4 195 915 750 3525 graph data\001 4 0 0 50 -1 0 12 0.0000 4 195 525 5550 2700 layout\001 4 0 0 50 -1 0 12 0.0000 4 195 1800 6375 6525 display on dashboard\001 4 0 0 50 -1 0 12 0.0000 4 195 1065 3525 4875 megatest.db\001 4 0 0 50 -1 0 12 0.0000 4 195 6150 675 1425 Very slow! Threaded running of procedure: runtimes-tab-layout-updater\001 4 0 0 50 -1 0 12 0.0000 4 195 2865 8325 6225 fast!runtimes-tab-canvas-updater\001 |
Added docs/inprogress/megatest-architecture-proposed-2.fig version [8f30e0932f].
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 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 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 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 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 321 322 323 324 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 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 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 448 449 450 451 452 453 454 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 487 488 489 490 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | #FIG 3.2 Produced by xfig version 3.2.5-alpha5 Landscape Center Inches Letter 100.00 Single -2 1200 2 6 600 1350 1575 2400 1 1 0 1 0 7 50 -1 -1 0.000 1 0.0000 1125 1500 450 150 1125 1500 1575 1650 1 1 0 1 0 7 50 -1 -1 0.000 1 0.0000 1124 2177 450 150 1124 2177 1574 2327 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 675 1575 675 2175 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 1575 1500 1575 2175 -6 6 1875 825 2850 1875 1 1 0 1 0 7 50 -1 -1 0.000 1 0.0000 2400 975 450 150 2400 975 2850 1125 1 1 0 1 0 7 50 -1 -1 0.000 1 0.0000 2399 1652 450 150 2399 1652 2849 1802 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 1950 1050 1950 1650 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 2850 975 2850 1650 -6 6 3225 450 4200 1500 1 1 0 1 0 7 50 -1 -1 0.000 1 0.0000 3750 600 450 150 3750 600 4200 750 1 1 0 1 0 7 50 -1 -1 0.000 1 0.0000 3749 1277 450 150 3749 1277 4199 1427 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 3300 675 3300 1275 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 4200 600 4200 1275 -6 6 3075 2925 4050 3975 1 1 0 1 0 7 50 -1 -1 0.000 1 0.0000 3600 3075 450 150 3600 3075 4050 3225 1 1 0 1 0 7 50 -1 -1 0.000 1 0.0000 3599 3752 450 150 3599 3752 4049 3902 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 3150 3150 3150 3750 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 4050 3075 4050 3750 -6 6 7275 4050 12825 9675 6 8175 4125 8400 8625 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8175 4125 8400 4125 8400 4350 8175 4350 8175 4125 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8175 4350 8400 4350 8400 4575 8175 4575 8175 4350 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8175 4575 8400 4575 8400 4800 8175 4800 8175 4575 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8175 4800 8400 4800 8400 5025 8175 5025 8175 4800 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8175 5025 8400 5025 8400 5250 8175 5250 8175 5025 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8175 5250 8400 5250 8400 5475 8175 5475 8175 5250 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8175 5475 8400 5475 8400 5700 8175 5700 8175 5475 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8175 5700 8400 5700 8400 5925 8175 5925 8175 5700 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8175 5925 8400 5925 8400 6150 8175 6150 8175 5925 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8175 6150 8400 6150 8400 6375 8175 6375 8175 6150 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8175 6375 8400 6375 8400 6600 8175 6600 8175 6375 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8175 6600 8400 6600 8400 6825 8175 6825 8175 6600 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8175 6825 8400 6825 8400 7050 8175 7050 8175 6825 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8175 7050 8400 7050 8400 7275 8175 7275 8175 7050 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8175 7275 8400 7275 8400 7500 8175 7500 8175 7275 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8175 7500 8400 7500 8400 7725 8175 7725 8175 7500 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8175 7725 8400 7725 8400 7950 8175 7950 8175 7725 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8175 7950 8400 7950 8400 8175 8175 8175 8175 7950 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8175 8175 8400 8175 8400 8400 8175 8400 8175 8175 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8175 8400 8400 8400 8400 8625 8175 8625 8175 8400 -6 6 8475 4125 8700 8625 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8475 4125 8700 4125 8700 4350 8475 4350 8475 4125 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8475 4350 8700 4350 8700 4575 8475 4575 8475 4350 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8475 4575 8700 4575 8700 4800 8475 4800 8475 4575 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8475 4800 8700 4800 8700 5025 8475 5025 8475 4800 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8475 5025 8700 5025 8700 5250 8475 5250 8475 5025 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8475 5250 8700 5250 8700 5475 8475 5475 8475 5250 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8475 5475 8700 5475 8700 5700 8475 5700 8475 5475 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8475 5700 8700 5700 8700 5925 8475 5925 8475 5700 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8475 5925 8700 5925 8700 6150 8475 6150 8475 5925 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8475 6150 8700 6150 8700 6375 8475 6375 8475 6150 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8475 6375 8700 6375 8700 6600 8475 6600 8475 6375 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8475 6600 8700 6600 8700 6825 8475 6825 8475 6600 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8475 6825 8700 6825 8700 7050 8475 7050 8475 6825 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8475 7050 8700 7050 8700 7275 8475 7275 8475 7050 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8475 7275 8700 7275 8700 7500 8475 7500 8475 7275 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8475 7500 8700 7500 8700 7725 8475 7725 8475 7500 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8475 7725 8700 7725 8700 7950 8475 7950 8475 7725 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8475 7950 8700 7950 8700 8175 8475 8175 8475 7950 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8475 8175 8700 8175 8700 8400 8475 8400 8475 8175 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8475 8400 8700 8400 8700 8625 8475 8625 8475 8400 -6 6 8775 4125 9000 8625 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8775 4125 9000 4125 9000 4350 8775 4350 8775 4125 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8775 4350 9000 4350 9000 4575 8775 4575 8775 4350 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8775 4575 9000 4575 9000 4800 8775 4800 8775 4575 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8775 4800 9000 4800 9000 5025 8775 5025 8775 4800 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8775 5025 9000 5025 9000 5250 8775 5250 8775 5025 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8775 5250 9000 5250 9000 5475 8775 5475 8775 5250 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8775 5475 9000 5475 9000 5700 8775 5700 8775 5475 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8775 5700 9000 5700 9000 5925 8775 5925 8775 5700 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8775 5925 9000 5925 9000 6150 8775 6150 8775 5925 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8775 6150 9000 6150 9000 6375 8775 6375 8775 6150 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8775 6375 9000 6375 9000 6600 8775 6600 8775 6375 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8775 6600 9000 6600 9000 6825 8775 6825 8775 6600 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8775 6825 9000 6825 9000 7050 8775 7050 8775 6825 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8775 7050 9000 7050 9000 7275 8775 7275 8775 7050 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8775 7275 9000 7275 9000 7500 8775 7500 8775 7275 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8775 7500 9000 7500 9000 7725 8775 7725 8775 7500 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8775 7725 9000 7725 9000 7950 8775 7950 8775 7725 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8775 7950 9000 7950 9000 8175 8775 8175 8775 7950 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8775 8175 9000 8175 9000 8400 8775 8400 8775 8175 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 8775 8400 9000 8400 9000 8625 8775 8625 8775 8400 -6 6 9075 4125 9300 8625 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9075 4125 9300 4125 9300 4350 9075 4350 9075 4125 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9075 4350 9300 4350 9300 4575 9075 4575 9075 4350 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9075 4575 9300 4575 9300 4800 9075 4800 9075 4575 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9075 4800 9300 4800 9300 5025 9075 5025 9075 4800 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9075 5025 9300 5025 9300 5250 9075 5250 9075 5025 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9075 5250 9300 5250 9300 5475 9075 5475 9075 5250 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9075 5475 9300 5475 9300 5700 9075 5700 9075 5475 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9075 5700 9300 5700 9300 5925 9075 5925 9075 5700 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9075 5925 9300 5925 9300 6150 9075 6150 9075 5925 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9075 6150 9300 6150 9300 6375 9075 6375 9075 6150 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9075 6375 9300 6375 9300 6600 9075 6600 9075 6375 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9075 6600 9300 6600 9300 6825 9075 6825 9075 6600 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9075 6825 9300 6825 9300 7050 9075 7050 9075 6825 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9075 7050 9300 7050 9300 7275 9075 7275 9075 7050 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9075 7275 9300 7275 9300 7500 9075 7500 9075 7275 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9075 7500 9300 7500 9300 7725 9075 7725 9075 7500 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9075 7725 9300 7725 9300 7950 9075 7950 9075 7725 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9075 7950 9300 7950 9300 8175 9075 8175 9075 7950 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9075 8175 9300 8175 9300 8400 9075 8400 9075 8175 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9075 8400 9300 8400 9300 8625 9075 8625 9075 8400 -6 6 9375 4125 9600 8625 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9375 4125 9600 4125 9600 4350 9375 4350 9375 4125 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9375 4350 9600 4350 9600 4575 9375 4575 9375 4350 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9375 4575 9600 4575 9600 4800 9375 4800 9375 4575 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9375 4800 9600 4800 9600 5025 9375 5025 9375 4800 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9375 5025 9600 5025 9600 5250 9375 5250 9375 5025 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9375 5250 9600 5250 9600 5475 9375 5475 9375 5250 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9375 5475 9600 5475 9600 5700 9375 5700 9375 5475 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9375 5700 9600 5700 9600 5925 9375 5925 9375 5700 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9375 5925 9600 5925 9600 6150 9375 6150 9375 5925 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9375 6150 9600 6150 9600 6375 9375 6375 9375 6150 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9375 6375 9600 6375 9600 6600 9375 6600 9375 6375 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9375 6600 9600 6600 9600 6825 9375 6825 9375 6600 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9375 6825 9600 6825 9600 7050 9375 7050 9375 6825 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9375 7050 9600 7050 9600 7275 9375 7275 9375 7050 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9375 7275 9600 7275 9600 7500 9375 7500 9375 7275 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9375 7500 9600 7500 9600 7725 9375 7725 9375 7500 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9375 7725 9600 7725 9600 7950 9375 7950 9375 7725 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9375 7950 9600 7950 9600 8175 9375 8175 9375 7950 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9375 8175 9600 8175 9600 8400 9375 8400 9375 8175 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9375 8400 9600 8400 9600 8625 9375 8625 9375 8400 -6 # Dimension line: 1-1/16 in 6 7875 9375 9150 9675 # main dimension line 2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 1 2 1 1 1.00 60.00 120.00 1 1 1.00 60.00 120.00 7875 9525 9150 9525 # text box 2 3 0 1 4 7 49 -1 20 0.000 0 0 -1 0 0 5 8085 9375 8085 9675 8939 9675 8939 9375 8085 9375 # tick 2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2 7875 9375 7875 9675 # tick 2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2 9150 9375 9150 9675 4 1 0 48 -1 0 12 -0.0000 4 180 735 8512 9585 1-1/16 in\001 -6 # Dimension line: 1-11/16 in 6 7425 4125 7725 6150 # main dimension line 2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 1 2 1 1 1.00 60.00 120.00 1 1 1.00 60.00 120.00 7575 4125 7575 6150 # text box 2 3 0 1 4 7 49 -1 20 0.000 0 0 -1 0 0 5 7425 5617 7725 5617 7725 4657 7425 4657 7425 5617 # tick 2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2 7425 6150 7725 6150 # tick 2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2 7425 4125 7725 4125 4 1 0 48 -1 0 12 1.5708 4 180 840 7635 5137 1-11/16 in\001 -6 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 7800 4050 12825 4050 12825 8925 7800 8925 7800 4050 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9225 6225 12450 6225 12450 8325 9225 8325 9225 6225 2 2 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 5 9225 6150 9675 6150 9675 8400 9225 8400 9225 6150 4 0 0 50 -1 0 12 0.0000 4 150 150 8475 9300 X\001 4 0 0 50 -1 0 12 0.0000 4 150 135 7275 6975 Y\001 -6 6 14100 150 19950 6075 6 14850 1350 15825 2400 1 1 0 1 0 7 50 -1 -1 0.000 1 0.0000 15375 1500 450 150 15375 1500 15825 1650 1 1 0 1 0 7 50 -1 -1 0.000 1 0.0000 15374 2177 450 150 15374 2177 15824 2327 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 14925 1575 14925 2175 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 15825 1500 15825 2175 -6 2 4 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 5 17025 4050 17025 3450 15750 3450 15750 4050 17025 4050 2 1 0 1 0 7 50 -1 -1 3.000 0 0 -1 1 1 2 0 0 1.00 60.00 120.00 0 0 1.00 60.00 120.00 16050 3375 15525 2400 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 15825 5325 17175 5325 17175 5850 15825 5850 15825 5325 2 1 0 1 0 7 50 -1 -1 3.000 0 0 -1 1 1 2 0 0 1.00 60.00 120.00 0 0 1.00 60.00 120.00 16350 4050 16350 5325 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 17550 4800 18900 4800 18900 5325 17550 5325 17550 4800 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 18375 3900 19725 3900 19725 4425 18375 4425 18375 3900 2 1 0 1 0 7 50 -1 -1 3.000 0 0 -1 1 1 2 0 0 1.00 60.00 120.00 0 0 1.00 60.00 120.00 16725 4050 17850 4800 2 1 0 1 0 7 50 -1 -1 3.000 0 0 -1 1 1 2 0 0 1.00 60.00 120.00 0 0 1.00 60.00 120.00 17025 3750 18375 4125 2 1 0 1 14 7 50 -1 -1 3.000 0 0 -1 1 1 3 0 0 1.00 60.00 120.00 0 0 1.00 60.00 120.00 18975 3900 18075 2625 15900 1875 2 2 0 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 5 14100 150 19950 150 19950 6075 14100 6075 14100 150 4 0 0 50 -1 0 12 0.0000 4 150 900 15825 3675 rpc-server\001 4 0 0 50 -1 0 12 0.0000 4 165 270 17475 3825 tcp\001 4 0 0 50 -1 0 12 0.0000 4 120 315 18525 4125 test\001 4 0 0 50 -1 0 12 0.0000 4 195 1065 14850 1200 megatest.db\001 4 0 0 50 -1 0 12 0.0000 4 150 1020 14325 525 basic model\001 -6 6 14850 7425 15825 8475 1 1 0 1 0 7 50 -1 -1 0.000 1 0.0000 15375 7575 450 150 15375 7575 15825 7725 1 1 0 1 0 7 50 -1 -1 0.000 1 0.0000 15374 8252 450 150 15374 8252 15824 8402 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 14925 7650 14925 8250 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 15825 7575 15825 8250 -6 6 17775 6675 18750 7725 1 1 0 1 0 7 50 -1 -1 0.000 1 0.0000 18300 6825 450 150 18300 6825 18750 6975 1 1 0 1 0 7 50 -1 -1 0.000 1 0.0000 18299 7502 450 150 18299 7502 18749 7652 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 17850 6900 17850 7500 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 18750 6825 18750 7500 -6 6 4875 6075 5850 7125 1 1 0 1 0 7 50 -1 -1 0.000 1 0.0000 5400 6225 450 150 5400 6225 5850 6375 1 1 0 1 0 7 50 -1 -1 0.000 1 0.0000 5399 6902 450 150 5399 6902 5849 7052 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 4950 6300 4950 6900 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 5850 6225 5850 6900 -6 6 5400 7425 7350 8925 6 5475 7650 6450 8700 1 1 0 1 0 7 50 -1 -1 0.000 1 0.0000 6000 7800 450 150 6000 7800 6450 7950 1 1 0 1 0 7 50 -1 -1 0.000 1 0.0000 5999 8477 450 150 5999 8477 6449 8627 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 5550 7875 5550 8475 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 6450 7800 6450 8475 -6 4 0 0 50 -1 0 12 0.0000 4 195 1905 5400 8850 pointers to the servers\001 4 0 0 50 -1 0 12 0.0000 4 150 930 5550 7575 monitor.db\001 -6 6 6150 2700 7500 3225 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 6150 2700 7500 2700 7500 3225 6150 3225 6150 2700 4 0 0 50 -1 0 12 0.0000 4 180 870 6225 2925 run2/test1\001 -6 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 1 2 0 0 1.00 60.00 120.00 0 0 1.00 60.00 120.00 1725 5025 1275 2475 2 4 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 5 5550 4500 5550 225 225 225 225 4500 5550 4500 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 1 2 0 0 1.00 60.00 120.00 0 0 1.00 60.00 120.00 1875 7725 1875 5775 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 1425 7725 2775 7725 2775 8250 1425 8250 1425 7725 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 3375 7725 4725 7725 4725 8250 3375 8250 3375 7725 2 1 0 1 0 7 50 -1 -1 3.000 0 0 -1 1 1 2 0 0 1.00 60.00 120.00 0 0 1.00 60.00 120.00 3675 7725 2175 5775 2 4 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 5 2775 5700 2775 5100 1500 5100 1500 5700 2775 5700 2 1 0 1 0 7 50 -1 -1 3.000 0 0 -1 1 1 2 0 0 1.00 60.00 120.00 0 0 1.00 60.00 120.00 6600 3300 2925 5025 2 4 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 5 17025 10125 17025 9525 15750 9525 15750 10125 17025 10125 2 1 0 1 0 7 50 -1 -1 3.000 0 0 -1 1 1 2 0 0 1.00 60.00 120.00 0 0 1.00 60.00 120.00 16050 9450 15525 8475 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 15825 11400 17175 11400 17175 11925 15825 11925 15825 11400 2 1 0 1 0 7 50 -1 -1 3.000 0 0 -1 1 1 2 0 0 1.00 60.00 120.00 0 0 1.00 60.00 120.00 16350 10125 16350 11400 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 17550 10875 18900 10875 18900 11400 17550 11400 17550 10875 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 18375 9975 19725 9975 19725 10500 18375 10500 18375 9975 2 1 0 1 0 7 50 -1 -1 3.000 0 0 -1 1 1 2 0 0 1.00 60.00 120.00 0 0 1.00 60.00 120.00 16725 10125 17850 10875 2 1 0 1 0 7 50 -1 -1 3.000 0 0 -1 1 1 2 0 0 1.00 60.00 120.00 0 0 1.00 60.00 120.00 17025 9825 18375 10200 2 1 0 1 14 7 50 -1 -1 3.000 0 0 -1 1 1 3 0 0 1.00 60.00 120.00 0 0 1.00 60.00 120.00 18975 9975 18075 8700 15900 7950 2 2 0 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 5 14100 6225 19950 6225 19950 12150 14100 12150 14100 6225 2 1 0 1 0 7 50 -1 -1 3.000 0 0 -1 1 1 2 0 0 1.00 60.00 120.00 0 0 1.00 60.00 120.00 16575 9375 17850 7950 2 2 0 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 5 2100 10425 6150 10425 6150 14400 2100 14400 2100 10425 2 2 0 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 5 2325 10875 5925 10875 5925 13800 2325 13800 2325 10875 2 2 0 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 5 2400 10950 3975 10950 3975 11625 2400 11625 2400 10950 2 4 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 5 5325 12675 5325 12075 4050 12075 4050 12675 5325 12675 2 1 0 1 0 7 50 -1 -1 3.000 0 0 -1 1 0 2 0 0 1.00 60.00 120.00 3975 11250 4575 12075 2 1 0 1 0 7 50 -1 -1 3.000 0 0 -1 1 1 2 0 0 1.00 60.00 120.00 0 0 1.00 60.00 120.00 2175 5025 3075 3750 2 1 0 1 0 7 50 -1 -1 3.000 0 0 -1 1 1 2 0 0 1.00 60.00 120.00 0 0 1.00 60.00 120.00 4800 6375 2850 5550 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 1 2 0 0 1.00 60.00 120.00 0 0 1.00 60.00 120.00 3600 2475 7425 6525 4 0 0 50 -1 0 12 0.0000 4 195 990 1800 2625 last_update\001 4 0 0 50 -1 0 12 0.0000 4 150 690 3150 4125 main.db\001 4 0 0 50 -1 0 12 0.0000 4 195 990 4200 3600 last_update\001 4 0 0 50 -1 0 12 0.0000 4 195 330 1950 6825 http\001 4 0 0 50 -1 0 12 0.0000 4 180 870 1575 7950 run1/test1\001 4 0 0 50 -1 0 12 0.0000 4 150 720 1650 5400 server-1\001 4 0 0 50 -1 0 12 0.0000 4 150 375 2175 2025 2.db\001 4 0 0 50 -1 0 12 0.0000 4 150 375 750 2550 1.db\001 4 0 0 50 -1 0 12 0.0000 4 180 870 3450 7950 run1/test2\001 4 0 0 50 -1 0 12 0.0000 4 150 1110 9675 3750 Dashboardm\001 4 0 0 50 -1 0 12 1.5708 4 150 390 8325 3975 run1\001 4 0 0 50 -1 0 12 0.0000 4 150 900 15825 9750 rpc-server\001 4 0 0 50 -1 0 12 0.0000 4 165 270 17475 9900 tcp\001 4 0 0 50 -1 0 12 0.0000 4 120 315 18525 10200 test\001 4 0 0 50 -1 0 12 0.0000 4 195 1065 14850 7275 megatest.db\001 4 0 0 50 -1 0 12 0.0000 4 195 1305 17700 7875 mysql/postgres\001 4 0 0 50 -1 0 12 0.0000 4 195 1875 14325 6600 mysql/postgres model\001 4 0 0 50 -1 0 12 0.0000 4 195 4065 600 9300 Current state, no bypass - (if we switch to rpc?)\001 4 0 0 50 -1 0 12 0.0000 4 195 1125 2175 10650 prev try RPC\001 4 0 0 50 -1 0 12 0.0000 4 165 1095 2475 11100 rmt:get-tests\001 4 0 0 50 -1 0 12 0.0000 4 195 2205 450 525 /tmp/<user>/??? /.db/*.db\001 4 0 0 50 -1 0 12 0.0000 4 195 1065 4800 7350 megatest.db\001 4 0 0 50 -1 0 12 0.0000 4 150 1785 600 8775 Possible Future state\001 4 0 0 50 -1 0 12 0.0000 4 150 1110 8025 450 CHANGES:\001 4 0 0 50 -1 0 12 0.0000 4 195 2145 8025 705 1. http -> rcp or nanomsg\001 4 0 0 50 -1 0 12 0.0000 4 195 3330 8025 960 2. cache db moves from inmem to /tmp\001 |
Modified fs-transport.scm from [59920959a9] to [28e812486e].
33 34 35 36 37 38 39 | 33 34 35 36 37 38 39 40 41 42 43 44 | - - + + - + | ;;====================================================================== ;; There is no "server" per se but a convience routine to make it non ;; necessary to be reopening the db over and over again. ;; (define (fs:process-queue-item packet) |
Modified http-transport.scm from [13883e3b0d] to [879b6e88d1].
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | 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 | + - | (declare (uses common)) (declare (uses db)) (declare (uses tests)) (declare (uses tasks)) ;; tasks are where stuff is maintained about what is running. (declare (uses server)) (declare (uses daemon)) (declare (uses portlogger)) (declare (uses rmt)) (include "common_records.scm") (include "db_records.scm") (define (http-transport:make-server-url hostport) (if (not hostport) #f (conc "http://" (car hostport) ":" (cadr hostport)))) (define *server-loop-heart-beat* (current-seconds)) |
56 57 58 59 60 61 62 | 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | - | (ipaddrstr (let ((ipstr (if (string=? "-" hostn) ;; (string-intersperse (map number->string (u8vector->list (hostname->ip hostname))) ".") (server:get-best-guess-address hostname) #f))) (if ipstr ipstr hostn))) ;; hostname))) (start-port (portlogger:open-run-close portlogger:find-port)) (link-tree-path (configf:lookup *configdat* "setup" "linktree"))) |
80 81 82 83 84 85 86 | 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | - + - + | ;; This is were we set up the database connections (let* (($ (request-vars source: 'both)) (dat ($ 'dat)) (res #f)) (cond ((equal? (uri-path (request-uri (current-request))) '(/ "api")) |
110 111 112 113 114 115 116 | 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | - + | (http-transport:try-start-server run-id ipaddrstr start-port server-id))) ;; This is recursively run by http-transport:run until sucessful ;; (define (http-transport:try-start-server run-id ipaddrstr portnum server-id) (let ((config-hostname (configf:lookup *configdat* "server" "hostname")) (tdbdat (tasks:open-db))) |
219 220 221 222 223 224 225 | 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - + + + | (http-transport:server-dat-get-api-req serverdat) (begin (debug:print 0 *default-log-port* "FATAL ERROR: http-transport:client-api-send-receive called with no server info") (exit 1)))) (res #f) (success #t) (sparams (db:obj->string params transport: 'http))) |
297 298 299 300 301 302 303 | 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 | - + + + - + | res (begin ;; note: this code also called in nmsg-transport - consider consolidating it (debug:print-error 0 *default-log-port* "error occured at server, info=" (vector-ref res 2)) (debug:print 0 *default-log-port* " client call chain:") (print-call-chain (current-error-port)) (debug:print 0 *default-log-port* " server call chain:") (pp (vector-ref res 1) (current-error-port)) |
371 372 373 374 375 376 377 | 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 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 | + + - + - + + - + + - + - - - - - - - - - - - - - - - - - - - - - + - - - - - + - - + - - - - - - - - - + + + + + + + + - - - - - - + + + + + + + + + + + + + + - + - + - + | (debug:print-info 0 *default-log-port* "Waiting for server alive signature") (mutex-lock! *heartbeat-mutex*) (set! sdat *server-info*) (mutex-unlock! *heartbeat-mutex*) (if (and sdat (not changed) (> (- (current-seconds) start-time) 2)) (begin (debug:print-info 0 *default-log-port* "Received server alive signature") |
481 482 483 484 485 486 487 | 452 453 454 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 487 488 489 490 491 492 493 494 495 496 497 498 499 | - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - | ;; ;; Consider implementing some smarts here to re-insert the record or kill self is ;; the db indicates so ;; ;; (if (tasks:server-am-i-the-server? tdb run-id) ;; (tasks:server-set-state! tdb server-id "running")) ;; |
513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 | 509 510 511 512 513 514 515 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 554 555 556 557 558 559 560 561 562 563 | + + + + + + - + + + + | (if (eq? *number-non-write-queries* 0) "n/a (no queries)" (/ *total-non-write-delay* *number-non-write-queries*)) " ms") (debug:print-info 0 *default-log-port* "Server shutdown complete. Exiting") (tasks:server-delete-record (db:delay-if-busy tdbdat) server-id " http-transport:keep-running complete") ;; if the .server file contained :myport then we can remove it (server:remove-dotserver-file *toppath* port) (exit))) ;; all routes though here end in exit ... ;; ;; start_server? ;; (define (http-transport:launch run-id) (with-output-to-file (conc *toppath* "/.starting-server") (lambda () (print (current-process-id) " on " (get-host-name)))) (let* ((tdbdat (tasks:open-db))) (set! *run-id* run-id) (if (args:get-arg "-daemonize") (begin (daemon:ize) (if *alt-log-file* ;; we should re-connect to this port, I think daemon:ize disrupts it (begin (current-error-port *alt-log-file*) (current-output-port *alt-log-file*))))) (if (server:check-if-running run-id) (begin (debug:print 0 *default-log-port* "INFO: Server for run-id " run-id " already running") |
630 631 632 633 634 635 636 | 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 | - + | " ms</td></tr>" "<tr><td>Number non-cached queries</td> <td>" *number-non-write-queries* "</td></tr>" "<tr><td>Average non-cached time</td> <td>" (if (eq? *number-non-write-queries* 0) "n/a (no queries)" (/ *total-non-write-delay* *number-non-write-queries*)) " ms</td></tr>" |
Modified launch.scm from [53f264e03f] to [4e784cfd15].
238 239 240 241 242 243 244 | 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 | - - + + | ;; (run-n-wait fullrunscript))) ;; (tests:test-set-status! test-id "RUNNING" "n/a" #f #f) ;; Since we should have a clean slate at this time there is no need to do ;; any of the other stuff that tests:test-set-status! does. Let's just ;; force RUNNING/n/a ;; (thread-sleep! 0.3) |
386 387 388 389 390 391 392 | 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 | - - + + | (begin (thread-sleep! 3) ;; (+ 3 (random 6))) ;; add some jitter to the call home time to spread out the db accesses (if (hash-table-ref/default misc-flags 'keep-going #f) ;; keep originals for cpu-load and disk-free unless they change more than the allowed delta (loop (calc-minutes) (or new-cpu-load cpu-load) (or new-disk-free disk-free))))))) (tests:update-central-meta-info run-id test-id (get-cpu-load) (get-df (current-directory))(calc-minutes) #f #f))) ;; NOTE: Checking twice for keep-going is intentional (define (launch:execute encoded-cmd) |
434 435 436 437 438 439 440 | 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 | - + + | (if (or (file-exists? top-path) (> count 10)) (change-directory top-path) (begin (debug:print 0 *default-log-port* "INFO: Not starting job yet - directory " top-path " not found") (thread-sleep! 10) (loop (+ count 1))))) |
700 701 702 703 704 705 706 707 708 709 710 711 712 713 | 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 | + + + + + + + + + + + + | ;; *toppath* ;; side effects: ;; sets; *configdat* (megatest.config info) ;; *runconfigdat* (runconfigs.config info) ;; *configstatus* (status of the read data) ;; (define (launch:setup #!key (force #f)) (mutex-lock! *launch-setup-mutex*) (if (and *toppath* (eq? *configstatus* 'fulldata)) ;; got it all (begin (debug:print 0 *default-log-port* "NOTE: skipping launch:setup-body call since we have fulldata") (mutex-unlock! *launch-setup-mutex*) *toppath*) (let ((res (launch:setup-body force: force))) (mutex-unlock! *launch-setup-mutex*) res))) (define (launch:setup-body #!key (force #f)) (let* ((toppath (or *toppath* (getenv "MT_RUN_AREA_HOME"))) ;; preserve toppath (runname (common:args-get-runname)) (target (common:args-get-target)) (linktree (common:get-linktree)) (sections (if target (list "default" target) #f)) ;; for runconfigs (mtconfig (or (args:get-arg "-config") "megatest.config")) ;; allow overriding megatest.config (rundir (if (and runname target linktree)(conc linktree "/" target "/" runname) #f)) |
894 895 896 897 898 899 900 | 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 | - + | (lnkbase (conc linktree "/" target "/" runname)) (lnkpath (conc lnkbase "/" testname)) (lnkpathf (conc lnkpath (if not-iterated "" "/") item-path)) (lnktarget (conc lnkpath "/" item-path))) ;; Update the rundir path in the test record for all, rundir=physical, shortdir=logical ;; rundir shortdir |
967 968 969 970 971 972 973 | 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 | - + | (hash-table-set! *toptest-paths* testname curr-test-path) ;; NB// Was this for the test or for the parent in an iterated test? (rmt:general-call 'test-set-rundir-shortdir run-id lnkpath (if (file-exists? lnkpath) ;; (resolve-pathname lnkpath) (common:nice-path lnkpath) lnkpath) |
1116 1117 1118 1119 1120 1121 1122 1123 | 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 | + - + | (not (member (db:test-get-rundir testinfo)(list "n/a" "/tmp/badname")))) ;; n/a is a placeholder and thus not a read dir (begin (debug:print-info 0 *default-log-port* "attempting to preclean directory " (db:test-get-rundir testinfo) " for test " test-name "/" item-path) (runs:remove-test-directory testinfo 'remove-data-only))) ;; remove data only, do not perturb the record ;; prevent overlapping actions - set to LAUNCHED as early as possible ;; ;; the following call handles waiver propogation. cannot yet condense into roll-up-pass-fail (tests:test-set-status! run-id test-id "LAUNCHED" "n/a" #f #f) ;; (if launch-results launch-results "FAILED")) |
Modified megatest.scm from [53f98c25e7] to [0f68bdb0a0].
139 140 141 142 143 144 145 146 147 148 149 150 151 152 | 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | + | Misc -start-dir path : switch to this directory before running megatest -rebuild-db : bring the database schema up to date -cleanup-db : remove any orphan records, vacuum the db -import-megatest.db : migrate a database from v1.55 series to v1.60 series -sync-to-megatest.db : migrate data back to megatest.db -use-db-cache : use cached access to db to reduce load -update-meta : update the tests metadata for all tests -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|rpc : use http or rpc for transport (default is http) -daemonize : fork into background and disconnect from stdin/out |
257 258 259 260 261 262 263 | 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 | + + - - + + - + + | "-o" "-log" "-archive" "-since" "-fields" "-recover-test" ;; run-id,test-id - used internally to recover a test stuck in RUNNING state "-sort" "-target-db" "-source-db" |
337 338 339 340 341 342 343 | 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 | - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ;; immediately set MT_TARGET if -reqtarg or -target are available ;; (let ((targ (or (args:get-arg "-reqtarg")(args:get-arg "-target")))) (if targ (setenv "MT_TARGET" targ))) ;; The watchdog is to keep an eye on things like db sync etc. ;; |
478 479 480 481 482 483 484 485 486 487 488 489 490 491 | 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 | + + + + + + + + | (debug:print 0 *default-log-port* "WARNING: \"-runtests\" is deprecated. Use \"-run\" with \"-testpatt\" instead")) (on-exit std-exit-procedure) ;;====================================================================== ;; Misc general calls ;;====================================================================== (if (and (args:get-arg "-cache-db") (args:get-arg "-source-db")) (let* ((temp-dir (or (args:get-arg "-target-db") (create-directory (conc "/tmp/" (getenv "USER") "/" (string-translate (current-directory) "/" "_"))))) (target-db (conc temp-dir "/cached.db")) (source-db (args:get-arg "-source-db"))) (db:cache-for-read-only source-db target-db) (set! *didsomething* #t))) ;; handle a clean-cache request as early as possible ;; (if (args:get-arg "-clean-cache") (begin (set! *didsomething* #t) ;; suppress the help output. (if (getenv "MT_TARGET") ;; no point in trying if no target |
679 680 681 682 683 684 685 | 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 | - + - + | (else (pp data)))))) (if out-file (close-output-port out-port)) (exit) ;; yes, bending the rules here - need to exit since this is a utility )) (if (args:get-arg "-ping") |
734 735 736 737 738 739 740 | 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 | - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - | ;;====================================================================== (if (args:get-arg "-server") ;; Server? Start up here. ;; (let ((tl (launch:setup)) |
1036 1037 1038 1039 1040 1041 1042 | 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 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 | - + + - - - + + + + + | dat))) (string-split fields-spec "+"))) (define (get-value-by-fieldname datavec test-field-index fieldname) (let ((indx (hash-table-ref/default test-field-index fieldname #f))) (if indx (if (>= indx (vector-length datavec)) |
1126 1127 1128 1129 1130 1131 1132 | 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 | - + | (hash-table-set! data "targets" (cons targetstr (hash-table-ref/default data "targets" '()))) ))) (let* ((run-id (db:get-value-by-header run header "id")) (runname (db:get-value-by-header run header "runname")) (states (string-split (or (args:get-arg "-state") "") ",")) (statuses (string-split (or (args:get-arg "-status") "") ",")) (tests (if tests-spec |
1251 1252 1253 1254 1255 1256 1257 | 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 | - + | (conc "\n rundir: " (get-value-by-fieldname test test-field-index "rundir")) ;; (db:test-get-rundir test) "") ;; "\n rundir: " (get-value-by-fieldname test test-field-index "") ;; (sdb:qry 'getstr ;; (filedb:get-path *fdb* ;; (db:test-get-rundir test) ;; ) ) ;; Each test ;; DO NOT remote run |
1900 1901 1902 1903 1904 1905 1906 | 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 | + + + - - + + - - + + | ;; fakeout readline (include "readline-fix.scm") (if (or (getenv "MT_RUNSCRIPT") (args:get-arg "-repl") (args:get-arg "-load")) (let* ((toppath (launch:setup)) (dbstruct (if (and toppath (common:on-homehost?)) (db:setup) |
1988 1989 1990 1991 1992 1993 1994 | 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 | - + - + - + | ;; ;; ;; redo me (db:close-all dbstruct) ;; ;; ;; redo me (list "uname" "rundir" "final_logf" "comment")) ;; ;; ;; redo me (set! *didsomething* #t))) (if (args:get-arg "-import-megatest.db") (begin (db:multi-db-sync |
Modified mt.scm from [22f271eaa3] to [1d20117cfc].
175 176 177 178 179 180 181 | 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | - - - - - - - - - + + + + + + + + + + + + + - + | (define (mt:test-set-state-status-by-id run-id test-id newstate newstatus newcomment) (if (not (and run-id test-id)) (begin (debug:print-error 0 *default-log-port* "bad data handed to mt:test-set-state-status-by-id, run-id=" run-id ", test-id=" test-id ", newstate=" newstate) (print-call-chain (current-error-port)) #f) (begin |
Deleted newdashboard.scm version [6cbd88e309].
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Added oldsrc/debugger.scm version [f446c83fb1].
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 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | (use iup) (define *debugger-control* #f) (define *debugger-rownum* 0) (define *debugger-matrix* #f) (define *debugger* #f) (define (debugger) (if (not *debugger*) (set! *debugger* (thread-start! (make-thread (lambda () (show (dialog (let ((pause #f) (mtrx (matrix #:expand "YES" #:numlin 30 #:numcol 3 #:numlin-visible 20 #:numcol-visible 2 #:alignment1 "ALEFT" ))) (set! pause (button "Pause" #:action (lambda (obj) (set! *debugger-control* (not *debugger-control*)) (attribute-set! pause "BGCOLOR" (if *debugger-control* "200 0 0" "0 0 200"))))) (set! *debugger-matrix* mtrx) (attribute-set! mtrx "WIDTH1" "300") (vbox mtrx (hbox pause))))) (main-loop))))))) (define (debugger-start #!key (start 2)) (set! *debugger-rownum* start)) (define (debugger-trace-var varname varval) (let ((oldval (attribute *debugger-matrix* (conc *debugger-rownum* ":1"))) (newval (conc varval))) (if (not (equal? oldval newval)) (begin ;; (print "DEBUG: " varname " = " newval) (attribute-set! *debugger-matrix* (conc *debugger-rownum* ":0") varname) (attribute-set! *debugger-matrix* (conc *debugger-rownum* ":1") (conc varval)) ;; (attribute-set! *debugger-matrix* "FITTOTEXT" "C1") )) (set! *debugger-rownum* (+ *debugger-rownum* 1)))) (define (debugger-pauser) (debugger) (attribute-set! *debugger-matrix* "REDRAW" "ALL") (let loop () (if *debugger-control* (begin (print "PAUSED!") (thread-sleep! 1) (loop)) ;;(thread-sleep! 0.01) ))) ;; ;; lets use the debugger eh? ;; (debugger-start) ;; (debugger-trace-var "can-run-more" can-run-more) ;; (debugger-trace-var "hed" hed) ;; (debugger-trace-var "prereqs-not-met" (runs:pretty-string prereqs-not-met)) ;; (debugger-pauser) |
Added oldsrc/newdashboard.scm version [6cbd88e309].
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 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 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 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 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 321 322 323 324 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 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 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 448 449 450 451 452 453 454 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 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 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 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | ;;====================================================================== ;; Copyright 2006-2013, Matthew Welland. ;; ;; This program is made available under the GNU GPL version 2.0 or ;; greater. See the accompanying file COPYING for details. ;; ;; This program is distributed WITHOUT ANY WARRANTY; without even the ;; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ;; PURPOSE. ;;====================================================================== (use format numbers) (require-library iup) (import (prefix iup iup:)) (use canvas-draw) (use sqlite3 srfi-1 posix regex regex-case srfi-69) (import (prefix sqlite3 sqlite3:)) (declare (uses margs)) (declare (uses launch)) (declare (uses megatest-version)) (declare (uses gutils)) (declare (uses db)) (declare (uses server)) (declare (uses synchash)) (declare (uses dcommon)) (declare (uses tree)) (include "common_records.scm") (include "db_records.scm") (include "key_records.scm") (define help (conc "Megatest Dashboard, documentation at http://www.kiatoa.com/fossils/megatest version " megatest-version " license GPL, Copyright (C) Matt Welland 2011 Usage: dashboard [options] -h : this help -server host:port : connect to host:port instead of db access -test testid : control test identified by testid -guimonitor : control panel for runs Misc -rows N : set number of rows ")) ;; process args (define remargs (args:get-args (argv) (list "-rows" "-run" "-test" "-debug" "-host" ) (list "-h" "-guimonitor" "-main" "-v" "-q" ) args:arg-hash 0)) (if (args:get-arg "-h") (begin (print help) (exit))) (if (not (launch:setup)) (begin (print "Failed to find megatest.config, exiting") (exit 1))) ;; (if (args:get-arg "-host") ;; (begin ;; (set! *runremote* (string-split (args:get-arg "-host" ":"))) ;; (client:launch)) ;; (client:launch)) ;; ease debugging by loading ~/.dashboardrc (let ((debugcontrolf (conc (get-environment-variable "HOME") "/.dashboardrc"))) (if (file-exists? debugcontrolf) (load debugcontrolf))) (define *dbdir* (db:dbfile-path #f)) ;; (conc (configf:lookup *configdat* "setup" "linktree") "/.db")) (define *dbstruct-local* (make-dbr:dbstruct path: *dbdir* local: #t)) (define *db-file-path* (db:dbfile-path 0)) ;; HACK ALERT: this is a hack, please fix. (define *read-only* (not (file-read-access? *db-file-path*))) (debug:setup) (define *tim* (iup:timer)) (define *ord* #f) (iup:attribute-set! *tim* "TIME" 300) (iup:attribute-set! *tim* "RUN" "YES") (define (message-window msg) (iup:show (iup:dialog (iup:vbox (iup:label msg #:margin "40x40"))))) (define (iuplistbox-fill-list lb items . default) (let ((i 1) (selected-item (if (null? default) #f (car default)))) (iup:attribute-set! lb "VALUE" (if selected-item selected-item "")) (for-each (lambda (item) (iup:attribute-set! lb (number->string i) item) (if selected-item (if (equal? selected-item item) (iup:attribute-set! lb "VALUE" item))) ;; (number->string i)))) (set! i (+ i 1))) items) i)) (define (pad-list l n)(append l (make-list (- n (length l))))) (define (mkstr . x) (string-intersperse (map conc x) ",")) (define (update-search x val) (hash-table-set! *searchpatts* x val)) ;; mtest is actually the megatest.config file ;; (define (mtest window-id) (let* ((curr-row-num 0) (rawconfig (read-config (conc *toppath* "/megatest.config") #f 'return-string)) (keys-matrix (dcommon:keys-matrix rawconfig)) (setup-matrix (dcommon:section-matrix rawconfig "setup" "Varname" "Value")) (jobtools-matrix (iup:matrix #:expand "YES" #:numcol 1 #:numlin 5 #:numcol-visible 1 #:numlin-visible 3)) (validvals-matrix (iup:matrix #:expand "YES" #:numcol 1 #:numlin 2 #:numcol-visible 1 #:numlin-visible 2)) (envovrd-matrix (iup:matrix #:expand "YES" #:numcol 1 #:numlin 20 #:numcol-visible 1 #:numlin-visible 8)) (disks-matrix (iup:matrix #:expand "YES" #:numcol 1 #:numlin 20 #:numcol-visible 1 #:numlin-visible 8)) ) (iup:attribute-set! disks-matrix "0:0" "Disk Name") (iup:attribute-set! disks-matrix "0:1" "Disk Path") (iup:attribute-set! disks-matrix "WIDTH1" "120") (iup:attribute-set! disks-matrix "WIDTH0" "100") (iup:attribute-set! disks-matrix "ALIGNMENT1" "ALEFT") (iup:attribute-set! disks-matrix "FIXTOTEXT" "C1") (iup:attribute-set! disks-matrix "RESIZEMATRIX" "YES") ;; fill in existing info (for-each (lambda (mat fname) (set! curr-row-num 1) (for-each (lambda (var) (iup:attribute-set! mat (conc curr-row-num ":0") var) (iup:attribute-set! mat (conc curr-row-num ":1") (config-lookup rawconfig fname var)) (set! curr-row-num (+ curr-row-num 1))) (configf:section-vars rawconfig fname))) (list setup-matrix jobtools-matrix validvals-matrix envovrd-matrix disks-matrix) (list "setup" "jobtools" "validvalues" "env-override" "disks")) (for-each (lambda (mat) (iup:attribute-set! mat "0:1" "Value") (iup:attribute-set! mat "0:0" "Var") (iup:attribute-set! mat "ALIGNMENT1" "ALEFT") (iup:attribute-set! mat "FIXTOTEXT" "C1") (iup:attribute-set! mat "RESIZEMATRIX" "YES") (iup:attribute-set! mat "WIDTH1" "120") (iup:attribute-set! mat "WIDTH0" "100") ) (list setup-matrix jobtools-matrix validvals-matrix envovrd-matrix)) (iup:attribute-set! validvals-matrix "WIDTH1" "290") (iup:attribute-set! envovrd-matrix "WIDTH1" "290") (iup:vbox (iup:hbox (iup:vbox (let ((tabs (iup:tabs ;; The required tab (iup:hbox ;; The keys (iup:frame #:title "Keys (required)" (iup:vbox (iup:label (conc "Set the fields for organising your runs\n" "here. Note: can only be changed before\n" "running the first run when megatest.db\n" "is created.")) keys-matrix)) (iup:vbox ;; The setup section (iup:frame #:title "Setup" (iup:vbox (iup:label (conc "max_concurrent_jobs : limits total concurrent jobs (optional)\n" "linktree : directory where linktree will be created.")) setup-matrix)) ;; The jobtools (iup:frame #:title "Jobtools" (iup:vbox (iup:label (conc "launcher : tool or script to run jobs (try nbfake)\n" "useshell : use system to run your launcher\n" "workhosts : spread jobs out on these hosts")) jobtools-matrix)) ;; The disks (iup:frame #:title "Disks" (iup:vbox (iup:label (conc "Enter names and existing paths of locations to run tests")) disks-matrix)))) ;; The optional tab (iup:vbox ;; The Environment Overrides (iup:frame #:title "Env override" envovrd-matrix) ;; The valid values (iup:frame #:title "Validvalues" validvals-matrix) )))) (iup:attribute-set! tabs "TABTITLE0" "Required settings") (iup:attribute-set! tabs "TABTITLE1" "Optional settings") tabs)) )))) ;; The runconfigs.config file ;; (define (rconfig window-id) (iup:vbox (iup:frame #:title "Default"))) ;;====================================================================== ;; T E S T S ;;====================================================================== (define (tree-path->test-id path) (if (not (null? path)) (hash-table-ref/default (dboard:data-path-test-ids *data*) path #f) #f)) (define (test-panel window-id) (let* ((curr-row-num 0) (viewlog (lambda (x) (if (file-exists? logfile) ;(system (conc "firefox " logfile "&")) (iup:send-url logfile) (message-window (conc "File " logfile " not found"))))) (xterm (lambda (x) (if (directory-exists? rundir) (let ((shell (if (get-environment-variable "SHELL") (conc "-e " (get-environment-variable "SHELL")) ""))) (system (conc "cd " rundir ";xterm -T \"" (string-translate testfullname "()" " ") "\" " shell "&"))) (message-window (conc "Directory " rundir " not found"))))) (command-text-box (iup:textbox #:expand "HORIZONTAL" #:font "Courier New, -12")) (command-launch-button (iup:button "Execute!" ;; #:expand "HORIZONTAL" #:size "50x" #:action (lambda (x) (let ((cmd (iup:attribute command-text-box "VALUE"))) (system (conc cmd " &")))))) (run-test (lambda (x) (iup:attribute-set! command-text-box "VALUE" (conc "xterm -geometry 180x20 -e \"megatest -target " keystring " :runname " runname " -runtests " (conc testname "/" (if (equal? item-path "") "%" item-path)) ";echo Press any key to continue;bash -c 'read -n 1 -s'\"")))) (remove-test (lambda (x) (iup:attribute-set! command-text-box "VALUE" (conc "xterm -geometry 180x20 -e \"megatest -remove-runs -target " keystring " :runname " runname " -testpatt " (conc testname "/" (if (equal? item-path "") "%" item-path)) " -v;echo Press any key to continue;bash -c 'read -n 1 -s'\"")))) (run-info-matrix (iup:matrix #:expand "YES" ;; #:scrollbar "YES" #:numcol 1 #:numlin 4 #:numcol-visible 1 #:numlin-visible 4 #:click-cb (lambda (obj lin col status) (print "obj: " obj " lin: " lin " col: " col " status: " status)))) (test-info-matrix (iup:matrix #:expand "YES" #:numcol 1 #:numlin 7 #:numcol-visible 1 #:numlin-visible 7)) (test-run-matrix (iup:matrix #:expand "YES" #:numcol 1 #:numlin 5 #:numcol-visible 1 #:numlin-visible 5)) (meta-dat-matrix (iup:matrix #:expand "YES" #:numcol 1 #:numlin 5 #:numcol-visible 1 #:numlin-visible 5)) (steps-matrix (iup:matrix #:expand "YES" #:numcol 6 #:numlin 50 #:numcol-visible 6 #:numlin-visible 8)) (data-matrix (iup:matrix #:expand "YES" #:numcol 8 #:numlin 50 #:numcol-visible 8 #:numlin-visible 8)) (updater (lambda (testdat) (test-update window-id testdat run-info-matrix test-info-matrix test-run-matrix meta-dat-matrix steps-matrix data-matrix)))) ;; Set the updater in updaters (hash-table-set! (dboard:data-updaters *data*) window-id updater) ;; (for-each (lambda (mat) ;; (iup:attribute-set! mat "0:1" "Value") ;; (iup:attribute-set! mat "0:0" "Var") (iup:attribute-set! mat "HEIGHT0" 0) (iup:attribute-set! mat "ALIGNMENT1" "ALEFT") ;; (iup:attribute-set! mat "FIXTOTEXT" "C1") (iup:attribute-set! mat "RESIZEMATRIX" "YES")) ;; (iup:attribute-set! mat "WIDTH1" "120") ;; (iup:attribute-set! mat "WIDTH0" "100")) (list run-info-matrix test-info-matrix test-run-matrix meta-dat-matrix)) ;; Steps matrix (iup:attribute-set! steps-matrix "0:1" "Step Name") (iup:attribute-set! steps-matrix "0:2" "Start") (iup:attribute-set! steps-matrix "WIDTH2" "40") (iup:attribute-set! steps-matrix "0:3" "End") (iup:attribute-set! steps-matrix "WIDTH3" "40") (iup:attribute-set! steps-matrix "0:4" "Status") (iup:attribute-set! steps-matrix "WIDTH4" "40") (iup:attribute-set! steps-matrix "0:5" "Duration") (iup:attribute-set! steps-matrix "WIDTH5" "40") (iup:attribute-set! steps-matrix "0:6" "Log File") (iup:attribute-set! steps-matrix "ALIGNMENT1" "ALEFT") ;; (iup:attribute-set! steps-matrix "FIXTOTEXT" "C1") (iup:attribute-set! steps-matrix "RESIZEMATRIX" "YES") ;; (iup:attribute-set! steps-matrix "WIDTH1" "120") ;; (iup:attribute-set! steps-matrix "WIDTH0" "100") ;; Data matrix ;; (let ((rownum 1)) (for-each (lambda (x) (iup:attribute-set! data-matrix (conc "0:" rownum) x) (iup:attribute-set! data-matrix (conc "WIDTH" rownum) "50") (set! rownum (+ rownum 1))) (list "Category" "Variable" "Value" "Expected" "Tolerance" "Status" "Units" "Type" "Comment"))) (iup:attribute-set! data-matrix "REDRAW" "ALL") (for-each (lambda (data) (let ((mat (car data)) (keys (cadr data)) (rownum 1)) (for-each (lambda (key) (iup:attribute-set! mat (conc rownum ":0") key) (set! rownum (+ rownum 1))) keys) (iup:attribute-set! mat "REDRAW" "ALL"))) (list (list run-info-matrix '("Run Id" "Target" "Runname" "Run Start Time" )) (list test-info-matrix '("Test Id" "Testname" "Itempath" "State" "Status" "Test Start Time" "Comment")) (list test-run-matrix '("Hostname" "Host info" "Disk Free" "CPU Load" "Run Duration")) (list meta-dat-matrix '("Author" "Owner" "Last Reviewed" "Tags" "Description")))) (iup:split #:orientation "HORIZONTAL" (iup:vbox (iup:hbox (iup:vbox run-info-matrix test-info-matrix) ;; test-info-matrix) (iup:vbox test-run-matrix meta-dat-matrix)) (iup:vbox (iup:vbox (iup:hbox (iup:button "View Log" #:action viewlog #:size "60x" ) ;; #:size "30x" (iup:button "Start Xterm" #:action xterm #:size "60x" )) ;; #:size "30x" (iup:hbox (iup:button "Run Test" #:action run-test #:size "60x" ) ;; #:size "30x" (iup:button "Clean Test" #:action remove-test #:size "60x" ))) ;; #:size "30x" (iup:hbox ;; hiup:split ;; hbox ;; #:orientation "HORIZONTAL" ;; #:value 300 command-text-box command-launch-button))) (iup:vbox (let ((tabs (iup:tabs steps-matrix data-matrix))) (iup:attribute-set! tabs "TABTITLE0" "Test Steps") (iup:attribute-set! tabs "TABTITLE1" "Test Data") tabs))))) ;; Test browser (define (tests window-id) (iup:split (let* ((tb (iup:treebox #:selection-cb (lambda (obj id state) ;; (print "obj: " obj ", id: " id ", state: " state) (let* ((run-path (tree:node->path obj id)) (test-id (tree-path->test-id (cdr run-path)))) (if test-id (hash-table-set! (dboard:data-curr-test-ids *data*) window-id test-id)) (print "path: " (tree:node->path obj id) " test-id: " test-id)))))) (iup:attribute-set! tb "VALUE" "0") (iup:attribute-set! tb "NAME" "Runs") ;;(iup:attribute-set! tb "ADDEXPANDED" "NO") (dboard:data-tests-tree-set! *data* tb) tb) (test-panel window-id))) ;; The function to update the fields in the test view panel (define (test-update window-id testdat run-info-matrix test-info-matrix test-run-matrix meta-dat-matrix steps-matrix data-matrix) ;; get test-id ;; then get test record (if testdat (let* ((test-id (hash-table-ref/default (dboard:data-curr-test-ids *data*) window-id #f)) (test-data (hash-table-ref/default testdat test-id #f)) (run-id (db:test-get-run_id test-data)) (targ/runname (hash-table-ref/default (dboard:data-run-keys *data*) run-id '())) (target (if (null? targ/runname) "" (string-intersperse (reverse (cdr (reverse targ/runname))) "/"))) (runname (if (null? targ/runname) "" (car (cdr targ/runname)))) (steps-dat (tests:get-compressed-steps *dbstruct-local* run-id test-id))) (if test-data (begin ;; (for-each (lambda (data) (let ((mat (car data)) (vals (cadr data)) (rownum 1)) (for-each (lambda (key) (let ((cell (conc rownum ":1"))) (if (not (equal? (iup:attribute mat cell)(conc key))) (begin ;; (print "setting cell " cell " in matrix " mat " to value " key) (iup:attribute-set! mat cell (conc key)) (iup:attribute-set! mat "REDRAW" cell))) (set! rownum (+ rownum 1)))) vals))) (list (list run-info-matrix (if test-id (list (db:test-get-run_id test-data) target runname "n/a") (make-list 4 ""))) (list test-info-matrix (if test-id (list test-id (db:test-get-testname test-data) (db:test-get-item-path test-data) (db:test-get-state test-data) (db:test-get-status test-data) (seconds->string (db:test-get-event_time test-data)) (db:test-get-comment test-data)) (make-list 7 ""))) (list test-run-matrix (if test-id (list (db:test-get-host test-data) (db:test-get-uname test-data) (db:test-get-diskfree test-data) (db:test-get-cpuload test-data) (seconds->hr-min-sec (db:test-get-run_duration test-data))) (make-list 5 ""))) )) (dcommon:populate-steps steps-dat steps-matrix)))))) ;;(list meta-dat-matrix ;; (if test-id ;; (list ( ;; db:test-get-id ;; db:test-get-run_id ;; db:test-get-testname ;; db:test-get-state ;; db:test-get-status ;; db:test-get-event_time ;; db:test-get-host ;; db:test-get-cpuload ;; db:test-get-diskfree ;; db:test-get-uname ;; db:test-get-rundir ;; db:test-get-item-path ;; db:test-get-run_duration ;; db:test-get-final_logf ;; db:test-get-comment ;; db:test-get-fullname ;;====================================================================== ;; R U N C O N T R O L ;;====================================================================== ;; Overall runs browser ;; (define (runs window-id) (let* ((runs-matrix (iup:matrix #:expand "YES" ;; #:fittosize "YES" #:scrollbar "YES" #:numcol 100 #:numlin 100 #:numcol-visible 7 #:numlin-visible 7 #:click-cb (lambda (obj lin col status) (print "obj: " obj " lin: " lin " col: " col " status: " status))))) (iup:attribute-set! runs-matrix "RESIZEMATRIX" "YES") (iup:attribute-set! runs-matrix "WIDTH0" "100") (dboard:data-runs-matrix-set! *data* runs-matrix) (iup:hbox (iup:frame #:title "Runs browser" (iup:vbox runs-matrix))))) ;; Browse and control a single run ;; (define (runcontrol window-id) (iup:hbox)) ;;====================================================================== ;; D A S H B O A R D ;;====================================================================== ;; Main Panel (define (main-panel window-id) (iup:dialog #:title "Megatest Control Panel" #:menu (dcommon:main-menu) #:shrink "YES" (let ((tabtop (iup:tabs (runs window-id) (tests window-id) (runcontrol window-id) (mtest window-id) (rconfig window-id) ))) (iup:attribute-set! tabtop "TABTITLE0" "Runs") (iup:attribute-set! tabtop "TABTITLE1" "Tests") (iup:attribute-set! tabtop "TABTITLE2" "Run Control") (iup:attribute-set! tabtop "TABTITLE3" "megatest.config") (iup:attribute-set! tabtop "TABTITLE4" "runconfigs.config") tabtop))) (define *current-window-id* 0) (define (newdashboard dbstruct) (let* ((data (make-hash-table)) (keys (db:get-keys dbstruct)) (runname "%") (testpatt "%") (keypatts (map (lambda (k)(list k "%")) keys)) (states '()) (statuses '()) (nextmintime (current-milliseconds)) (my-window-id *current-window-id*)) (set! *current-window-id* (+ 1 *current-window-id*)) (dboard:data-runs-set! *data* data) ;; make this data available to the rest of the application (iup:show (main-panel my-window-id)) ;; Yes, running iup:show will pop up a new panel ;; (iup:show (main-panel my-window-id)) (iup:callback-set! *tim* "ACTION_CB" (lambda (x) ;; Want to dedicate no more than 50% of the time to this so skip if ;; 2x delta time has not passed since last query (if (< nextmintime (current-milliseconds)) (let* ((starttime (current-milliseconds)) (changes (dcommon:run-update keys data runname keypatts testpatt states statuses 'full my-window-id)) (endtime (current-milliseconds))) (set! nextmintime (+ endtime (* 2 (- endtime starttime)))) (debug:print 11 *default-log-port* "CHANGE(S): " (car changes) "...")) (debug:print-info 11 *default-log-port* "Server overloaded")))))) (dboard:data-updaters-set! *data* (make-hash-table)) (newdashboard *dbstruct-local*) (iup:main-loop) |
Modified remotediff-nmsg.scm from [90308a45f2] to [50100144d4].
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 | 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 107 108 109 110 111 | + + + + + - + - + - + - + - + - + - + - + | (mutex-unlock! mtx) (car (string-split result))) #f) (loop (read-line inp))))))) (define *max-running* 40) (define my-mutex-lock! conc) (define my-mutex-unlock! conc) ;; (define my-mutex-lock! mutex-lock!) ;; (define my-mutex-unlock! mutex-unlock!) (define (gather-dir-info path) (let ((mtx1 (make-mutex)) (threads (make-hash-table)) (last-num 0) (req (nn-socket 'req))) (print "starting client with pid " (current-process-id)) (nn-connect req ;; "tcp://localhost:5559") "ipc:///tmp/test-ipc") (find-files path ;; test: #t action: (lambda (p res) (let ((info (cond ((not (file-read-access? p)) '(cant-read)) ((directory? p) '(dir)) ((symbolic-link? p) (list 'symlink (read-symbolic-link p))) (else '(data))))) (if (eq? (car info) 'data) (let loop ((start-time (current-seconds))) |
Modified rmt.scm from [51e718f694] to [2f3003ec4b].
1 2 3 4 5 6 7 8 9 10 11 | 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 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 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 162 163 164 165 166 167 168 169 170 | - + + + - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - + - - - - - + + + + - - - - + + - - - + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - + + - - - - - - - + + + + - - - + - - + + + - - - - + + + + + + - - - + + + + + + - - - - - - + + + + + + + - - + - - - - - + + + - - + + + - - - - - - + + + + + - + - - - - + + + + + | ;;====================================================================== ;; Copyright 2006-2013, Matthew Welland. ;; ;; This program is made available under the GNU GPL version 2.0 or ;; greater. See the accompanying file COPYING for details. ;; ;; This program is distributed WITHOUT ANY WARRANTY; without even the ;; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ;; PURPOSE. ;;====================================================================== |
225 226 227 228 229 230 231 | 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 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 | - - - + + + + + - + + + + - - + + - - - - - + + + - - - - - - - - - - - - - - - - + + + + + + + + + + | (cons newmax-cmd currmax) (cons 'none 0)) (loop (car tal)(cdr tal) newmax-cmd currmax))))))) (mutex-unlock! *db-stats-mutex*) res)) (define (rmt:open-qry-close-locally cmd run-id params #!key (remretries 5)) |
307 308 309 310 311 312 313 | 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 | - - - + + + | (define (rmt:login run-id) (rmt:send-receive 'login run-id (list *toppath* megatest-version run-id *my-client-signature*))) ;; This login does no retries under the hood - it acts a bit like a ping. ;; Deprecated for nmsg-transport. ;; |
523 524 525 526 527 528 529 | 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 | - - + + | (rmt:send-receive 'get-count-tests-running-for-testname run-id (list run-id testname))) (define (rmt:get-count-tests-running-in-jobgroup run-id jobgroup) (rmt:send-receive 'get-count-tests-running-in-jobgroup run-id (list run-id jobgroup))) ;; state and status are extra hints not usually used in the calculation ;; |
Modified rpc-transport.scm from [62a65daa58] to [7aa56cfddc].
94 95 96 97 98 99 100 | 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 | - + - + - + - + | (ipaddrstr (if (string=? "-" hostn) (server:get-best-guess-address hostname) ;; (string-intersperse (map number->string (u8vector->list (hostname->ip hostname))) ".") #f)) (portnum (rpc:default-server-port)) (host:port (conc (if ipaddrstr ipaddrstr hostname) ":" portnum)) (tdb (tasks:open-db))) (thread-start! th1) |
Modified runs.scm from [7de1bce1de] to [ebf1e29df4].
220 221 222 223 224 225 226 | 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | - + | (common:check-db-dir-and-exit-if-insufficient) ;; override the number of reruns from the configs (if (and config-reruns (> run-count config-reruns)) (set! run-count config-reruns)) |
926 927 928 929 930 931 932 | 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 | - + | (else (if (runs:lownoise (conc "FAILED prerequitests and we tried" hed) 60) (debug:print 0 *default-log-port* "WARNING: test " hed " has FAILED prerequitests and we've tried at least 10 times to run it. Giving up now.")) ;; (debug:print 0 *default-log-port* " prereqs: " prereqs-not-met) (hash-table-set! test-registry hed 'removed) (mt:test-set-state-status-by-testname run-id test-name item-path "NOT_STARTED" "TEN_STRIKES" #f) ;; I'm unclear on if this roll up is needed - it may be the root cause of the "all set to FAIL" bug. |
1667 1668 1669 1670 1671 1672 1673 | 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 | - + | (lasttpath "/does/not/exist/I/hope") (worker-thread #f)) (debug:print-info 4 *default-log-port* "runs:operate-on run=" run ", header=" header) (if (not (null? tests)) (begin (case action ((remove-runs) |
Modified server.scm from [19061b35b0] to [0d4a46d4c7].
32 33 34 35 36 37 38 | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | - | (define (server:make-server-url hostport) (if (not hostport) #f (conc "http://" (car hostport) ":" (cadr hostport)))) (define *server-loop-heart-beat* (current-seconds)) |
102 103 104 105 106 107 108 | 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 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 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 | - + + - + + - + - + - + - + + - - - + + - - - - - - - - - - - - - - - - - + - + - - + + - - + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + - - + + - - - - + + + + + - - - + - - - + - - - - - - - - + + + + + + - + - + - - + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + - + - + - - - + - - - + | result))) ;; Given a run id start a server process ### NOTE ### > file 2>&1 ;; if the run-id is zero and the target-host is set ;; try running on that host ;; incidental: rotate logs in logs/ dir. ;; |
Modified tests.scm from [8d5f3a1ead] to [8ec0971889].
351 352 353 354 355 356 357 358 359 360 361 362 363 364 | 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 | + | (loop (car tal)(cdr tal))) #f)))))) (pop-directory) result))))) (define (tests:test-force-state-status! run-id test-id state status) (rmt:test-set-status-state run-id test-id status state #f) ;; (rmt:roll-up-pass-fail-counts run-id test-name item (mt:process-triggers run-id test-id state status)) ;; Do not rpc this one, do the underlying calls!!! (define (tests:test-set-status! run-id test-id state status comment dat #!key (work-area #f)) (let* ((real-status status) (otherdat (if dat dat (make-hash-table))) (testdat (rmt:get-test-info-by-id run-id test-id)) |
394 395 396 397 398 399 400 | 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 | - + + - - + + | (debug:print 4 *default-log-port* "real-status " real-status ", waived " waived ", status " status) ;; update the primary record IF state AND status are defined (if (and state status) (begin (rmt:test-set-status-state run-id test-id real-status state (if waived waived comment)) |
439 440 441 442 443 444 445 | 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 | - + | type ))) ;; This was run remote, don't think that makes sense. Perhaps not, but that is the easiest path for the moment. (rmt:csv->test-data run-id test-id dat)))) ;; need to update the top test record if PASS or FAIL and this is a subtest (if (not (equal? item-path "")) |
477 478 479 480 481 482 483 | 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 | - - - + + | force) (let ((my-start-time (current-seconds)) (lockf (conc outputfilename ".lock"))) (let loop ((have-lock (common:simple-file-lock lockf))) (if have-lock (let ((script (configf:lookup *configdat* "testrollup" test-name))) (print "Obtained lock for " outputfilename) |
Modified tests/fullrun/megatest.config from [8446f6ae84] to [c5f81555e0].
42 43 44 45 46 47 48 49 50 51 52 53 54 55 | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | + + + + | megatest-db yes # Set launchwait to no to use the more agressive code that does not wait for the launch to complete before proceeding # this may save a few milliseconds on launching tests # launchwait no waivercommentpatt ^WW\d+ [a-z].* incomplete-timeout 1 # wait 0.5 seconds between launching every process # launch-delay 0.5 # wait for runs to completely complete. yes, anything else is no run-wait yes # If set to "default" the old code is used. Otherwise defaults to 200 or uses # numeric value given. # |
Modified tree.scm from [5c27bcda2b] to [be6fd73bd7].
133 134 135 136 137 138 139 | 133 134 135 136 137 138 139 140 141 142 143 144 | - + | #:selection-cb (lambda (obj id state) ;; (print "obj: " obj ", id: " id ", state: " state) (let* ((run-path (tree:node->path obj id)) (run-id (tree-path->run-id (cdr run-path)))) (if run-id (begin |
Added utils/find-unused-globals.sh version [54735d591a].
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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | #!/bin/bash echo "Finding unused globals:" for var in $(egrep '^\s*\(define\s+\*' *.scm|awk '{print $2}'|sort -u);do if ! $(egrep -v '^\s*\(define' *scm| grep "$var" > /dev/null);then echo "$var not used"; fi; done echo echo "Finding globals without proper definition in common.scm:" for var in $(egrep -v '^\s*\(define' *.scm|\ grep -P -v '^\s*;'|\ grep -P '\*[a-zA-Z]+\S+\*'|\ tr '*' '/' |\ perl -p -e 's%.*(\/\S+\/).*%$1%'|\ egrep '\/[a-zA-Z]+\S+\/'|\ sort -u);do newvar=$(echo $var | tr '/' '*') # echo "VAR is $var, newvar is $newvar" if ! $(grep -P '^\s*\(define\s+' common.scm|\ grep -P -v '^\s*;'|\ grep "$newvar" > /dev/null);then echo "$newvar not defined in common.scm" fi done |