Index: db.scm ================================================================== --- db.scm +++ db.scm @@ -404,12 +404,11 @@ (for-each (lambda (test) (if (equal? waitontest-name (db:test-get-testname test)) (begin (set! ever-seen #t) (if (not (and (equal? (db:test-get-state test) "COMPLETED") - (or (equal? (db:test-get-status test) "PASS") - (equal? (db:test-get-status test) "WARN")))) + (member (db:test-get-status test) '("PASS" "WARN" "CHECK")))) (set! result (cons waitontest-name result)))))) tests) (if (not ever-seen)(set! result (cons waitontest-name result))))) waiton) (delete-duplicates result)))) Index: docs/megatest.html ================================================================== --- docs/megatest.html +++ docs/megatest.html @@ -2,11 +2,11 @@ - + Megatest
@@ -1362,10 +1362,10 @@
Index: runs.scm ================================================================== --- runs.scm +++ runs.scm @@ -355,11 +355,12 @@ #f))))) (define (run-tests db test-names) (let* ((keys (db-get-keys db)) (keyvallst (keys->vallist keys #t)) - (run-id (register-run db keys))) ;; test-name))) + (run-id (register-run db keys)) ;; test-name))) + (deferred '())) ;; delay running these since they have a waiton clause ;; on the first pass or call to run-tests set FAILS to NOT_STARTED if ;; -keepgoing is specified (if (and (eq? *passnum* 0) (args:get-arg "-keepgoing")) (begin @@ -510,11 +511,13 @@ (db-get-prereqs-not-met db run-id waiton))) ;; check before running .... (launch-cmd (lambda () (launch-test db run-id test-conf keyvallst test-name test-path itemdat))) (testrundat (list get-prereqs-cmd launch-cmd))) (if (or (args:get-arg "-force") - (null? ((car testrundat)))) ;; are there any tests that must be run before this one... + (let ((preqs-not-yet-met ((car testrundat)))) + (debug:print 2 "Preqrequesites for " test-name ": " preqs-not-yet-met) + (null? preqs-not-yet-met))) ;; are there any tests that must be run before this one... (if (not ((cadr testrundat))) ;; this is the line that launches the test to the remote host (begin (print "ERROR: Failed to launch the test. Exiting as soon as possible") (set! *globalexitstatus* 1) ;; (process-signal (current-process-id) signal/kill) Index: tests/Makefile ================================================================== --- tests/Makefile +++ tests/Makefile @@ -14,9 +14,9 @@ dashboard : cd ../;make dashboard ../dashboard & remove : - (cd ../;make);../megatest -remove-runs :runname %3 -testpatt % -itempatt % :sysname % :fsname % :datapath % + (cd ../;make);../megatest -remove-runs :runname $(RUN) -testpatt % -itempatt % :sysname % :fsname % :datapath % runforever : while(ls); do runname=`date +%F-%R:%S`;/home/matt/data/megatest/megatest -runall :sysname ubuntu :fsname nfs :datapath none :runname $$runname;/home/matt/data/megatest/megatest -runall :sysname ubuntu :fsname nfs :datapath none :runname $$runname;/home/matt/data/megatest/megatest -runall :sysname ubuntu :fsname nfs :datapath none :runname $$runname;done Index: tests/tests/runfirst/main.sh ================================================================== --- tests/tests/runfirst/main.sh +++ tests/tests/runfirst/main.sh @@ -1,9 +1,11 @@ #!/bin/bash # megatest -step wasting_time :state start :status n/a -m "This is a test step comment" # sleep 20 # megatest -step wasting_time :state end :status $? + +touch ../I_was_here $MT_MEGATEST -runstep wasting_time -logpro wasting_time.logpro "sleep 8;echo all done eh?" -m "This is a test step comment" $MT_MEGATEST -test-status :state COMPLETED :status $? -m "This is a test level comment" -set-toplog the_top_log.html Index: tests/tests/sqlitespeed/runscript.rb ================================================================== --- tests/tests/sqlitespeed/runscript.rb +++ tests/tests/sqlitespeed/runscript.rb @@ -2,10 +2,16 @@ require "#{ENV['MT_RUN_AREA_HOME']}/supportfiles/ruby/librunscript.rb" # run_record(stepname, cmd) - will record in db if exit code of script was zero or not run_and_record('create db',"sqlite3 testing.db << EOF\ncreate table if not exists blah(id INTEGER PRIMARY KEY,name TEXT);\n.q\nEOF","") + +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 # file_size_checker(stepname, filename, minsize, maxsize) - negative means ignore # file_size_checker('create db','testing.db',100,-1) num_records=rand(5) # 0000