Changes In Branch v1.80-servload Through [907e020fcf] Excluding Merge-Ins
This is equivalent to a diff from 66f2b72697 to 907e020fcf
2023-05-06
| ||
16:39 | Turn off find-and-mark-incomplete fully check-in: 3f75938dff user: matt tags: v1.80 | |
2023-05-05
| ||
06:46 | wip check-in: 411180a81e user: matt tags: v1.80-servload | |
2023-05-04
| ||
09:21 | Removed not-working-very-well threading stuff from dashboard and put sync in separate but joined process. check-in: 907e020fcf user: mrwellan tags: v1.80-servload | |
2023-05-03
| ||
22:05 | wip check-in: 1e38d0d69d user: matt tags: v1.80-servload | |
2023-04-17
| ||
17:28 | cache get-test-info-by-id check-in: 1443998a16 user: matt tags: v1.80-servload | |
16:51 | possible fixes to test Leaf check-in: 4ef17eb32c user: matt tags: v1.80-possible-fixes | |
2023-04-16
| ||
16:43 | possible fix for bind issue check-in: 66f2b72697 user: matt tags: v1.80 | |
2023-04-15
| ||
09:14 | merged fork check-in: 532a2581c9 user: matt tags: v1.80 | |
Modified Makefile from [3b43ac8a9b] to [1094c8727d].
︙ | |||
33 34 35 36 37 38 39 | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | + + - + + + - + | diff-report.scm cgisetup/models/pgdb.scm # module source files MSRCFILES = dbfile.scm debugprint.scm mtargs.scm commonmod.scm dbmod.scm \ tcp-transportmod.scm rmtmod.scm portlogger.scm transport-mode.scm : transport-mode.scm.template @if [[ -e transport-mode.scm ]];then \ echo "WARNING: transport-mode.scm.template is newer than transport-mode.scm"; else \ |
︙ | |||
105 106 107 108 109 110 111 | 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | - + | # ARCHSTR=$(BASH_MACHTYPE)_$(shell lsb_release -sr) ARCHSTR=$(shell if [[ -e /usr/bin/sw_vers ]]; then /usr/bin/sw_vers -productVersion; else lsb_release -sr; fi) # ARCHSTR=$(shell bash -c "echo \$$MACHTYPE") PNGFILES = $(shell cd docs/manual;ls *png) |
︙ |
Modified TODO from [fa3d981ca6] to [4f2c585def].
︙ | |||
55 56 57 58 59 60 61 | 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 | + + + + + + + + + + + + + + + + + + + + + + + + | . Re-work the dbstruct data structure? .. Move main.db to global? .. [ run-id.db inmemdb last-mod last-read last-sync inuse ] . Re-work all queries to use run-id to dereference server . Open main.db directly in calls to -runtests etc. No need to talk remote? . remove common:faux-lock db:get-test-info-by-id db:get-test-state-status-by-id db:get-test-info - do a get id by name/item-path cache the id- use test id plus run id to get from cache need to do db:get-test-info-db look at html gen for items - rollup needs deduplication nonoverlap ;; cache write these with transaction db:teststep-set-status! db:test-set-top-process-id ;; called a lot, maybe from rollup? db:get-all-state-status-counts-for-test ;; load to move from server to client tests:summarize-items ;; appears to be on client tests:summarize-tests ;; converting rmt:set-tests-state-status 1. db:get-test-id needs rmt equiv 2. |
Modified api.scm from [9008afe383] to [1ab4975f7c].
︙ | |||
317 318 319 320 321 322 323 | 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 | + - + | ((test-set-top-process-pid) (apply db:test-set-top-process-pid dbstruct params)) ((set-state-status-and-roll-up-items) (apply db:set-state-status-and-roll-up-items dbstruct params)) ((set-state-status-and-roll-up-run) (apply db:set-state-status-and-roll-up-run dbstruct params)) ((top-test-set-per-pf-counts) (apply db:top-test-set-per-pf-counts dbstruct params)) ((test-set-archive-block-id) (apply db:test-set-archive-block-id dbstruct params)) ((insert-test) (db:insert-test dbstruct run-id params)) ((set-state-status-by-state-status) (apply db:set-state-status-by-state-status dbstruct params)) |
︙ | |||
395 396 397 398 399 400 401 402 403 404 405 406 407 408 | 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 | + | ((test-toplevel-num-items) (apply db:test-toplevel-num-items dbstruct params)) ((get-test-info-by-id) (apply db:get-test-info-by-id dbstruct params)) ((get-test-state-status-by-id) (apply db:get-test-state-status-by-id dbstruct params)) ((test-get-rundir-from-test-id) (apply db:test-get-rundir-from-test-id dbstruct params)) ((get-count-tests-running-for-testname) (apply db:get-count-tests-running-for-testname dbstruct params)) ((get-count-tests-running) (apply db:get-count-tests-running dbstruct params)) ((get-count-tests-running-in-jobgroup) (apply db:get-count-tests-running-in-jobgroup dbstruct params)) ((get-all-state-status-counts-for-test) (apply db:get-all-state-status-counts-for-test dbstruct params)) ;; ((delete-test-step-records) (apply db:delete-test-step-records dbstruct params)) ;; ((get-previous-test-run-record) (apply db:get-previous-test-run-record dbstruct params)) ((get-matching-previous-test-run-records)(apply db:get-matching-previous-test-run-records dbstruct params)) ((test-get-logfile-info) (apply db:test-get-logfile-info dbstruct params)) ((test-get-records-for-index-file) (apply db:test-get-records-for-index-file dbstruct params)) ((get-testinfo-state-status) (apply db:get-testinfo-state-status dbstruct params)) ((test-get-top-process-pid) (apply db:test-get-top-process-pid dbstruct params)) |
︙ |
Modified common.scm from [ec316c51cd] to [708849cceb].
︙ | |||
168 169 170 171 172 173 174 | 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | - | ;; (define *db-last-sync* 0) ;; last time the sync to megatest.db happened (define *db-sync-in-progress* #f) ;; if there is a sync in progress do not try to start another ;; (define *db-multi-sync-mutex* (make-mutex)) ;; protect access to *db-sync-in-progress*, *db-last-sync* ;; task db (define *task-db* #f) ;; (vector db path-to-db) (define *db-access-allowed* #t) ;; flag to allow access ;; (define *db-access-mutex* (make-mutex)) ;; moved to dbfile |
︙ |
Modified dashboard.scm from [63dbb0e44d] to [1d1d84a489].
︙ | |||
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 | 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | ;; RA => sets the tabdat passed to the hashkey at commondat:tabdats hash table ;; (define (dboard:common-set-tabdat! commondat tabnum tabdat) (hash-table-set! (dboard:commondat-tabdats commondat) tabnum tabdat)) (define *updaters-running* #f) ;; gets and calls updater list based on curr-tab-num ;; (define (dboard:common-run-curr-updaters commondat #!key (tab-num #f)) ;; (sync-db-to-tmp (dboard:common-get-tabdat commondat tab-num: tab-num)) ;; no longer applies ;; maybe need sleep here? (if (dboard:common-get-tabdat commondat tab-num: tab-num) ;; only update if there is a tabdat (let* ((tnum (or tab-num (dboard:commondat-curr-tab-num commondat))) (updaters (hash-table-ref/default (dboard:commondat-updaters commondat) tnum '()))) (debug:print 4 *default-log-port* "Found these updaters: " updaters " for tab-num: " tnum) (for-each ;; perform the function calls for the complete updaters list (lambda (updater) ;; (debug:print 3 *default-log-port* "Running " updater) (updater)) updaters)))) #;(if *updaters-running* (debug:print 0 *default-log-port* "updaters still running.") (let* ((th1 (make-thread (lambda () (debug:print 4 *default-log-port* "Found these updaters: " updaters " for tab-num: " tnum) (for-each ;; perform the function calls for the complete updaters list (lambda (updater) (let ((start-ms (current-milliseconds))) (debug:print 0 *default-log-port* "Running updater for tnum "tnum", "updater) (updater) (debug:print 0 *default-log-port* "Running updater for tnum "tnum" took "(- (current-milliseconds) start-ms)"ms") )) updaters)) "updaters thread")) (th2 (make-thread (lambda () (let loop () (case (thread-state th1) ((terminated) (debug:print 0 *default-log-port* "th1 terminated, all done for now.")) ((running) (debug:print 0 *default-log-port* "th1 running, suspending now.") (thread-suspend! th1) (thread-sleep! 0.1) (loop)) ((sleeping) (debug:print 0 *default-log-port* "th1 sleeping, resuming now.") (thread-resume! th1) (thread-sleep! 0.9) (loop)) ((dead) (debug:print 0 *default-log-port* "th1 "(thread-state th1)", what's next?")) (else (debug:print 0 *default-log-port* "th1 "(thread-state th1)", what's next?") (thread-sleep! 0.5) (loop)))))))) (set! *updaters-running* #t) (thread-start! th1) (thread-sleep! 0.1) (thread-start! th2) (thread-join! th1) (set! *updaters-running* #f))) ;; if tab-num passed in then use it, otherwise look in commondat at curr-tab-num ;; adds the updater passed in the updaters list at that hashkey ;; (define (dboard:commondat-add-updater commondat updater #!key (tab-num #f)) (let* ((tnum (or tab-num (dboard:commondat-curr-tab-num commondat))) |
︙ |
Modified db.scm from [3353e0f2ec] to [79e052fa8d].
︙ | |||
2272 2273 2274 2275 2276 2277 2278 | 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + | (sqlite3:with-transaction db (lambda () (sqlite3:execute db "DELETE FROM test_steps WHERE test_id IN (SELECT id FROM tests WHERE state='DELETED' AND event_time<?);" targtime) (sqlite3:execute db "DELETE FROM test_data WHERE test_id IN (SELECT id FROM tests WHERE state='DELETED' AND event_time<?);" targtime) (sqlite3:execute db "DELETE FROM tests WHERE state='DELETED' AND event_time<?;" targtime))))))) |
︙ | |||
2448 2449 2450 2451 2452 2453 2454 2455 2456 | 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 | + + + + + + - - - - - - - - - - + + + + + + + + + + + + | #f (lambda (dbdat db) (sqlite3:first-result db "SELECT count(id) FROM tests WHERE state in ('LAUNCHED','NOT_STARTED','REMOTEHOSTSTART','RUNNING','KILLREQ') AND run_id=?;") run-id))) (define *db:get-test-id-cache* (make-hash-table)) ;; map run-id, testname item-path to test-id (define (db:get-test-id dbstruct run-id testname item-path) (let* ((hash-key (list run-id testname item-path)) (cache-result (hash-table-ref/default *db:get-test-id-cache* hash-key #f))) (if cache-result (cdr cache-result) |
︙ | |||
2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 | 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 | + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + - - - - - - + + + + + + | (let* ((run-ids (db:get-all-run-ids mtdb))) (for-each (lambda (run-id) (let ((testrecs (db:get-all-tests-info-by-run-id mtdb run-id))) (db:prep-megatest.db-adj-test-ids (dbr:dbdat-dbh mtdb) run-id testrecs))) run-ids))) (define *db:get-test-info-by-id-cache* (make-hash-table)) ;; Get test data using test_id ;; (define (db:get-test-info-by-id dbstruct run-id test-id) (let* ((hash-key (cons run-id test-id)) (cache-result (hash-table-ref/default *db:get-test-info-by-id-cache* hash-key #f))) (if cache-result (cdr cache-result) |
︙ | |||
3097 3098 3099 3100 3101 3102 3103 | 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 | - - - - - - - - - - - - - - - | (begin (debug:print-error 0 *default-log-port* "reception failed. Received \"" msg "\" but cannot translate it.") (print-call-chain (current-error-port)) msg))) ;; crude reply for when things go awry ((zmq nmsg)(with-input-from-string msg (lambda ()(deserialize)))) (else msg))) ;; rpc |
︙ | |||
3150 3151 3152 3153 3154 3155 3156 | 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 | - + - + + | (let ((tr-res (sqlite3:with-transaction db (lambda () ;; NB// Pass the db so it is part fo the transaction (db:test-set-state-status-db db run-id test-id state status comment) ;; this call sets the item state/status (if (not (equal? item-path "")) ;; only roll up IF incoming test is an item |
︙ | |||
3263 3264 3265 3266 3267 3268 3269 | 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 | + + + + + - + - + | (define (db:get-all-state-status-counts-for-run dbstruct run-id) (db:with-db dbstruct #f #f (lambda (dbdat db) (db:get-all-state-status-counts-for-run-db dbdat db run-id)))) (define (db:get-all-state-status-counts-for-test dbstruct run-id test-name item-path item-state-in item-status-in) (db:with-db dbstruct run-id #f (lambda (dbdat db) (db:get-all-state-status-counts-for-test-db db run-id test-name item-path item-state-in item-status-in)))) |
︙ |
Modified dbmod.scm from [b9113d296b] to [a008a03850].
︙ | |||
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | + + | (module dbmod * (import scheme chicken data-structures extras files (prefix sqlite3 sqlite3:) matchable posix typed-records srfi-1 srfi-18 srfi-69 commonmod |
︙ | |||
153 154 155 156 157 158 159 160 161 162 163 164 165 166 | 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 | + + + + + + + + + + + + + + + + | (lambda () (let* ((db (sqlite3:open-database dbfullname)) (handler (sqlite3:make-busy-timeout 136000))) (sqlite3:set-busy-handler! db handler) (if write-access (init-proc db)) db)))) ;; try every second until tries times proc ;; (define (db:keep-trying-until-true proc params tries) (let* ((res (apply proc params))) (if res res (if (> tries 0) (begin (thread-sleep! 1) (db:keep-trying-until-true proc params (- tries 1))) (begin ;; (debug:print-info 0 *default-log-port* "proc never returned true, params="params) (print"db:keep-trying-until-true proc never returned true, proc = " proc " params =" params " tries = " tries) #f))))) (define *sync-in-progress* #f) ;; Open the inmem db and the on-disk db ;; populate the inmem db with data ;; ;; Updates fields in dbstruct |
︙ | |||
202 203 204 205 206 207 208 | 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 | + + - - - - - - - - + + + + + + + + + - + - + - + + - + - + - + | (dbr:dbstruct-ondiskdb-set! dbstruct db) (dbr:dbstruct-dbfile-set! dbstruct dbfullname) (dbr:dbstruct-dbfname-set! dbstruct dbfname) (dbr:dbstruct-sync-proc-set! dbstruct (lambda (last-update) (if *sync-in-progress* (debug:print 3 *default-log-port* "WARNING: overlapping calls to sync to disk") (thread-start! (make-thread |
︙ | |||
273 274 275 276 277 278 279 | 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 | - + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - + + - - - - - - - - - - - - - - + - - - - + - - - - + - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | ;; ;; if last-update specified ("field-name" . time-in-seconds) ;; then sync only records where field-name >= time-in-seconds ;; IFF field-name exists ;; ;; Use (db:sync-all-tables-list keys) to get the tbls input ;; |
︙ | |||
431 432 433 434 435 436 437 | 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 | - + + | (mode 'full) (no-update '("keys")) ;; do ) (debug:print 0 *default-log-port* "Doing sync "direction" "destdbfile) (if (not (sqlite3:auto-committing? dbh)) (debug:print 0 *default-log-port* "Skipping sync due to transaction in flight.") (let* ((table-names (map car tables)) |
︙ | |||
468 469 470 471 472 473 474 | 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 | - + - - + + - + + + | ;; (debug:print 0 *default-log-port* "stmt8="stmt8) ;; (if (sqlite3:auto-committing? dbh) ;; (begin (mutex-lock! *db-transaction-mutex*) (sqlite3:with-transaction dbh (lambda () |
︙ | |||
747 748 749 750 751 752 753 754 | 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 | + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | (begin (debug:print-info 0 *default-log-port* "Found old test in LAUNCHED state, test-id=" test-id " 1 day since event_time marked") (set! oldlaunched (cons (list test-id run-dir uname testname item-path run-id) oldlaunched))))) stmth3 run-id)))) (list incompleted oldlaunched toplevels))) (define (db:set-state-status-by-state-status dbstruct run-id testname currstate currstatus newstate newstatus) |
Modified launch.scm from [7e82dfb83e] to [4dac8c9f9e].
︙ | |||
739 740 741 742 743 744 745 | 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 | - + + | ;; NO NEED TO CALL set-state-status-and-roll-up-items HERE, THIS IS DONE IN set-state-status-and-roll-up-items called by tests:test-set-status! ) ) ;; for automated creation of the rollup html file this is a good place... (if (not (equal? item-path "")) |
︙ | |||
1153 1154 1155 1156 1157 1158 1159 | 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 | - + + - - + + + + + | ;; if have -append-config then read and append here (let ((cfname (args:get-arg "-append-config"))) (if (and cfname (file-read-access? cfname)) (read-config cfname *configdat* #t))) ;; values are added to the hash, no need to do anything special. ;; have config at this time, this is a good place to set params based on config file settings |
︙ |
Modified megatest.scm from [adec828972] to [a30f723389].
︙ | |||
282 283 284 285 286 287 288 289 290 291 292 293 294 295 | 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 | + | -list-run-time : list time requered to complete runs. It supports following switches -run-patt <patt> -target-patt <patt> -dumpmode <csv,json,plain-text> -list-test-time : list time requered to complete each test in a run. It following following arguments -runname <patt> -target <patt> -dumpmode <csv,json,plain-text> -syscheck : do some very basic checks; write access and space in tmp, home, runs, links and is $DISPLAY valid -list-waivers : dump waivers for specified target, runname, testpatt to stdout -db2db : sync db to db, use -from, -to for dbs, -period and -timeout for continuous sync Diff report -diff-rep : generate diff report (must include -src-target, -src-runname, -target, -runname and either -diff-email or -diff-html) -src-target <target> -src-runname <target> -diff-email <emails> : comma separated list of email addresses to send diff report |
︙ | |||
331 332 333 334 335 336 337 | 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 | - + + | ":state" "-state" ":status" "-status" "-list-runs" "-testdata-csv" "-testpatt" |
︙ | |||
376 377 378 379 380 381 382 383 384 385 386 387 388 389 | 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 | + + | "-pathmod" "-env2file" "-envcap" "-envdelta" "-setvars" "-set-state-status" "-import-sexpr" "-period" ;; sync period in seconds "-timeout" ;; exit sync if timeout in seconds exceeded since last change ;; move runs stuff here "-remove-keep" "-set-run-status" "-age" ;; archive |
︙ | |||
448 449 450 451 452 453 454 | 452 453 454 455 456 457 458 459 460 461 462 463 464 465 | - | "-clean-cache" "-no-cache" "-cache-db" "-cp-eventtime-to-publishtime" "-use-db-cache" "-prepend-contour" |
︙ | |||
493 494 495 496 497 498 499 500 501 502 503 504 505 506 | 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 | + | "-create-megatest-area" "-mark-incompletes" "-convert-to-norm" "-convert-to-old" "-import-megatest.db" "-sync-to-megatest.db" "-db2db" "-sync-brute-force" "-logging" "-v" ;; verbose 2, more than normal (normal is 1) "-q" ;; quiet 0, errors/warnings only "-diff-rep" |
︙ | |||
2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 | 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | (set! *didsomething* #t))) (if (args:get-arg "-sync-to") (let ((toppath (launch:setup))) (tasks:sync-to-postgres *configdat* (args:get-arg "-sync-to")) (set! *didsomething* #t))) ;; use with -from and -to ;; (if (args:get-arg "-db2db") (let* ((duh (launch:setup)) (src-db (args:get-arg "-from")) (dest-db (args:get-arg "-to")) (sync-period (args:get-arg "-period")) ;; NOT IMPLEMENTED YET (sync-timeout (args:get-arg "-timeout")) ;; NOT IMPLEMENTED YET (lockfile (conc dest-db".lock")) (keys (db:get-keys #f)) ) (if (and src-db dest-db) (begin (debug:print-info 0 *default-log-port* "Attempting to sync data from "src-db" to "dest-db"...") ;; (if (common:simple-file-lock lockfile) ;; (begin (if (and (file-exists? src-db) (not (file-exists? dest-db))) ;; use copy to get going (file-copy src-db dest-db)) (let ((res (dbmod:db-to-db-sync src-db dest-db 0 (dbfile:db-init-proc) keys))) ;; (common:simple-file-release-lock lockfile) (if res (debug:print 0 *default-log-port* "Synced " res " records from "src-db" to "dest-db) (debug:print 0 *default-log-port* "No sync due to permissions or non-existant source db.")))) (debug:print 0 *default-log-port* "Skipping sync, there is a sync in progress.")) (set! *didsomething* #t)) (debug:print 0 *default-log-port* "Usage for -db2db; -to and -from must be specified")) (if (args:get-arg "-list-test-time") (let* ((toppath (launch:setup))) (task:get-test-times) (set! *didsomething* #t))) (if (args:get-arg "-list-run-time") (let* ((toppath (launch:setup))) |
︙ |
Modified mt.scm from [9ff41cb92d] to [321551147d].
︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | 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 | + - + + | (use sqlite3 srfi-1 posix regex regex-case srfi-69 dot-locking (srfi 18) posix-extras directory-utils call-with-environment-variables) (import (prefix sqlite3 sqlite3:)) (declare (unit mt)) (declare (uses debugprint)) (declare (uses db)) (declare (uses dbmod)) (declare (uses common)) (declare (uses items)) (declare (uses runconfig)) (declare (uses tests)) (declare (uses server)) (declare (uses runs)) (declare (uses rmt)) (declare (uses rmtmod)) (import debugprint |
︙ | |||
188 189 190 191 192 193 194 | 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 | - + - + | (debug:print-info 0 *default-log-port* "TRIGGERED on " trigger ", running command " fullcmd " output at " (get-environment-variable "NBFAKE_LOG")) (process-run fullcmd) (if prev-nbfake-log (setenv "NBFAKE_LOG" prev-nbfake-log) (unsetenv "NBFAKE_LOG")) )) |
︙ | |||
260 261 262 263 264 265 266 | 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 | - - - - - - - - - - | (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 |
︙ | |||
292 293 294 295 296 297 298 | 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 | - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | ;; (mt:process-triggers run-id test-id new-state new-status) #t);) ;;(mt:test-set-state-status-by-id run-id test-id new-state new-status new-comment))) (define (mt:test-set-state-status-by-testname-unless-completed run-id test-name item-path new-state new-status new-comment) (let ((test-id (rmt:get-test-id run-id test-name item-path))) (mt:test-set-state-status-by-id-unless-completed run-id test-id new-state new-status new-comment))) |
︙ |
Added nmsg-transport.scm version [adedc287f0].