Index: megatest.scm ================================================================== --- megatest.scm +++ megatest.scm @@ -31,15 +31,16 @@ (include "common_records.scm") (include "key_records.scm") (include "db_records.scm") (include "megatest-fossil-hash.scm") -(use trace dot-locking) -(trace - cdb:tests-register-test - cdb:client-call -) +;; (use trace dot-locking) +;; (trace +;; cdb:tests-register-test +;; cdb:client-call +;; db:queue-write-and-wait +;; ) ;; cdb:remote-run ;; cdb:test-set-status-state ;; change-directory ;; db:process-queue-item ;; db:test-get-logfile-info Index: runs.scm ================================================================== --- runs.scm +++ runs.scm @@ -445,23 +445,21 @@ (thread-sleep! 0.01) (loop (car newtal)(cdr newtal) reruns)) ((not (hash-table-ref/default test-registery (runs:make-full-test-name test-name item-path) #f)) (debug:print-info 4 "Pre-registering test " test-name "/" item-path " to create placeholder" ) ;; NEED TO THREADIFY THIS - ;; (let ((th (make-thread (lambda () - ;; (print "Got here! AA") - ;; (mutex-lock! registery-mutex) - ;; (hash-table-set! test-registery (runs:make-full-test-name test-name item-path) 'start) - ;; (mutex-unlock! registery-mutex) - (cdb:tests-register-test #f run-id test-name item-path) - ;; (print "Got here! AB") - ;; (mutex-lock! registery-mutex) - (hash-table-set! test-registery (runs:make-full-test-name test-name item-path) 'done) - ;; (mutex-unlock! registery-mutex)) - ;; (conc test-name "/" item-path)))) - ;; (thread-start! th)) - ;; (thread-sleep! *global-delta*) + (let ((th (make-thread (lambda () + (mutex-lock! registery-mutex) + (hash-table-set! test-registery (runs:make-full-test-name test-name item-path) 'start) + (mutex-unlock! registery-mutex) + (cdb:tests-register-test *runremote* run-id test-name item-path) + (mutex-lock! registery-mutex) + (hash-table-set! test-registery (runs:make-full-test-name test-name item-path) 'done) + (mutex-unlock! registery-mutex)) + (conc test-name "/" item-path)))) + (thread-start! th)) + (thread-sleep! *global-delta*) (runs:shrink-can-run-more-tests-delay) (loop (car newtal)(cdr newtal) reruns)) ((not have-resources) ;; simply try again after waiting a second (debug:print-info 1 "no resources to run new tests, waiting ...") ;; (thread-sleep! (+ 2 *global-delta*)) @@ -683,11 +681,11 @@ ;; (set! test-id (open-run-close db:get-test-id db run-id test-name item-path)) (if (not test-id) (begin (debug:print 2 "WARN: Test not pre-created? test-name=" test-name ", item-path=" item-path ", run-id=" run-id) - (cdb:tests-register-test #f run-id test-name item-path) + (cdb:tests-register-test *runremote* run-id test-name item-path) (set! test-id (open-run-close db:get-test-id db run-id test-name item-path)))) (debug:print-info 4 "test-id=" test-id ", run-id=" run-id ", test-name=" test-name ", item-path=\"" item-path "\"") (set! testdat (cdb:get-test-info-by-id *runremote* test-id)))) (set! test-id (db:test-get-id testdat)) (change-directory test-path) ADDED tests/fdktestqa/testqa/runsuite.sh Index: tests/fdktestqa/testqa/runsuite.sh ================================================================== --- /dev/null +++ tests/fdktestqa/testqa/runsuite.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +for i in a b c d e f;do + # g h i j k l m n o p q r s t u v w x y z;do + megatest -runtests % -target a/b :runname $i & +done + +echo "" > num-running.log +while true; do + foo=`megatest -list-runs % | grep RUNNING | wc -l` + echo "Num running: $foo" + echo $foo >> num-running.log +done