Index: db.scm ================================================================== --- db.scm +++ db.scm @@ -916,11 +916,11 @@ (define (db:clean-all-caches) (set! *test-info* (make-hash-table)) (set! *test-id-cache* (make-hash-table))) ;; Get test data using test_id -(define (db:get-test-info-not-cached-by-id db test-id) +(define (db:get-test-info-by-id db test-id) (if (not test-id) (begin (debug:print-info 4 "db:get-test-info-by-id called with test-id=" test-id) #f) (let ((res #f)) @@ -931,12 +931,10 @@ db "SELECT id,run_id,testname,state,status,event_time,host,cpuload,diskfree,uname,rundir,item_path,run_duration,final_logf,comment FROM tests WHERE id=?;" test-id) res))) -(define db:get-test-info-by-id db:get-test-info-not-cached-by-id) - (define (db:get-test-info db run-id testname item-path) (db:get-test-info-by-id db (db:get-test-id db run-id testname item-path))) (define (db:test-set-comment db test-id comment) (sqlite3:execute @@ -970,10 +968,19 @@ ;;====================================================================== ;; Misc. test related queries ;;====================================================================== (define (db:test-get-paths-matching db keynames target fnamepatt #!key (res '())) + (let ((paths-from-db (db:test-get-paths-matching-keynames-target db keynames target res))) + (if fnamepatt + (apply append + (map (lambda (p) + (glob (conc p "/" fnamepatt))) + res)) + res))) + +(define (db:test-get-paths-matching-keynames-target db keynames target res) (let* ((testpatt (if (args:get-arg "-testpatt")(args:get-arg "-testpatt") "%")) (statepatt (if (args:get-arg ":state") (args:get-arg ":state") "%")) (statuspatt (if (args:get-arg ":status") (args:get-arg ":status") "%")) (runname (if (args:get-arg ":runname") (args:get-arg ":runname") "%")) (keystr (string-intersperse @@ -991,16 +998,11 @@ (sqlite3:for-each-row (lambda (p) (set! res (cons p res))) db qrystr) - (if fnamepatt - (apply append - (map (lambda (p) - (glob (conc p "/" fnamepatt))) - res)) - res))) + res)) ;; look through tests from matching runs for a file (define (db:test-get-first-path-matching db keynames target fname) ;; [refpaths] is the section where references to other megatest databases are stored (let ((mt-paths (configf:get-section "refpaths")) Index: megatest.scm ================================================================== --- megatest.scm +++ megatest.scm @@ -593,11 +593,12 @@ (begin (debug:print 0 "Failed to setup, giving up on -test-paths or -test-files, exiting") (exit 1))) (let* ((keys (cdb:remote-run db:get-keys db)) (keynames (map key:get-fieldname keys)) - (paths (cdb:remote-run db:test-get-paths-matching db keynames target (args:get-arg "-test-files")))) + ;; db:test-get-paths must not be run remote + (paths (db:test-get-paths-matching db keynames target (args:get-arg "-test-files")))) (set! *didsomething* #t) (for-each (lambda (path) (print path)) paths))) ;; else do a general-run-call @@ -604,11 +605,12 @@ (general-run-call "-test-files" "Get paths to test" (lambda (target runname keys keynames keyvallst) (let* ((db #f) - (paths (cdb:remote-run db:test-get-paths-matching db keynames target (args:get-arg "-test-files")))) + ;; DO NOT run remote + (paths (db:test-get-paths-matching db keynames target (args:get-arg "-test-files")))) (for-each (lambda (path) (print path)) paths)))))) ;;====================================================================== @@ -643,11 +645,12 @@ (begin (debug:print 0 "Failed to setup, giving up on -archive, exiting") (exit 1))) (let* ((keys (cdb:remote-run db:get-keys db)) (keynames (map key:get-fieldname keys)) - (paths (cdb:remote-run db:test-get-paths-matching db keynames target))) + ;; DO NOT run remote + (paths (db:test-get-paths-matching db keynames target))) (set! *didsomething* #t) (for-each (lambda (path) (print path)) paths))) ;; else do a general-run-call @@ -654,11 +657,12 @@ (general-run-call "-test-paths" "Get paths to tests" (lambda (target runname keys keynames keyvallst) (let* ((db #f) - (paths (cdb:remote-run db:test-get-paths-matching db keynames target))) + ;; DO NOT run remote + (paths (db:test-get-paths-matching db keynames target))) (for-each (lambda (path) (print path)) paths)))))) ;;====================================================================== Index: server.scm ================================================================== --- server.scm +++ server.scm @@ -179,12 +179,12 @@ ;; else fall back to fs (debug:print-info 11 "CLIENT SETUP, hostinfo=" hostinfo) (set! *transport-type* (if hostinfo (string->symbol (tasks:hostinfo-get-transport hostinfo)) 'fs)) - ;; DEBUG STUFF - (if (eq? *transport-type* 'fs)(begin (print "ERROR!!!!!!! refusing to run with transport " *transport-type*)(exit 99))) + ;; ;; DEBUG STUFF + ;; (if (eq? *transport-type* 'fs)(begin (print "ERROR!!!!!!! refusing to run with transport " *transport-type*)(exit 99))) (debug:print-info 11 "Using transport type of " *transport-type* (if hostinfo (conc " to connect to " hostinfo) "")) (case *transport-type* ((fs)(if (not *megatest-db*)(set! *megatest-db* (open-db)))) ((http) Index: tests/fullrun/config/mt_include_1.config ================================================================== --- tests/fullrun/config/mt_include_1.config +++ tests/fullrun/config/mt_include_1.config @@ -1,8 +1,8 @@ [setup] # exectutable /path/to/megatest -max_concurrent_jobs 50 +max_concurrent_jobs 30 linktree #{getenv MT_RUN_AREA_HOME}/tmp/mt_links [jobtools] useshell yes # ## launcher launches jobs, the job is managed on the target host