Overview
| SHA1 Hash: | 98de2c2f8db5b033bbca22d41629ed4278d1ebb2 |
|---|---|
| Date: | 2011-10-23 20:42:46 |
| User: | matt |
| Comment: | Lots of little bugs fixed related to monitor. Note that now multiple runs must be accomodated from the same launcher |
| Timelines: | family | ancestors | descendants | both | trunk |
| Downloads: | Tarball | ZIP archive |
| Other Links: | files | file ages | manifest |
Tags And Properties
- branch=trunk inherited from [d673a9367e]
- sym-trunk inherited from [d673a9367e]
Changes
Modified db.scm from [7df6739618012e5d] to [a288398d2ab1f3a0].
124 expected REAL, 124 expected REAL, 125 tol REAL, 125 tol REAL, 126 units TEXT, 126 units TEXT, 127 comment TEXT DEFAULT '', 127 comment TEXT DEFAULT '', 128 status TEXT DEFAULT 'n/a', 128 status TEXT DEFAULT 'n/a', 129 type TEXT DEFAULT '', 129 type TEXT DEFAULT '', 130 CONSTRAINT test_data_constraint UNIQUE (test_id,ca 130 CONSTRAINT test_data_constraint UNIQUE (test_id,ca 131 (sqlite3:execute db "CREATE TABLE IF NOT EXISTS task_queue (id INTEGER | 131 (sqlite3:execute db "CREATE TABLE IF NOT EXISTS tasks_queue (id INTEGE 132 action TEXT DEFAULT '', 132 action TEXT DEFAULT '', 133 owner TEXT, 133 owner TEXT, 134 state TEXT DEFAULT 'new', 134 state TEXT DEFAULT 'new', 135 target TEXT DEFAULT '', 135 target TEXT DEFAULT '', 136 name TEXT DEFAULT '', 136 name TEXT DEFAULT '', 137 test TEXT DEFAULT '', 137 test TEXT DEFAULT '', 138 item TEXT DEFAULT '', 138 item TEXT DEFAULT '', 139 creation_time TIMESTAMP, 139 creation_time TIMESTAMP, 140 execution_time TIMESTAMP;") | 140 execution_time TIMESTAMP);") 141 (sqlite3:execute db "CREATE TABLE IF NOT EXISTS monitors (id INTEGER P 141 (sqlite3:execute db "CREATE TABLE IF NOT EXISTS monitors (id INTEGER P 142 pid INTEGER, 142 pid INTEGER, 143 start_time TIMESTAMP, 143 start_time TIMESTAMP, 144 last_update TIMESTAMP, 144 last_update TIMESTAMP, 145 hostname TEXT, 145 hostname TEXT, 146 username TEXT, 146 username TEXT, 147 CONSTRAINT monitors_constraint UNIQUE (pid,hostna 147 CONSTRAINT monitors_constraint UNIQUE (pid,hostna ................................................................................................................................................................................ 188 (patch-db)) 188 (patch-db)) 189 ((< mver 1.21) 189 ((< mver 1.21) 190 (sqlite3:execute db "DROP TABLE IF EXISTS metadat;") 190 (sqlite3:execute db "DROP TABLE IF EXISTS metadat;") 191 (sqlite3:execute db "CREATE TABLE IF NOT EXISTS metadat (id INTEGER, var 191 (sqlite3:execute db "CREATE TABLE IF NOT EXISTS metadat (id INTEGER, var 192 CONSTRAINT metadat_constraint UNIQUE (var));") 192 CONSTRAINT metadat_constraint UNIQUE (var));") 193 (db:set-var db "MEGATEST_VERSION" 1.21) ;; set before, just in case the c 193 (db:set-var db "MEGATEST_VERSION" 1.21) ;; set before, just in case the c 194 (sqlite3:execute db test-meta-def) 194 (sqlite3:execute db test-meta-def) 195 (for-each | 195 ;(for-each 196 (lambda (stmt) | 196 ; (lambda (stmt) 197 (sqlite3:execute db stmt)) | 197 ; (sqlite3:execute db stmt)) 198 (list | 198 ; (list 199 "ALTER TABLE tests ADD COLUMN first_err TEXT;" | 199 ; "ALTER TABLE tests ADD COLUMN first_err TEXT;" 200 "ALTER TABLE tests ADD COLUMN first_warn TEXT;" | 200 ; "ALTER TABLE tests ADD COLUMN first_warn TEXT;" 201 )) | 201 ; )) 202 (patch-db)) 202 (patch-db)) 203 ((< mver 1.24) 203 ((< mver 1.24) 204 (db:set-var db "MEGATEST_VERSION" 1.24) 204 (db:set-var db "MEGATEST_VERSION" 1.24) 205 (sqlite3:execute db "DROP TABLE IF EXISTS test_data;") 205 (sqlite3:execute db "DROP TABLE IF EXISTS test_data;") 206 (sqlite3:execute db "DROP TABLE IF EXISTS test_meta;") 206 (sqlite3:execute db "DROP TABLE IF EXISTS test_meta;") 207 (sqlite3:execute db test-meta-def) 207 (sqlite3:execute db test-meta-def) 208 (sqlite3:execute db "CREATE TABLE IF NOT EXISTS test_data (id INTEGER PRI 208 (sqlite3:execute db "CREATE TABLE IF NOT EXISTS test_data (id INTEGER PRI ................................................................................................................................................................................ 280 "SELECT fieldname,fieldtype FROM keys ORDER BY id DESC;") 280 "SELECT fieldname,fieldtype FROM keys ORDER BY id DESC;") 281 (set! *db-keys* res) 281 (set! *db-keys* res) 282 res))) 282 res))) 283 283 284 (define db:get-keys db-get-keys) 284 (define db:get-keys db-get-keys) 285 285 286 (define (db:get-value-by-header row header field) 286 (define (db:get-value-by-header row header field) > 287 (debug:print 0 "db:get-value-by-header row: " row " header: " header " field: 287 (if (null? header) #f 288 (if (null? header) #f 288 (let loop ((hed (car header)) 289 (let loop ((hed (car header)) 289 (tal (cdr header)) 290 (tal (cdr header)) 290 (n 0)) 291 (n 0)) 291 (if (equal? hed field) 292 (if (equal? hed field) 292 (vector-ref row n) 293 (vector-ref row n) 293 (if (null? tal) #f (loop (car tal)(cdr tal)(+ n 1))))))) 294 (if (null? tal) #f (loop (car tal)(cdr tal)(+ n 1))))))) ................................................................................................................................................................................ 362 (let* ((res #f) 363 (let* ((res #f) 363 (keys (db-get-keys db)) 364 (keys (db-get-keys db)) 364 (remfields (list "id" "runname" "state" "status" "owner" "event_time")) 365 (remfields (list "id" "runname" "state" "status" "owner" "event_time")) 365 (header (append (map key:get-fieldname keys) 366 (header (append (map key:get-fieldname keys) 366 remfields)) 367 remfields)) 367 (keystr (conc (keys->keystr keys) "," 368 (keystr (conc (keys->keystr keys) "," 368 (string-intersperse remfields ",")))) 369 (string-intersperse remfields ",")))) > 370 (debug:print 0 "db:get-run-info run-id: " run-id " header: " header " keystr 369 (sqlite3:for-each-row 371 (sqlite3:for-each-row 370 (lambda (a . x) 372 (lambda (a . x) 371 (set! res (apply vector a x))) 373 (set! res (apply vector a x))) 372 db 374 db 373 (conc "SELECT " keystr " FROM runs WHERE id=?;") 375 (conc "SELECT " keystr " FROM runs WHERE id=?;") 374 run-id) 376 run-id) 375 (vector header res))) 377 (vector header res))) ................................................................................................................................................................................ 393 ;; states and statuses are required to be lists, empty is ok 395 ;; states and statuses are required to be lists, empty is ok 394 (define (db-get-tests-for-run db run-id testpatt itempatt states statuses) 396 (define (db-get-tests-for-run db run-id testpatt itempatt states statuses) 395 (let ((res '()) 397 (let ((res '()) 396 (states-str (conc "('" (string-intersperse states "','") "')")) 398 (states-str (conc "('" (string-intersperse states "','") "')")) 397 (statuses-str (conc "('" (string-intersperse statuses "','") "')")) 399 (statuses-str (conc "('" (string-intersperse statuses "','") "')")) 398 ) 400 ) 399 (sqlite3:for-each-row 401 (sqlite3:for-each-row 400 (lambda (id run-id testname state status event-time host cpuload diskfree u | 402 (lambda (id run-id testname state status event-time host cpuload diskfree u 401 (set! res (cons (vector id run-id testname state status event-time host c | 403 (set! res (cons (vector id run-id testname state status event-time host c 402 db 404 db 403 (conc "SELECT id,run_id,testname,state,status,event_time,host,cpuload,diskf | 405 (conc "SELECT id,run_id,testname,state,status,event_time,host,cpuload,diskf 404 " FROM tests WHERE run_id=? AND testname like ? AND item_path LIKE ? 406 " FROM tests WHERE run_id=? AND testname like ? AND item_path LIKE ? 405 " AND NOT (state in " states-str " AND status IN " statuses-str ") " 407 " AND NOT (state in " states-str " AND status IN " statuses-str ") " 406 " ORDER BY id DESC;") 408 " ORDER BY id DESC;") 407 run-id 409 run-id 408 (if testpatt testpatt "%") 410 (if testpatt testpatt "%") 409 (if itempatt itempatt "%")) 411 (if itempatt itempatt "%")) 410 res)) 412 res)) ................................................................................................................................................................................ 460 "SELECT count(id) FROM tests WHERE state in ('LAUNCHED','NOT_STARTED','REMO 462 "SELECT count(id) FROM tests WHERE state in ('LAUNCHED','NOT_STARTED','REMO 461 res)) 463 res)) 462 464 463 ;; NB// Sync this with runs:get-test-info 465 ;; NB// Sync this with runs:get-test-info 464 (define (db:get-test-info db run-id testname item-path) 466 (define (db:get-test-info db run-id testname item-path) 465 (let ((res #f)) 467 (let ((res #f)) 466 (sqlite3:for-each-row 468 (sqlite3:for-each-row 467 (lambda (id run-id testname state status event-time host cpuload diskfree u | 469 (lambda (id run-id testname state status event-time host cpuload diskfree u 468 (set! res (vector id run-id testname state status event-time host cpuload | 470 (set! res (vector id run-id testname state status event-time host cpuload 469 db 471 db 470 "SELECT id,run_id,testname,state,status,event_time,host,cpuload,diskfree,un | 472 "SELECT id,run_id,testname,state,status,event_time,host,cpuload,diskfree,un 471 run-id testname item-path) 473 run-id testname item-path) 472 res)) 474 res)) 473 475 474 ;; Get test data using test_id 476 ;; Get test data using test_id 475 (define (db:get-test-data-by-id db test-id) 477 (define (db:get-test-data-by-id db test-id) 476 (let ((res #f)) 478 (let ((res #f)) 477 (sqlite3:for-each-row 479 (sqlite3:for-each-row 478 (lambda (id run-id testname state status event-time host cpuload diskfree u | 480 (lambda (id run-id testname state status event-time host cpuload diskfree u 479 (set! res (vector id run-id testname state status event-time host cpuload | 481 (set! res (vector id run-id testname state status event-time host cpuload 480 db 482 db 481 "SELECT id,run_id,testname,state,status,event_time,host,cpuload,diskfree,un | 483 "SELECT id,run_id,testname,state,status,event_time,host,cpuload,diskfree,un 482 test-id) 484 test-id) 483 res)) 485 res)) 484 486 485 487 486 (define (db:test-set-comment db run-id testname item-path comment) 488 (define (db:test-set-comment db run-id testname item-path comment) 487 (sqlite3:execute 489 (sqlite3:execute 488 db 490 db ................................................................................................................................................................................ 755 "Test Owner" ; 14 757 "Test Owner" ; 14 756 "Reviewed" ; 15 758 "Reviewed" ; 15 757 "Diskfree" ; 16 759 "Diskfree" ; 16 758 "Uname" ; 17 760 "Uname" ; 17 759 "Rundir" ; 18 761 "Rundir" ; 18 760 "Host" ; 19 762 "Host" ; 19 761 "Cpu Load" ; 20 763 "Cpu Load" ; 20 762 "Warn" ; 21 < 763 "Error"))) ; 22 < > 764 ))) 764 (results (list runsheader)) 765 (results (list runsheader)) 765 (testdata-header (list "Run Id" "Testname" "Item Path" "Category" "Vari 766 (testdata-header (list "Run Id" "Testname" "Item Path" "Category" "Vari 766 (debug:print 2 "Using " tempdir " for constructing the ods file. keyqry: " k 767 (debug:print 2 "Using " tempdir " for constructing the ods file. keyqry: " k 767 ;; "Expected Value" 768 ;; "Expected Value" 768 ;; "Value Found" 769 ;; "Value Found" 769 ;; "Tolerance" 770 ;; "Tolerance" 770 (apply sqlite3:for-each-row 771 (apply sqlite3:for-each-row ................................................................................................................................................................................ 807 t.item_path,tm.description,t.state,t.status, 808 t.item_path,tm.description,t.state,t.status, 808 final_logf,run_duration, 809 final_logf,run_duration, 809 strftime('%m/%d/%Y %H:%M:%S',datetime(t.event_time,'unixepoch'),'l 810 strftime('%m/%d/%Y %H:%M:%S',datetime(t.event_time,'unixepoch'),'l 810 tm.tags,r.owner,t.comment, 811 tm.tags,r.owner,t.comment, 811 author, 812 author, 812 tm.owner,reviewed, 813 tm.owner,reviewed, 813 diskfree,uname,rundir, 814 diskfree,uname,rundir, 814 host,cpuload,first_err,first_warn | 815 host,cpuload 815 FROM tests AS t INNER JOIN runs AS r ON t.run_id=r.id INNER JOIN tes 816 FROM tests AS t INNER JOIN runs AS r ON t.run_id=r.id INNER JOIN tes 816 WHERE runname LIKE ? AND " keyqry ";") 817 WHERE runname LIKE ? AND " keyqry ";") 817 runspatt (map cadr keypatt-alist)) 818 runspatt (map cadr keypatt-alist)) 818 (set! results (list (cons "Runs" results))) 819 (set! results (list (cons "Runs" results))) 819 ;; now, for each test, collect the test_data info and add a new sheet 820 ;; now, for each test, collect the test_data info and add a new sheet 820 (for-each 821 (for-each 821 (lambda (test-id) 822 (lambda (test-id)
Modified key_records.scm from [5eff3cef180c6b7d] to [46a3b150eaee7941].
12 (define-inline (key:get-fieldname key)(vector-ref key 0)) 12 (define-inline (key:get-fieldname key)(vector-ref key 0)) 13 (define-inline (key:get-fieldtype key)(vector-ref key 1)) 13 (define-inline (key:get-fieldtype key)(vector-ref key 1)) 14 14 15 (define-inline (keys->valslots keys) ;; => ?,?,? .... 15 (define-inline (keys->valslots keys) ;; => ?,?,? .... 16 (string-intersperse (map (lambda (x) "?") keys) ",")) 16 (string-intersperse (map (lambda (x) "?") keys) ",")) 17 17 18 (define-inline (keys->key/field keys . additional) 18 (define-inline (keys->key/field keys . additional) 19 (string-join (map (lambda (k)(conc (key:get-fieldname k) " " (key:get-fieldtyp | 19 (string-join (map (lambda (k)(conc (key:get-fieldname k) " " > 20 (key:get-fieldtype k))) > 21 (append keys additional)) ",")) 20 22 21 (define-inline (item-list->path itemdat) 23 (define-inline (item-list->path itemdat) 22 (string-intersperse (map cadr itemdat) "/")) 24 (string-intersperse (map cadr itemdat) "/")) 23 25
Modified launch.scm from [aa7b36aced5f7da5] to [3863edda5721c8ad].
352 ;; 1. look though disks list for disk with most space 352 ;; 1. look though disks list for disk with most space 353 ;; 2. create run dir on disk, path name is meaningful 353 ;; 2. create run dir on disk, path name is meaningful 354 ;; 3. create link from run dir to megatest runs area 354 ;; 3. create link from run dir to megatest runs area 355 ;; 4. remotely run the test on allocated host 355 ;; 4. remotely run the test on allocated host 356 ;; - could be ssh to host from hosts table (update regularly with load) 356 ;; - could be ssh to host from hosts table (update regularly with load) 357 ;; - could be netbatch 357 ;; - could be netbatch 358 ;; (launch-test db (cadr status) test-conf)) 358 ;; (launch-test db (cadr status) test-conf)) 359 (define (launch-test db run-id test-conf keyvallst test-name test-path itemdat) | 359 (define (launch-test db run-id runname test-conf keyvallst test-name test-path i 360 (change-directory *toppath*) 360 (change-directory *toppath*) 361 (let ((useshell (config-lookup *configdat* "jobtools" "useshell")) 361 (let ((useshell (config-lookup *configdat* "jobtools" "useshell")) 362 (launcher (config-lookup *configdat* "jobtools" "launcher")) 362 (launcher (config-lookup *configdat* "jobtools" "launcher")) 363 (runscript (config-lookup test-conf "setup" "runscript")) 363 (runscript (config-lookup test-conf "setup" "runscript")) 364 (ezsteps (> (length (hash-table-ref/default test-conf "ezsteps" '())) 364 (ezsteps (> (length (hash-table-ref/default test-conf "ezsteps" '())) 365 (diskspace (config-lookup test-conf "requirements" "diskspace")) 365 (diskspace (config-lookup test-conf "requirements" "diskspace")) 366 (memory (config-lookup test-conf "requirements" "memory")) 366 (memory (config-lookup test-conf "requirements" "memory")) ................................................................................................................................................................................ 403 (list 'test-name test-name) 403 (list 'test-name test-name) 404 (list 'runscript runscript) 404 (list 'runscript runscript) 405 (list 'run-id run-id ) 405 (list 'run-id run-id ) 406 (list 'itemdat itemdat ) 406 (list 'itemdat itemdat ) 407 (list 'megatest remote-megat 407 (list 'megatest remote-megat 408 (list 'ezsteps ezsteps) 408 (list 'ezsteps ezsteps) 409 (list 'env-ovrd (hash-table- 409 (list 'env-ovrd (hash-table- 410 (list 'runname (args:get-ar | 410 (list 'runname runname) 411 (list 'mt-bindir-path mt-bind 411 (list 'mt-bindir-path mt-bind 412 ;; clean out step records from previous run if they exist 412 ;; clean out step records from previous run if they exist 413 (db:delete-test-step-records db run-id test-name itemdat) 413 (db:delete-test-step-records db run-id test-name itemdat) 414 (change-directory work-area) ;; so that log files from the launch process do 414 (change-directory work-area) ;; so that log files from the launch process do 415 (cond 415 (cond 416 ((and launcher hosts) ;; must be using ssh hostname 416 ((and launcher hosts) ;; must be using ssh hostname 417 (set! fullcmd (append launcher (car hosts)(list remote-megatest test-sig " 417 (set! fullcmd (append launcher (car hosts)(list remote-megatest test-sig " ................................................................................................................................................................................ 429 (let* ((commonprevvals (alist->env-vars 429 (let* ((commonprevvals (alist->env-vars 430 (hash-table-ref/default *configdat* "env-override" ' 430 (hash-table-ref/default *configdat* "env-override" ' 431 (testprevvals (alist->env-vars 431 (testprevvals (alist->env-vars 432 (hash-table-ref/default test-conf "pre-launch-env-ov 432 (hash-table-ref/default test-conf "pre-launch-env-ov 433 (miscprevvals (alist->env-vars ;; consolidate this code with the co 433 (miscprevvals (alist->env-vars ;; consolidate this code with the co 434 (append (list (list "MT_TEST_NAME" test-name) 434 (append (list (list "MT_TEST_NAME" test-name) 435 (list "MT_ITEM_INFO" (conc itemdat)) 435 (list "MT_ITEM_INFO" (conc itemdat)) 436 (list "MT_RUNNAME" (args:get-arg ":r | 436 (list "MT_RUNNAME" runname)) 437 itemdat))) 437 itemdat))) 438 (launch-results (apply cmd-run-proc-each-line 438 (launch-results (apply cmd-run-proc-each-line 439 (if useshell 439 (if useshell 440 (string-intersperse fullcmd " ") 440 (string-intersperse fullcmd " ") 441 (car fullcmd)) 441 (car fullcmd)) 442 print 442 print 443 (if useshell 443 (if useshell
Modified runs.scm from [28791daf010d2d23] to [9af3e39a19a599ad].
707 (debug:print 6 "RUNNING => runflag: " runflag " STATE: 707 (debug:print 6 "RUNNING => runflag: " runflag " STATE: 708 (if (not runflag) 708 (if (not runflag) 709 (if (not parent-test) 709 (if (not parent-test) 710 (debug:print 1 "NOTE: Not starting test " new-t 710 (debug:print 1 "NOTE: Not starting test " new-t 711 (let* ((get-prereqs-cmd (lambda () 711 (let* ((get-prereqs-cmd (lambda () 712 (db-get-prereqs-not-met d 712 (db-get-prereqs-not-met d 713 (launch-cmd (lambda () 713 (launch-cmd (lambda () 714 (launch-test db run-id te | 714 (launch-test db run-id (a 715 (testrundat (list get-prereqs-cmd launc 715 (testrundat (list get-prereqs-cmd launc 716 (if (or (args:get-arg "-force") 716 (if (or (args:get-arg "-force") 717 (let ((preqs-not-yet-met ((car testrundat 717 (let ((preqs-not-yet-met ((car testrundat 718 (debug:print 2 "Preqrequesites for " te 718 (debug:print 2 "Preqrequesites for " te 719 (null? preqs-not-yet-met))) ;; are ther 719 (null? preqs-not-yet-met))) ;; are ther 720 (if (not ((cadr testrundat))) ;; this is the 720 (if (not ((cadr testrundat))) ;; this is the 721 (begin 721 (begin ................................................................................................................................................................................ 1016 (debug:print 6 "RUNNING => runflag: " runflag " STATE: 1016 (debug:print 6 "RUNNING => runflag: " runflag " STATE: 1017 (if (not runflag) 1017 (if (not runflag) 1018 (if (not parent-test) 1018 (if (not parent-test) 1019 (debug:print 1 "NOTE: Not starting test " new-t 1019 (debug:print 1 "NOTE: Not starting test " new-t 1020 (let* ((get-prereqs-cmd (lambda () 1020 (let* ((get-prereqs-cmd (lambda () 1021 (db-get-prereqs-not-met d 1021 (db-get-prereqs-not-met d 1022 (launch-cmd (lambda () 1022 (launch-cmd (lambda () 1023 (launch-test db run-id te | 1023 (launch-test db run-id ru 1024 (testrundat (list get-prereqs-cmd launc 1024 (testrundat (list get-prereqs-cmd launc 1025 (if (or force 1025 (if (or force 1026 (let ((preqs-not-yet-met ((car testrundat 1026 (let ((preqs-not-yet-met ((car testrundat 1027 (debug:print 2 "Preqrequesites for " te 1027 (debug:print 2 "Preqrequesites for " te 1028 (null? preqs-not-yet-met))) ;; are ther 1028 (null? preqs-not-yet-met))) ;; are ther 1029 (if (not ((cadr testrundat))) ;; this is the 1029 (if (not ((cadr testrundat))) ;; this is the 1030 (begin 1030 (begin
Modified task_records.scm from [185f9a143613fea8] to [44007a614c0588a8].
17 (define-inline (tasks:task-get-state vec) (vector-ref vec 3)) 17 (define-inline (tasks:task-get-state vec) (vector-ref vec 3)) 18 (define-inline (tasks:task-get-target vec) (vector-ref vec 4)) 18 (define-inline (tasks:task-get-target vec) (vector-ref vec 4)) 19 (define-inline (tasks:task-get-name vec) (vector-ref vec 5)) 19 (define-inline (tasks:task-get-name vec) (vector-ref vec 5)) 20 (define-inline (tasks:task-get-test vec) (vector-ref vec 6)) 20 (define-inline (tasks:task-get-test vec) (vector-ref vec 6)) 21 (define-inline (tasks:task-get-item vec) (vector-ref vec 7)) 21 (define-inline (tasks:task-get-item vec) (vector-ref vec 7)) 22 (define-inline (tasks:task-get-creation_time vec) (vector-ref vec 8)) 22 (define-inline (tasks:task-get-creation_time vec) (vector-ref vec 8)) 23 (define-inline (tasks:task-get-execution_time vec) (vector-ref vec 9)) 23 (define-inline (tasks:task-get-execution_time vec) (vector-ref vec 9)) > 24 > 25 (define-inline (tasks:task-set-state! vec val)(vector-set! vec 3 val)) 24 26 25 27 26 ;; make-vector-record tasks monitor id pid start_time last_update hostname usern 28 ;; make-vector-record tasks monitor id pid start_time last_update hostname usern 27 (define (make-tasks:monitor)(make-vector 5)) 29 (define (make-tasks:monitor)(make-vector 5)) 28 (define-inline (tasks:monitor-get-id vec) (vector-ref vec 0)) 30 (define-inline (tasks:monitor-get-id vec) (vector-ref vec 0)) 29 (define-inline (tasks:monitor-get-pid vec) (vector-ref vec 1)) 31 (define-inline (tasks:monitor-get-pid vec) (vector-ref vec 1)) 30 (define-inline (tasks:monitor-get-start_time vec) (vector-ref vec 2)) 32 (define-inline (tasks:monitor-get-start_time vec) (vector-ref vec 2)) 31 (define-inline (tasks:monitor-get-last_update vec) (vector-ref vec 3)) 33 (define-inline (tasks:monitor-get-last_update vec) (vector-ref vec 3)) 32 (define-inline (tasks:monitor-get-hostname vec) (vector-ref vec 4)) 34 (define-inline (tasks:monitor-get-hostname vec) (vector-ref vec 4)) 33 (define-inline (tasks:monitor-get-username vec) (vector-ref vec 5)) 35 (define-inline (tasks:monitor-get-username vec) (vector-ref vec 5))
Modified tasks.scm from [3e542e1d230a1d1c] to [cdc34b2110490acc].
223 (sqlite3:execute db (conc "DELETE FROM monitors WHERE id IN ('" (string-inte 223 (sqlite3:execute db (conc "DELETE FROM monitors WHERE id IN ('" (string-inte 224 ) 224 ) 225 225 226 (define (tasks:remove-monitor-record db) 226 (define (tasks:remove-monitor-record db) 227 (sqlite3:execute db "DELETE FROM monitors WHERE pid=? AND hostname=?;" 227 (sqlite3:execute db "DELETE FROM monitors WHERE pid=? AND hostname=?;" 228 (current-process-id) 228 (current-process-id) 229 (get-host-name))) 229 (get-host-name))) > 230 > 231 (define (tasks:set-state db task-id state) > 232 (sqlite3:execute db "UPDATE tasks_queue SET state=? WHERE id=?;" > 233 state > 234 task-id)) 230 235 231 (define (tasks:start-run db task) 236 (define (tasks:start-run db task) 232 ;; Starting run #(3 run matt reset ubuntu/afs/tmp ww44 % % 1319368208.0 131938 237 ;; Starting run #(3 run matt reset ubuntu/afs/tmp ww44 % % 1319368208.0 131938 233 ;; Starting run #(5 run matt reset centos/nfs/nada ww42 all all 1319371306.0 1 238 ;; Starting run #(5 run matt reset centos/nfs/nada ww42 all all 1319371306.0 1 234 (print "Starting run " task) 239 (print "Starting run " task) 235 ;; sillyness, just call the damn routine with the task vector and be done with 240 ;; sillyness, just call the damn routine with the task vector and be done with 236 (runs:run-tests db 241 (runs:run-tests db 237 (tasks:task-get-target task) 242 (tasks:task-get-target task) 238 (tasks:task-get-name task) 243 (tasks:task-get-name task) 239 (tasks:task-get-test task) 244 (tasks:task-get-test task) 240 (tasks:task-get-item task) 245 (tasks:task-get-item task) 241 (tasks:task-get-owner task) 246 (tasks:task-get-owner task) 242 (make-hash-table)) 247 (make-hash-table)) > 248 (tasks:set-state db (tasks:task-get-id task) "waiting") 243 ) 249 )
Modified tests/megatest.config from [6d5060d736ea6ee6] to [afd6a74f3f650a08].
5 5 6 [setup] 6 [setup] 7 # exectutable /path/to/megatest 7 # exectutable /path/to/megatest 8 # max_concurrent_jobs 4 8 # max_concurrent_jobs 4 9 runsdir /tmp/runs 9 runsdir /tmp/runs 10 10 11 [jobtools] 11 [jobtools] 12 useshell yes | 12 # useshell yes 13 # ## launcher launches jobs, the job is managed on the target host 13 # ## launcher launches jobs, the job is managed on the target host 14 ## by megatest, comment out launcher to run local 14 ## by megatest, comment out launcher to run local 15 # workhosts localhost hermes 15 # workhosts localhost hermes 16 # launcher nbfake 16 # launcher nbfake 17 # launcher nodanggood 17 # launcher nodanggood 18 18 19 ## use "xterm -e csi -- " as a launcher to examine the launch environment. 19 ## use "xterm -e csi -- " as a launcher to examine the launch environment.