Megatest

Check-in [9ecc1c4e98]
Login
Overview
Comment:Fixed bug where subrun would never end due to runwait where the subrun is part of the current run (i.e. it waits forever for itself to end).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.65
Files: files | file ages | folders
SHA1: 9ecc1c4e981d2c92d6e5f3b7fea45c075156e250
User & Date: matt on 2021-10-20 20:31:16
Other Links: branch diff | manifest | tags
Context
2021-10-21
13:15
Updated megatest version to 1.6588 check-in: a853e6c483 user: mmgraham tags: v1.65, v1.6588
2021-10-20
20:31
Fixed bug where subrun would never end due to runwait where the subrun is part of the current run (i.e. it waits forever for itself to end). check-in: 9ecc1c4e98 user: matt tags: v1.65
2021-07-22
14:34
Changed the propagate-exit-code option to be a boolean, under setup check-in: 19393196c4 user: mmgraham tags: v1.65, v1.6587
Changes

Modified ezsteps.scm from [5de5d166c7] to [0c12b39167].

102
103
104
105
106
107
108
109

110
111
112
113
114
115
116
102
103
104
105
106
107
108

109
110
111
112
113
114
115
116







-
+







     (lambda () ;; (process-run "/bin/bash" "-c" "exec ls -l /tmp/foobar > /tmp/delme-more.log 2>&1")
       (let* ((cmd (conc stepcmd " > " stepname ".log 2>&1")) ;; >outfile 2>&1 
	      (pid #f))
	 (let ((proc (lambda ()
		       (set! pid (process-run "/bin/bash" (list "-c" cmd))))))
	   (if subrun
               (begin
                 (debug:print-info 0 *default-log-port* "Running without MT_.* environment variables.")
                 (debug:print-info 0 *default-log-port* "Running "cmd" without MT_.* environment variables.")
                 (common:without-vars proc "^MT_.*"))
	       (proc)))
	 
         (with-output-to-file "Makefile.ezsteps"
           (lambda ()
             (print stepname ".log :")
             (print "\t" cmd)

Modified launch.scm from [231cf28235] to [b0b1044b95].

157
158
159
160
161
162
163
164

165
166
167
168
169
170
171
157
158
159
160
161
162
163

164
165
166
167
168
169
170
171







-
+







	;; 3. fix target
	;; 4. fix runname
	;; 5. fix testpatt or calculate it from contour
	;; 6. launch the run
	;; 7. roll up the run result and or roll up the logpro processed result
	(when (configf:lookup testconfig "subrun" "runwait") ;; we use runwait as the flag that a subrun is requested
            (subrun:initialize-toprun-test testconfig test-run-dir)
	    (let* ((mt-cmd (subrun:launch-cmd test-run-dir)))
	    (let* ((mt-cmd (subrun:launch-cmd test-run-dir (configf:lookup testconfig "subrun" "runwait"))))
              (debug:print-info 0 *default-log-port* "Subrun command is \"" mt-cmd "\"")
              (set! ezsteps #t) ;; set the needed flag
	      (set! ezstepslst
                    (append (or ezstepslst '())
                            (list (list "subrun" (conc "{subrun=true} " mt-cmd)))))))

	;; process the ezsteps

Modified subrun.scm from [bd1952a98c] to [85650ceb7f].

126
127
128
129
130
131
132
133

134
135
136
137
138
139

140
141
142
143
144
145
146
126
127
128
129
130
131
132

133
134
135
136
137
138

139
140
141
142
143
144
145
146







-
+





-
+







      (let* ((action-switches-str
              (conc "-kill-runs" ))
             (kill-result
              (subrun:exec-sub-megatest test-run-dir action-switches-str "kill")))
        kill-result)
      #t))

(define (subrun:launch-cmd test-run-dir #!optional (sub-cmd "-run")) ;; BUG: "-run" should be changed to "-rerun-clean" but current doesn't work
(define (subrun:launch-cmd test-run-dir run-mode #!optional (sub-cmd "-run")) ;; BUG: "-run" should be changed to "-rerun-clean" but current doesn't work
  (if (subrun:subrun-removed? test-run-dir)
      (subrun:unset-subrun-removed test-run-dir))      

  (let* ((log-prefix "run")
         (switches (subrun:selector+log-switches test-run-dir log-prefix))
         (run-wait #t)
         (run-wait (equal? run-mode "yes"))
         (cmd      (conc "megatest " sub-cmd " " switches" "
                         (if run-wait "-run-wait " ""))))
    cmd))


(define (subrun:sanitize-path inpath)
  (let* ((insane-pattern (irregex "[^[a-zA-Z0-9_\\-]")))