@@ -220,18 +220,18 @@ (db:test-data-rollup db test-id)) ;; add metadata (need to do this way to avoid SQL injection issues) ;; :first_err - (let ((val (hash-table-ref/default otherdat ":first_err" #f))) - (if val - (sqlite3:execute db "UPDATE tests SET first_err=? WHERE run_id=? AND testname=? AND item_path=?;" val run-id test-name item-path))) - - ;; :first_warn - (let ((val (hash-table-ref/default otherdat ":first_warn" #f))) - (if val - (sqlite3:execute db "UPDATE tests SET first_warn=? WHERE run_id=? AND testname=? AND item_path=?;" val run-id test-name item-path))) + ;; (let ((val (hash-table-ref/default otherdat ":first_err" #f))) + ;; (if val + ;; (sqlite3:execute db "UPDATE tests SET first_err=? WHERE run_id=? AND testname=? AND item_path=?;" val run-id test-name item-path))) + ;; + ;; ;; :first_warn + ;; (let ((val (hash-table-ref/default otherdat ":first_warn" #f))) + ;; (if val + ;; (sqlite3:execute db "UPDATE tests SET first_warn=? WHERE run_id=? AND testname=? AND item_path=?;" val run-id test-name item-path))) (let ((category (hash-table-ref/default otherdat ":category" "")) (variable (hash-table-ref/default otherdat ":variable" "")) (value (hash-table-ref/default otherdat ":value" #f)) (expected (hash-table-ref/default otherdat ":expected" #f)) @@ -638,11 +638,11 @@ (parent-test (and (not (null? items))(equal? item-path ""))) (single-test (and (null? items) (equal? item-path ""))) (item-test (not (equal? item-path ""))) (item-patt (args:get-arg "-itempatt")) (patt-match (if item-patt - (string-match (glob->regexp + (string-search (glob->regexp (string-translate item-patt "%" "*")) item-path) #t))) (debug:print 3 "max-concurrent-jobs: " max-concurrent-jobs ", num-running: " num-running) (if (and patt-match (runs:can-run-more-tests db)) @@ -944,16 +944,17 @@ ;; look through all the item-patts if defined, format is patt1,patt2,patt3 ... wildcard is % (item-matches (if item-patts (let ((res #f)) (for-each (lambda (patt) - (if (string-match (glob->regexp - (string-translate patt "%" "*")) - item-path) + (if (string-search (glob->regexp + (string-translate patt "%" "*")) + item-path) (set! res #t))) - (string-split item-patts ","))) - #t))) + (string-split item-patts ",")) + res) + #t))) (debug:print 3 "max-concurrent-jobs: " max-concurrent-jobs ", num-running: " num-running) (if (and item-matches (runs:can-run-more-tests db)) (begin (let loop2 ((ts (db:get-test-info db run-id test-name item-path)) ;; #f) (ct 0)) @@ -1246,12 +1247,12 @@ (test-steps (db:get-steps-for-test db (db:test-get-id testdat))) (new-test-record #f)) ;; replace these with insert ... select (apply sqlite3:execute db - (conc "INSERT OR REPLACE INTO tests (run_id,testname,state,status,event_time,host,cpuload,diskfree,uname,rundir,item_path,run_duration,final_logf,comment,first_err,first_warn) " - "VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?);") + (conc "INSERT OR REPLACE INTO tests (run_id,testname,state,status,event_time,host,cpuload,diskfree,uname,rundir,item_path,run_duration,final_logf,comment) " + "VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?);") new-run-id (cddr (vector->list testdat))) (set! new-testdat (car (db-get-tests-for-run db new-run-id testname item-path '() '()))) (hash-table-set! curr-tests-hash full-name new-testdat) ;; this could be confusing, which record should go into the lookup table? ;; Now duplicate the test steps (debug:print 4 "Copying records in test_steps from test_id=" (db:test-get-id testdat) " to " (db:test-get-id new-testdat))