Index: launch.scm ================================================================== --- launch.scm +++ launch.scm @@ -336,11 +336,11 @@ (if (equal? (db:test-get-status testinfo) "AUTO") "AUTO-WARN" "WARN")) (else "FAIL")) (args:get-arg "-m") #f))) ;; for automated creation of the rollup html file this is a good place... (if (not (equal? item-path "")) - (open-run-close tests:summarize-items #f run-id test-name #f)) ;; don't force - just update if no + (tests:summarize-items run-id test-name #f)) ;; don't force - just update if no ) (mutex-unlock! m) ;; (exec-results (cmd-run->list fullrunscript)) ;; (list ">" (conc test-name "-run.log")))) ;; (success exec-results)) ;; (eq? (cadr exec-results) 0))) (debug:print 2 "Output from running " fullrunscript ", pid " (vector-ref exit-info 0) " in work area " @@ -435,11 +435,14 @@ (lnkbase (conc linktree "/" target "/" runname)) (lnkpath (conc lnkbase "/" testname)) (lnkpathf (conc lnkpath (if not-iterated "" "/") item-path))) ;; Update the rundir path in the test record for all - (cdb:test-set-rundir-by-test-id *runremote* test-id lnkpathf) + (cdb:test-set-rundir-by-test-id *runremote* test-id + (if (equal? (configf:lookup *configdat* "setup" "testpath") "runpath") + test-path + lnkpathf)) (debug:print 2 "INFO:\n lnkbase=" lnkbase "\n lnkpath=" lnkpath "\n toptest-path=" toptest-path "\n test-path=" test-path) (if (not (file-exists? linktree)) (begin (debug:print 0 "WARNING: linktree did not exist! Creating it now at " linktree) @@ -458,11 +461,14 @@ (if (not (hash-table-ref/default *toptest-paths* testname #f)) (let* ((testinfo (cdb:get-test-info-by-id *runremote* test-id)) ;; run-id testname item-path)) (curr-test-path (if testinfo (db:test-get-rundir testinfo) #f))) (hash-table-set! *toptest-paths* testname curr-test-path) ;; NB// Was this for the test or for the parent in an iterated test? - (cdb:test-set-rundir! *runremote* run-id testname "" lnkpath) ;; toptest-path) + (cdb:test-set-rundir! *runremote* run-id testname "" + (if (equal? (configf:lookup *configdat* "setup" "testpath") "runpath") + toptest-path + lnkpath)) (if (or (not curr-test-path) (not (directory-exists? toptest-path))) (begin (debug:print-info 2 "Creating " toptest-path " and link " lnkpath) (create-directory toptest-path #t) Index: megatest.scm ================================================================== --- megatest.scm +++ megatest.scm @@ -851,14 +851,14 @@ (if (args:get-arg "-setlog") (let ((logfname (args:get-arg "-setlog"))) (cdb:test-set-log! *runremote* test-id logfname))) (if (args:get-arg "-set-toplog") ;; DO NOT run remote - (tests:test-set-toplog! db run-id test-name (args:get-arg "-set-toplog"))) + (tests:test-set-toplog! run-id test-name (args:get-arg "-set-toplog"))) (if (args:get-arg "-summarize-items") ;; DO NOT run remote - (tests:summarize-items db run-id test-name #t)) ;; do force here + (tests:summarize-items run-id test-name #t)) ;; do force here (if (args:get-arg "-runstep") (if (null? remargs) (begin (debug:print 0 "ERROR: nothing specified to run!") (if db (sqlite3:finalize! db)) Index: tests.scm ================================================================== --- tests.scm +++ tests.scm @@ -339,14 +339,14 @@ (let ((cmt (if waived waived comment))) (cdb:remote-run db:test-set-comment #f test-id cmt))) )) -(define (tests:test-set-toplog! db run-id test-name logf) +(define (tests:test-set-toplog! run-id test-name logf) (cdb:client-call *runremote* 'tests:test-set-toplog #t 2 logf run-id test-name)) -(define (tests:summarize-items db run-id test-name force) +(define (tests:summarize-items run-id test-name force) ;; if not force then only update the record if one of these is true: ;; 1. logf is "log/final.log ;; 2. logf is same as outputfilename (let* ((outputfilename (conc "megatest-rollup-" test-name ".html")) (orig-dir (current-directory)) @@ -427,11 +427,11 @@ outtxt "") (release-dot-lock outputfilename))) (close-output-port oup) (change-directory orig-dir) ;; NB// tests:test-set-toplog! is remote internal... - (tests:test-set-toplog! db run-id test-name outputfilename) + (tests:test-set-toplog! run-id test-name outputfilename) ))))) (define (get-all-legal-tests) (let* ((tests (glob (conc *toppath* "/tests/*"))) (res '())) Index: tests/fullrun/megatest.config ================================================================== --- tests/fullrun/megatest.config +++ tests/fullrun/megatest.config @@ -27,10 +27,16 @@ # Throttle roughly scales the db access milliseconds to seconds delay throttle 0.2 # Max retries allows megatest to re-check that a tests status has changed # as tests can have transient FAIL status occasionally maxretries 20 + +# Store the linkpath or the runpath in the database for tests. Default is +# linkpath +# +# testpath linkpath +# testpath runpath [validvalues] state start end 0 1 - 2 status pass fail n/a 0 1 running - 2 ADDED tests/fullrun/tests/sqlitespeed/logcheck.logpro Index: tests/fullrun/tests/sqlitespeed/logcheck.logpro ================================================================== --- /dev/null +++ tests/fullrun/tests/sqlitespeed/logcheck.logpro @@ -0,0 +1,1 @@ +;; An empty file with no rules is legit ... Index: tests/fullrun/tests/sqlitespeed/runscript.rb ================================================================== --- tests/fullrun/tests/sqlitespeed/runscript.rb +++ tests/fullrun/tests/sqlitespeed/runscript.rb @@ -8,10 +8,12 @@ if (! File.exists?("../../runfirst/I_was_here")) puts "ERROR: This test was started before the prerequisites ran!" system "megatest -test-status :state INCOMPLETE :status FAIL" exit 1 end + +system "megatest -setlog logcheck.html" # file_size_checker(stepname, filename, minsize, maxsize) - negative means ignore # file_size_checker('create db','testing.db',100,-1) num_records=rand(5) # 0000 @@ -30,9 +32,6 @@ else status='fail' end record_step("add #{num_records}","end",status) - - - Index: tests/fullrun/tests/sqlitespeed/testconfig ================================================================== --- tests/fullrun/tests/sqlitespeed/testconfig +++ tests/fullrun/tests/sqlitespeed/testconfig @@ -1,7 +1,8 @@ [setup] -runscript runscript.rb +runscript runscript.rb | logpro logcheck.logpro logcheck.html + tags non important,dumb junk [requirements] waiton runfirst