Megatest

Diff
Login

Differences From Artifact [b9a38f6eac]:

To Artifact [cba943d803]:


36
37
38
39
40
41
42

43
44
45
46
47
48
49

50
51
52
53
54
55
56


;;(rmt:get-test-info-by-id run-id test-id) -> testdat



(define (ezsteps:run-from testdat start-step-name run-one)

  (let* ((test-run-dir  ;; (filedb:get-path *fdb* 
	  (db:test-get-rundir testdat)) ;; )
	 (testconfig    (read-config (conc test-run-dir "/testconfig") #f #t environ-patt: "pre-launch-env-vars"))
	 (ezstepslst    (hash-table-ref/default testconfig "ezsteps" '()))
	 (run-mutex     (make-mutex))
	 (rollup-status 0)
         (rollup-status-string #f)

	 (exit-info     (vector #t #t #t))
	 (test-id       (db:test-get-id testdat))
	 (run-id        (db:test-get-run_id testdat))
	 (test-name     (db:test-get-testname testdat))
	 (kill-job      #f)) ;; for future use (on re-factoring with launch.scm code

    ;; keep trying till NFS deigns to populate test run dir on this host







>







>







36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58


;;(rmt:get-test-info-by-id run-id test-id) -> testdat



(define (ezsteps:run-from testdat start-step-name run-one)
  ;;# TODO - recapture item variables, debug repeated step eval
  (let* ((test-run-dir  ;; (filedb:get-path *fdb* 
	  (db:test-get-rundir testdat)) ;; )
	 (testconfig    (read-config (conc test-run-dir "/testconfig") #f #t environ-patt: "pre-launch-env-vars"))
	 (ezstepslst    (hash-table-ref/default testconfig "ezsteps" '()))
	 (run-mutex     (make-mutex))
	 (rollup-status 0)
         (rollup-status-string #f)
         (rollup-status-sym #f)
	 (exit-info     (vector #t #t #t))
	 (test-id       (db:test-get-id testdat))
	 (run-id        (db:test-get-run_id testdat))
	 (test-name     (db:test-get-testname testdat))
	 (kill-job      #f)) ;; for future use (on re-factoring with launch.scm code

    ;; keep trying till NFS deigns to populate test run dir on this host
140
141
142
143
144
145
146

147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
                                                    'fail)))
			   (overall-status-sym    (common:worse-status-sym this-step-status status-sym-so-far))
                           (overall-status-string (status-sym->string overall-status-sym)))
		      (debug:print 4 *default-log-port* "Exit value received: " (vector-ref exit-info 2) " logpro-used: " logpro-used 
				   " this-step-status: " this-step-status " overall-status: " overall-status-sym) 
		      ;;" next-status: " next-status " rollup-status: " rollup-status)
                      (set! rollup-status-string overall-status-string)

                      (tests:test-set-status! run-id test-id "RUNNING" overall-status-string #f #f)))

                  (if (and
                       (not run-one)
                       (common:steps-can-proceed-given-status-sym overall-status-sym)
                       (not (null? tal)))
                      (loop (car tal)
                            (cdr tal)
                            overall-status-sym
                            stepname
                            ;; #f
                            saw-start-step-name-next)))
                  
		  ;; (if (and (steprun-good? logpro-used (vector-ref exit-info 2))
		  ;;          (not (null? tal)))
		  ;;     (if (not run-one) ;; if we got here we completed the step, if run-one is true, stop







>




|



|







142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
                                                    'fail)))
			   (overall-status-sym    (common:worse-status-sym this-step-status status-sym-so-far))
                           (overall-status-string (status-sym->string overall-status-sym)))
		      (debug:print 4 *default-log-port* "Exit value received: " (vector-ref exit-info 2) " logpro-used: " logpro-used 
				   " this-step-status: " this-step-status " overall-status: " overall-status-sym) 
		      ;;" next-status: " next-status " rollup-status: " rollup-status)
                      (set! rollup-status-string overall-status-string)
                      (set! rollup-status-sym overall-status-sym)
                      (tests:test-set-status! run-id test-id "RUNNING" overall-status-string #f #f)))

                  (if (and
                       (not run-one)
                       (common:steps-can-proceed-given-status-sym rollup-status-sym)
                       (not (null? tal)))
                      (loop (car tal)
                            (cdr tal)
                            rollup-status-sym
                            stepname
                            ;; #f
                            saw-start-step-name-next)))
                  
		  ;; (if (and (steprun-good? logpro-used (vector-ref exit-info 2))
		  ;;          (not (null? tal)))
		  ;;     (if (not run-one) ;; if we got here we completed the step, if run-one is true, stop