Index: dashboard-tests.scm ================================================================== --- dashboard-tests.scm +++ dashboard-tests.scm @@ -247,11 +247,15 @@ ;;====================================================================== ;; ;;====================================================================== (define (examine-test db test-id) ;; run-id run-key origtest) - (let* ((testdat (rdb:get-test-data-by-id db test-id))) + (let* ((testdat (rdb:get-test-data-by-id db test-id)) + (db-path (conc *toppath* "/megatest.db")) + (db-mod-time (file-modification-time db-path)) + (last-update (current-seconds)) + (request-update #f)) (if (not testdat) (begin (debug:print 0 "ERROR: No test data found for test " test-id ", exiting") (exit 1)) (let* ((run-id (if testdat (db:test-get-run_id testdat) #f)) @@ -289,23 +293,24 @@ ""))) (system (conc "cd " rundir ";xterm -T \"" (string-translate testfullname "()" " ") "\" " shell "&"))) (message-window (conc "Directory " rundir " not found"))))) (refreshdat (lambda () - (let ((newtestdat (rdb:get-test-data-by-id db test-id))) - (if newtestdat - (begin - ;(mutex-lock! mx1) - (set! testdat newtestdat) - (set! teststeps (rdb:get-steps-for-test db test-id)) - (set! logfile (conc (db:test-get-rundir testdat) "/" (db:test-get-final_logf testdat))) - (set! rundir (db:test-get-rundir testdat)) - (set! testfullname (db:test-get-fullname testdat)) - ;(mutex-unlock! mx1) - ) - (begin - (db:test-set-testname! testdat "DEAD OR DELETED TEST")))))) + (let* ((curr-mod-time (file-modification-time db-path)) + (need-update (or (and (> curr-mod-time db-mod-time) + (> (current-seconds) (+ last-update 2))) ;; every two seconds if db touched + request-update)) + (newtestdat (if need-update (rdb:get-test-data-by-id db test-id)))) + (cond + ((and need-update newtestdat) + (set! testdat newtestdat) + (set! teststeps (rdb:get-steps-for-test db test-id)) + (set! logfile (conc (db:test-get-rundir testdat) "/" (db:test-get-final_logf testdat))) + (set! rundir (db:test-get-rundir testdat)) + (set! testfullname (db:test-get-fullname testdat))) + (need-update ;; if this was true and yet there is no data .... + (db:test-set-testname! testdat "DEAD OR DELETED TEST")))))) (widgets (make-hash-table)) (meta-widgets (make-hash-table)) (self #f) (store-label (lambda (name lbl cmd) (hash-table-set! widgets name Index: tests/megatest.config ================================================================== --- tests/megatest.config +++ tests/megatest.config @@ -3,11 +3,11 @@ fsname TEXT datapath TEXT [setup] # exectutable /path/to/megatest -max_concurrent_jobs 50 +max_concurrent_jobs 200 linktree /tmp/mt_links [jobtools] # useshell yes # ## launcher launches jobs, the job is managed on the target host Index: tests/tests/exit_0/main.sh ================================================================== --- tests/tests/exit_0/main.sh +++ tests/tests/exit_0/main.sh @@ -1,3 +1,10 @@ #!/bin/bash + +# a bunch of steps in 2 second increments +for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17;do + $MT_MEGATEST -step step$i :state start :status running -setlog results$i.html + sleep 2 + $MT_MEGATEST -step step$i :state end :status 0 +done exit 0 Index: tests/tests/exit_1/main.sh ================================================================== --- tests/tests/exit_1/main.sh +++ tests/tests/exit_1/main.sh @@ -1,3 +1,10 @@ #!/bin/bash + +# a bunch of steps in 2 second increments +for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17;do + $MT_MEGATEST -step step$i :state start :status running -setlog results$i.html + sleep 2 + $MT_MEGATEST -step step$i :state end :status 0 +done exit 1 Index: tests/tests/ezlog_fail_then_pass/main.sh ================================================================== --- tests/tests/ezlog_fail_then_pass/main.sh +++ tests/tests/ezlog_fail_then_pass/main.sh @@ -5,7 +5,14 @@ megatest -step yepstep :state end :status $? megatest -load-test-data << EOF OPER,du, 1.2, 1.2, < , GBytes ,System didn't use too much space EOF + +# a bunch of steps in 2 second increments +for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17;do + $MT_MEGATEST -step step$i :state start :status running -setlog results$i.html + sleep 2 + $MT_MEGATEST -step step$i :state end :status 0 +done megatest -test-status :state COMPLETED :status AUTO Index: tests/tests/lineitem_fail/main.sh ================================================================== --- tests/tests/lineitem_fail/main.sh +++ tests/tests/lineitem_fail/main.sh @@ -8,9 +8,16 @@ foo,alb, 1.2, 1.2, <= , Amps,This is the high power circuit test foo,abl, 1.2, 1.3, 0.1 foo,bra, 1.2, pass, silly stuff faz,bar, 10, 8mA, , ,"this is a comment" EOF + +# a bunch of steps in 2 second increments +for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17;do + $MT_MEGATEST -step step$i :state start :status running -setlog results$i.html + sleep 2 + $MT_MEGATEST -step step$i :state end :status 0 +done # Needed to force rolling up the results and set the test to COMPLETED $MT_MEGATEST -test-status :state COMPLETED :status AUTO Index: tests/tests/priority_1/main.sh ================================================================== --- tests/tests/priority_1/main.sh +++ tests/tests/priority_1/main.sh @@ -1,3 +1,10 @@ #!/bin/bash + +# a bunch of steps in 2 second increments +for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17;do + $MT_MEGATEST -step step$i :state start :status running -setlog results$i.html + sleep 2 + $MT_MEGATEST -step step$i :state end :status 0 +done exit 0 Index: tests/tests/priority_10/main.sh ================================================================== --- tests/tests/priority_10/main.sh +++ tests/tests/priority_10/main.sh @@ -1,3 +1,10 @@ #!/bin/bash + +# a bunch of steps in 2 second increments +for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17;do + $MT_MEGATEST -step step$i :state start :status running -setlog results$i.html + sleep 2 + $MT_MEGATEST -step step$i :state end :status 0 +done exit 0 Index: tests/tests/priority_10_waiton_1/main.sh ================================================================== --- tests/tests/priority_10_waiton_1/main.sh +++ tests/tests/priority_10_waiton_1/main.sh @@ -1,3 +1,10 @@ #!/bin/bash + +# a bunch of steps in 2 second increments +for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17;do + $MT_MEGATEST -step step$i :state start :status running -setlog results$i.html + sleep 2 + $MT_MEGATEST -step step$i :state end :status 0 +done exit 0 Index: tests/tests/priority_2/main.sh ================================================================== --- tests/tests/priority_2/main.sh +++ tests/tests/priority_2/main.sh @@ -1,3 +1,10 @@ #!/bin/bash + +# a bunch of steps in 2 second increments +for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17;do + $MT_MEGATEST -step step$i :state start :status running -setlog results$i.html + sleep 2 + $MT_MEGATEST -step step$i :state end :status 0 +done exit 0 Index: tests/tests/priority_3/main.sh ================================================================== --- tests/tests/priority_3/main.sh +++ tests/tests/priority_3/main.sh @@ -1,3 +1,10 @@ #!/bin/bash + +# a bunch of steps in 2 second increments +for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17;do + $MT_MEGATEST -step step$i :state start :status running -setlog results$i.html + sleep 2 + $MT_MEGATEST -step step$i :state end :status 0 +done exit 0 Index: tests/tests/priority_4/main.sh ================================================================== --- tests/tests/priority_4/main.sh +++ tests/tests/priority_4/main.sh @@ -1,3 +1,10 @@ #!/bin/bash + +# a bunch of steps in 2 second increments +for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17;do + $MT_MEGATEST -step step$i :state start :status running -setlog results$i.html + sleep 2 + $MT_MEGATEST -step step$i :state end :status 0 +done exit 0 Index: tests/tests/priority_5/main.sh ================================================================== --- tests/tests/priority_5/main.sh +++ tests/tests/priority_5/main.sh @@ -1,3 +1,10 @@ #!/bin/bash + +# a bunch of steps in 2 second increments +for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17;do + $MT_MEGATEST -step step$i :state start :status running -setlog results$i.html + sleep 2 + $MT_MEGATEST -step step$i :state end :status 0 +done exit 0 Index: tests/tests/priority_6/main.sh ================================================================== --- tests/tests/priority_6/main.sh +++ tests/tests/priority_6/main.sh @@ -1,3 +1,10 @@ #!/bin/bash + +# a bunch of steps in 2 second increments +for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17;do + $MT_MEGATEST -step step$i :state start :status running -setlog results$i.html + sleep 2 + $MT_MEGATEST -step step$i :state end :status 0 +done exit 0 Index: tests/tests/priority_7/main.sh ================================================================== --- tests/tests/priority_7/main.sh +++ tests/tests/priority_7/main.sh @@ -1,3 +1,10 @@ #!/bin/bash + +# a bunch of steps in 2 second increments +for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17;do + $MT_MEGATEST -step step$i :state start :status running -setlog results$i.html + sleep 2 + $MT_MEGATEST -step step$i :state end :status 0 +done exit 0 Index: tests/tests/priority_8/main.sh ================================================================== --- tests/tests/priority_8/main.sh +++ tests/tests/priority_8/main.sh @@ -1,3 +1,10 @@ #!/bin/bash + +# a bunch of steps in 2 second increments +for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17;do + $MT_MEGATEST -step step$i :state start :status running -setlog results$i.html + sleep 2 + $MT_MEGATEST -step step$i :state end :status 0 +done exit 0 Index: tests/tests/priority_9/main.sh ================================================================== --- tests/tests/priority_9/main.sh +++ tests/tests/priority_9/main.sh @@ -1,3 +1,10 @@ #!/bin/bash + +# a bunch of steps in 2 second increments +for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17;do + $MT_MEGATEST -step step$i :state start :status running -setlog results$i.html + sleep 2 + $MT_MEGATEST -step step$i :state end :status 0 +done exit 0