Check-in [52120b2140]
Not logged in
Overview
SHA1 Hash:52120b21407e4686cf28b3fd8cfaf9142e37e21b
Date: 2011-10-19 21:16:42
User: mrwellan
Comment:Merged in changes from private branch
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | manifest
Tags And Properties
Changes

Modified db.scm from [2cd8ae0df0f6f0b3] to [b15049b4616f7faa].

71 run_id INTEGER, 71 run_id INTEGER, 72 testname TEXT, 72 testname TEXT, 73 host TEXT DEFAULT 'n/a', 73 host TEXT DEFAULT 'n/a', 74 cpuload REAL DEFAULT -1, 74 cpuload REAL DEFAULT -1, 75 diskfree INTEGER DEFAULT -1, 75 diskfree INTEGER DEFAULT -1, 76 uname TEXT DEFAULT 'n/a', 76 uname TEXT DEFAULT 'n/a', 77 rundir TEXT DEFAULT 'n/a', 77 rundir TEXT DEFAULT 'n/a', > 78 shortdir TEXT DEFAULT '', 78 item_path TEXT DEFAULT '', 79 item_path TEXT DEFAULT '', 79 state TEXT DEFAULT 'NOT_STARTED', 80 state TEXT DEFAULT 'NOT_STARTED', 80 status TEXT DEFAULT 'FAIL', 81 status TEXT DEFAULT 'FAIL', 81 attemptnum INTEGER DEFAULT 0, 82 attemptnum INTEGER DEFAULT 0, 82 final_logf TEXT DEFAULT 'logs/final.log', 83 final_logf TEXT DEFAULT 'logs/final.log', 83 logdat BLOB, 84 logdat BLOB, 84 run_duration INTEGER DEFAULT 0, 85 run_duration INTEGER DEFAULT 0, 85 comment TEXT DEFAULT '', 86 comment TEXT DEFAULT '', 86 event_time TIMESTAMP, 87 event_time TIMESTAMP, 87 fail_count INTEGER DEFAULT 0, 88 fail_count INTEGER DEFAULT 0, 88 pass_count INTEGER DEFAULT 0, 89 pass_count INTEGER DEFAULT 0, 89 first_err TEXT, < 90 first_warn TEXT, < 91 CONSTRAINT testsconstraint UNIQUE (run_id, testname, item_p 90 CONSTRAINT testsconstraint UNIQUE (run_id, testname, item_p 92 );") 91 );") 93 (sqlite3:execute db "CREATE INDEX tests_index ON tests (run_id, testna 92 (sqlite3:execute db "CREATE INDEX tests_index ON tests (run_id, testna 94 (sqlite3:execute db "CREATE VIEW runs_tests AS SELECT * FROM runs INNE 93 (sqlite3:execute db "CREATE VIEW runs_tests AS SELECT * FROM runs INNE 95 (sqlite3:execute db "CREATE TABLE IF NOT EXISTS test_steps 94 (sqlite3:execute db "CREATE TABLE IF NOT EXISTS test_steps 96 (id INTEGER PRIMARY KEY, 95 (id INTEGER PRIMARY KEY, 97 test_id INTEGER, 96 test_id INTEGER, 98 stepname TEXT, 97 stepname TEXT, 99 state TEXT DEFAULT 'NOT_STARTED', 98 state TEXT DEFAULT 'NOT_STARTED', 100 status TEXT DEFAULT 'n/a',event_time TIMESTAMP, | 99 status TEXT DEFAULT 'n/a', > 100 event_time TIMESTAMP, 101 comment TEXT DEFAULT '', 101 comment TEXT DEFAULT '', > 102 logfile TEXT, 102 CONSTRAINT test_steps_constraint UNIQUE (test_id, 103 CONSTRAINT test_steps_constraint UNIQUE (test_id, 103 (sqlite3:execute db "CREATE TABLE IF NOT EXISTS extradat (id INTEGER P 104 (sqlite3:execute db "CREATE TABLE IF NOT EXISTS extradat (id INTEGER P 104 (sqlite3:execute db "CREATE TABLE IF NOT EXISTS metadat (id INTEGER PR 105 (sqlite3:execute db "CREATE TABLE IF NOT EXISTS metadat (id INTEGER PR 105 CONSTRAINT metadat_constraint UNIQUE (var));") 106 CONSTRAINT metadat_constraint UNIQUE (var));") 106 (sqlite3:execute db "CREATE TABLE IF NOT EXISTS access_log (id INTEGER 107 (sqlite3:execute db "CREATE TABLE IF NOT EXISTS access_log (id INTEGER 107 (sqlite3:execute db "CREATE TABLE IF NOT EXISTS test_data (id INTEGER < 108 test_id INTEGER, < 109 category TEXT DEFAULT '', < 110 variable TEXT, < 111 value REAL, < 112 expected REAL, < 113 tol REAL, < 114 units TEXT, < 115 comment TEXT DEFAULT '', < 116 status TEXT DEFAULT 'n/a', < 117 CONSTRAINT test_data UNIQUE (test_id,category,vari < 118 (sqlite3:execute db "CREATE TABLE IF NOT EXISTS test_meta (id INTEGER | 108 (sqlite3:execute db "CREATE TABLE IF NOT EXISTS test_meta (id INTEGER 119 testname TEXT DEFAULT '', 109 testname TEXT DEFAULT '', 120 author TEXT DEFAULT '', 110 author TEXT DEFAULT '', 121 owner TEXT DEFAULT '', 111 owner TEXT DEFAULT '', 122 description TEXT DEFAULT '', 112 description TEXT DEFAULT '', 123 reviewed TIMESTAMP, 113 reviewed TIMESTAMP, 124 iterated TEXT DEFAULT '', 114 iterated TEXT DEFAULT '', 125 avg_runtime REAL, 115 avg_runtime REAL, 126 avg_disk REAL, 116 avg_disk REAL, 127 tags TEXT DEFAULT '', 117 tags TEXT DEFAULT '', 128 CONSTRAINT test_meta_constraint UNIQUE (testname 118 CONSTRAINT test_meta_constraint UNIQUE (testname 129 (sqlite3:execute db "CREATE TABLE IF NOT EXISTS test_data (id INTEGER | 119 (sqlite3:execute db "CREATE TABLE IF NOT EXISTS test_data (id INTEGER 130 test_id INTEGER, 120 test_id INTEGER, 131 category TEXT DEFAULT '', 121 category TEXT DEFAULT '', 132 variable TEXT, 122 variable TEXT, 133 value REAL, 123 value REAL, 134 expected REAL, 124 expected REAL, 135 tol REAL, 125 tol REAL, 136 units TEXT, 126 units TEXT, ................................................................................................................................................................................ 203 category TEXT DEFAULT '', 193 category TEXT DEFAULT '', 204 variable TEXT, 194 variable TEXT, 205 value REAL, 195 value REAL, 206 expected REAL, 196 expected REAL, 207 tol REAL, 197 tol REAL, 208 units TEXT, 198 units TEXT, 209 comment TEXT DEFAULT '', 199 comment TEXT DEFAULT '', 210 status TEXT DEFAULT 'n/a', | 200 status TEXT DEFAULT 'n/a',foss 211 CONSTRAINT test_data UNIQUE (test_id,category,vari 201 CONSTRAINT test_data UNIQUE (test_id,category,vari 212 (patch-db)) 202 (patch-db)) 213 ((< mver 1.27) 203 ((< mver 1.27) 214 (db:set-var db "MEGATEST_VERSION" 1.27) 204 (db:set-var db "MEGATEST_VERSION" 1.27) 215 (sqlite3:execute db "ALTER TABLE test_data ADD COLUMN type TEXT DEFAULT ' 205 (sqlite3:execute db "ALTER TABLE test_data ADD COLUMN type TEXT DEFAULT ' 216 (patch-db)) 206 (patch-db)) > 207 ((< mver 1.28) > 208 (db:set-var db "MEGATEST_VERSION" 1.28) > 209 (sqlite3:execute db "ALTER TABLE test_steps ADD COLUMN logfile TEXT;") > 210 (sqlite3:execute db "ALTER TABLE tests ADD COLUMN shortdir TEXT DEFAULT ' > 211 (patch-db)) 217 ((< mver megatest-version) 212 ((< mver megatest-version) 218 (db:set-var db "MEGATEST_VERSION" megatest-version)))))) 213 (db:set-var db "MEGATEST_VERSION" megatest-version)))))) 219 214 220 ;;====================================================================== 215 ;;====================================================================== 221 ;; meta get and set vars 216 ;; meta get and set vars 222 ;;====================================================================== 217 ;;====================================================================== 223 218

Modified launch.scm from [c038dc8f96db9294] to [881857aea9ba0bf6].

157 (set! script (conc script 157 (set! script (conc script 158 158 159 ;; call the command using mt_ 159 ;; call the command using mt_ 160 (set! script (conc script "mt 160 (set! script (conc script "mt 161 161 162 (debug:print 4 "script: " scr 162 (debug:print 4 "script: " scr 163 163 164 (teststep-set-status! db run- | 164 (teststep-set-status! db run- 165 ;; now launch 165 ;; now launch 166 (let ((pid (process-run scrip 166 (let ((pid (process-run scrip 167 (let processloop ((i 0)) 167 (let processloop ((i 0)) 168 (let-values (((pid-val ex 168 (let-values (((pid-val ex 169 (mutex-lock! 169 (mutex-lock! 170 (vector-set! 170 (vector-set! 171 (vector-set! 171 (vector-set! ................................................................................................................................................................................ 172 (vector-set! 172 (vector-set! 173 (mutex-unlock 173 (mutex-unlock 174 (if (eq? pid- 174 (if (eq? pid- 175 (begin 175 (begin 176 (thread 176 (thread 177 (proces 177 (proces 178 )) 178 )) 179 (teststep-set-status! db ru | 179 (teststep-set-status! db ru 180 (if logpro-used 180 (if logpro-used 181 (test-set-log! db run-i 181 (test-set-log! db run-i 182 (cond 182 (cond 183 ;; WARN from logpro 183 ;; WARN from logpro 184 ((and (eq? (vector-ref exi 184 ((and (eq? (vector-ref exi 185 (test-set-status! db run- 185 (test-set-status! db run- 186 ((eq? (vector-ref exit-inf 186 ((eq? (vector-ref exit-inf

Modified megatest-version.scm from [13d5db31c5516bcf] to [d71a89278800919b].

1 ;; Always use two digit decimal 1 ;; Always use two digit decimal 2 ;; 1.01, 1.02...1.10,1.11 ... 1.99,2.00.. 2 ;; 1.01, 1.02...1.10,1.11 ... 1.99,2.00.. 3 3 4 (declare (unit megatest-version)) 4 (declare (unit megatest-version)) 5 5 6 (define megatest-version 1.27) | 6 (define megatest-version 1.28) > 7

Modified megatest.scm from [3eccf8bbd1d5ac64] to [d64eb95b04d14326].

403 (test-name (assoc/default 'test-name cmdinfo)) 403 (test-name (assoc/default 'test-name cmdinfo)) 404 (runscript (assoc/default 'runscript cmdinfo)) 404 (runscript (assoc/default 'runscript cmdinfo)) 405 (db-host (assoc/default 'db-host cmdinfo)) 405 (db-host (assoc/default 'db-host cmdinfo)) 406 (run-id (assoc/default 'run-id cmdinfo)) 406 (run-id (assoc/default 'run-id cmdinfo)) 407 (itemdat (assoc/default 'itemdat cmdinfo)) 407 (itemdat (assoc/default 'itemdat cmdinfo)) 408 (db #f) 408 (db #f) 409 (state (args:get-arg ":state")) 409 (state (args:get-arg ":state")) 410 (status (args:get-arg ":status"))) | 410 (status (args:get-arg ":status")) > 411 (logfile (args:get-arg "-setlog"))) 411 (change-directory testpath) 412 (change-directory testpath) 412 (if (not (setup-for-run)) 413 (if (not (setup-for-run)) 413 (begin 414 (begin 414 (debug:print 0 "Failed to setup, exiting") 415 (debug:print 0 "Failed to setup, exiting") 415 (exit 1))) 416 (exit 1))) 416 (set! db (open-db)) 417 (set! db (open-db)) 417 (if (and state status) 418 (if (and state status) 418 (teststep-set-status! db run-id test-name step state status itemda | 419 (teststep-set-status! db run-id test-name step state status itemda 419 (begin 420 (begin 420 (debug:print 0 "ERROR: You must specify :state and :status with 421 (debug:print 0 "ERROR: You must specify :state and :status with 421 (exit 6))) 422 (exit 6))) 422 (sqlite3:finalize! db) 423 (sqlite3:finalize! db) 423 (set! *didsomething* #t)))) 424 (set! *didsomething* #t)))) 424 425 425 (if (or (args:get-arg "-setlog") ;; since setting up is so costly lets pig 426 (if (or (args:get-arg "-setlog") ;; since setting up is so costly lets pig ................................................................................................................................................................................ 474 (redir (case (string->symbol shell) 475 (redir (case (string->symbol shell) 475 ((tcsh csh ksh) ">&") 476 ((tcsh csh ksh) ">&") 476 ((zsh bash sh ash) "2>&1 >"))) 477 ((zsh bash sh ash) "2>&1 >"))) 477 (fullcmd (conc "(" (string-intersperse 478 (fullcmd (conc "(" (string-intersperse 478 (cons cmd params) " ") 479 (cons cmd params) " ") 479 ") " redir " " logfile))) 480 ") " redir " " logfile))) 480 ;; mark the start of the test 481 ;; mark the start of the test 481 (teststep-set-status! db run-id test-name stepname "start" " | 482 (teststep-set-status! db run-id test-name stepname "start" " 482 ;; close the db 483 ;; close the db 483 (sqlite3:finalize! db) 484 (sqlite3:finalize! db) 484 ;; run the test step 485 ;; run the test step 485 (debug:print 2 "INFO: Running \"" fullcmd "\"") 486 (debug:print 2 "INFO: Running \"" fullcmd "\"") 486 (change-directory startingdir) 487 (change-directory startingdir) 487 (set! exitstat (system fullcmd)) ;; cmd params)) 488 (set! exitstat (system fullcmd)) ;; cmd params)) 488 (set! *globalexitstatus* exitstat) 489 (set! *globalexitstatus* exitstat) ................................................................................................................................................................................ 496 (cmd (string-intersperse (list "logpro" l 497 (cmd (string-intersperse (list "logpro" l 497 (debug:print 2 "INFO: running \"" cmd "\"") 498 (debug:print 2 "INFO: running \"" cmd "\"") 498 (change-directory startingdir) 499 (change-directory startingdir) 499 (set! exitstat (system cmd)) 500 (set! exitstat (system cmd)) 500 (set! *globalexitstatus* exitstat) ;; no necessary 501 (set! *globalexitstatus* exitstat) ;; no necessary 501 (change-directory testpath) 502 (change-directory testpath) 502 (test-set-log! db run-id test-name itemdat htmllogfile 503 (test-set-log! db run-id test-name itemdat htmllogfile 503 (teststep-set-status! db run-id test-name stepname "end" exi | 504 (teststep-set-status! db run-id test-name stepname "end" exi 504 (sqlite3:finalize! db) 505 (sqlite3:finalize! db) 505 (if (not (eq? exitstat 0)) 506 (if (not (eq? exitstat 0)) 506 (exit 254)) ;; (exit exitstat) doesn't work?!? 507 (exit 254)) ;; (exit exitstat) doesn't work?!? 507 ;; open the db 508 ;; open the db 508 ;; mark the end of the test 509 ;; mark the end of the test 509 ))) 510 ))) 510 (if (or (args:get-arg "-test-status") 511 (if (or (args:get-arg "-test-status")

Modified runs.scm from [a3e8fc209f648c1c] to [2722d9b41ecd9209].

396 (let ((valid-values (let ((s (config-lookup *configdat* "validvalues" class))) 396 (let ((valid-values (let ((s (config-lookup *configdat* "validvalues" class))) 397 (if s (string-split s) #f)))) 397 (if s (string-split s) #f)))) 398 (if valid-values 398 (if valid-values 399 (if (member item valid-values) 399 (if (member item valid-values) 400 item #f) 400 item #f) 401 item))) 401 item))) 402 402 403 (define (teststep-set-status! db run-id test-name teststep-name state-in status- | 403 (define (teststep-set-status! db run-id test-name teststep-name state-in status- 404 (debug:print 4 "run-id: " run-id " test-name: " test-name) 404 (debug:print 4 "run-id: " run-id " test-name: " test-name) 405 (let* ((state (check-valid-items "state" state-in)) 405 (let* ((state (check-valid-items "state" state-in)) 406 (status (check-valid-items "status" status-in)) 406 (status (check-valid-items "status" status-in)) 407 (item-path (item-list->path itemdat)) 407 (item-path (item-list->path itemdat)) 408 (testdat (db:get-test-info db run-id test-name item-path))) 408 (testdat (db:get-test-info db run-id test-name item-path))) 409 (debug:print 5 "testdat: " testdat) 409 (debug:print 5 "testdat: " testdat) 410 (if (and testdat ;; if the section exists then force specification BUG, I do 410 (if (and testdat ;; if the section exists then force specification BUG, I do 411 (or (not state)(not status))) 411 (or (not state)(not status))) 412 (debug:print 0 "WARNING: Invalid " (if status "status" "state") 412 (debug:print 0 "WARNING: Invalid " (if status "status" "state") 413 " value \"" (if status state-in status-in) "\", update your valid 413 " value \"" (if status state-in status-in) "\", update your valid 414 (if testdat 414 (if testdat 415 (let ((test-id (test:get-id testdat))) 415 (let ((test-id (test:get-id testdat))) > 416 ;; FIXME - this should not update the logfile unless it is specified. 416 (sqlite3:execute db 417 (sqlite3:execute db 417 "INSERT OR REPLACE into test_steps (test_id,stepname,sta | 418 "INSERT OR REPLACE into test_steps (test_id,stepname,sta 418 test-id teststep-name state-in status-in (if comment com | 419 test-id teststep-name state-in status-in (if comment com 419 (debug:print 0 "ERROR: Can't update " test-name " for run " run-id " -> 420 (debug:print 0 "ERROR: Can't update " test-name " for run " run-id " -> 420 421 421 (define (test-get-kill-request db run-id test-name itemdat) 422 (define (test-get-kill-request db run-id test-name itemdat) 422 (let* ((item-path (item-list->path itemdat)) 423 (let* ((item-path (item-list->path itemdat)) 423 (testdat (db:get-test-info db run-id test-name item-path))) 424 (testdat (db:get-test-info db run-id test-name item-path))) 424 (equal? (test:get-state testdat) "KILLREQ"))) 425 (equal? (test:get-state testdat) "KILLREQ"))) 425 426