Index: db.scm ================================================================== --- db.scm +++ db.scm @@ -997,10 +997,14 @@ "\nstatus: " (db:step-get-status step) "\ntime: " (db:step-get-event_time step)))) ;; (else (vector-set! record 1 (db:step-get-event_time step))) (sort steps (lambda (a b)(< (db:step-get-event_time a)(db:step-get-event_time b))))) res))) + +;;====================================================================== +;; M I S C M A N A G E M E N T I T E M S +;;====================================================================== ;; the new prereqs calculation, looks also at itempath if specified ;; all prereqs must be met: ;; if prereq test with itempath='' is COMPLETED and PASS, WARN, CHECK, or WAIVED then prereq is met ;; if prereq test with itempath=ref-item-path and COMPLETED with PASS, WARN, CHECK, or WAIVED then prereq is met Index: runs.scm ================================================================== --- runs.scm +++ runs.scm @@ -211,10 +211,17 @@ (let loop ((hed (car test-names)) (tal (cdr test-names))) ;; 'return-procs tells the config reader to prep running system but return a proc (let* ((config (tests:get-testconfig hed 'return-procs)) (waitons (string-split (let ((w (config-lookup config "requirements" "waiton"))) (if w w ""))))) + ;; check for hed in waitons => this would be circular, remove it and issue an + ;; error + (if (member hed waitons) + (begin + (debug:print 0 "ERROR: test " hed " has listed itself as a waiton, please correct this!") + (set! waitons (filter (lambda (x)(not (equal? x hed))) waitons)))) + ;; (items (items:get-items-from-config config))) (if (not (hash-table-ref/default test-records hed #f)) (hash-table-set! test-records hed (vector hed ;; 0 config ;; 1 @@ -291,15 +298,24 @@ '("PASS" "WARN" "CHECK" "WAIVED"))))) prereqs-not-met)))) (debug:print 6 "itemdat: " itemdat "\n items: " items - "\n item-path: " item-path) + "\n item-path: " item-path + "\n waitons: " waitons) + + ;; check for hed in waitons => this would be circular, remove it and issue an + ;; error + (if (member hed waitons) + (begin + (debug:print 0 "ERROR: test " hed " has listed itself as a waiton, please correct this!") + (set! waiton (filter (lambda (x)(not (equal? x hed))) waitons)))) + (cond ((not items) ;; when false the test is ok to be handed off to launch (but not before) (let* ((have-resources (runs:can-run-more-tests db test-record)) ;; look at the test jobgroup and tot jobs running - (prereqs-not-met (db:get-prereqs-not-met db run-id waitons item-path)) + (prereqs-not-met (db:get-prereqs-not-met db run-id waitons item-path mode: (config-lookup tconfig "requirements" "testmode"))) (fails (calc-fails prereqs-not-met))) (debug:print 8 "INFO: have-resources: " have-resources " prereqs-not-met: " prereqs-not-met " fails: " fails) ;; Don't know at this time if the test have been launched at some time in the past ;; i.e. is this a re-launch? (cond @@ -365,11 +381,11 @@ ;; if items is a proc then need to run items:get-items-from-config, get the list and loop ;; - but only do that if resources exist to kick off the job ((or (procedure? items)(eq? items 'have-procedure)) (let* ((can-run-more (runs:can-run-more-tests db test-record)) - (prereqs-not-met (db:get-prereqs-not-met db run-id waitons item-path)) + (prereqs-not-met (db:get-prereqs-not-met db run-id waitons item-path mode: (config-lookup tconfig "requirements" "testmode"))) (fails (calc-fails prereqs-not-met))) (debug:print 8 "INFO: can-run-more: " can-run-more " prereqs-not-met:\n " (intersperse prereqs-not-met "\n") " fails:\n " (intersperse fails "\n")) (cond ADDED tests/fullrun/tests/all_toplevel/testconfig Index: tests/fullrun/tests/all_toplevel/testconfig ================================================================== --- /dev/null +++ tests/fullrun/tests/all_toplevel/testconfig @@ -0,0 +1,7 @@ +[ezsteps] +calcresults megatest -list-runs $MT_RUNNAME -target $MT_TARGET + +[requirements] +waiton all_toplevel exit_0 exit_1 ez_exit2_fail ez_fail ez_pass ezlog_fail ezlog_fail_then_pass ezlog_pass ezlog_warn lineitem_fail lineitem_pass logpro_required_fail manual_example neverrun priority_1 priority_10 priority_10_waiton_1 priority_2 priority_3 priority_4 priority_5 priority_6 priority_7 priority_8 priority_9 runfirst singletest singletest2 sqlitespeed test_mt_vars +# This is a "toplevel" test, it does not require waitons to be non-FAIL to run +mode toplevel