Megatest

Check-in [0c7e3bc287]
Login
Overview
Comment:Fixed few things with the hasty implementation of global waitons.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.65
Files: files | file ages | folders
SHA1: 0c7e3bc287b5eed5d25c4b5c6f08c41d2d07ed96
User & Date: mrwellan on 2022-05-13 12:16:07
Other Links: branch diff | manifest | tags
Context
2022-05-13
13:17
Remove global waiton from itself. Leaf check-in: 92c105d9bc user: mrwellan tags: v1.65
12:16
Fixed few things with the hasty implementation of global waitons. check-in: 0c7e3bc287 user: mrwellan tags: v1.65
09:56
Added global-waiton support. Add !GLOBAL_WAITONS test1 test2 ... to your target or default in runconfigs.config. check-in: 7f7aaa214f user: mrwellan tags: v1.65
Changes

Modified runs.scm from [3e09045f9c] to [89f36cc1cb].

684
685
686
687
688
689
690
691

692
693
694
695
696
697
698
684
685
686
687
688
689
690

691
692
693
694
695
696
697
698







-
+







    
    (if (not (null? test-names)) ;; BEGIN test-names loop
	(let loop ((hed (car test-names))   ;; NOTE: This is the main loop that iterates over the test-names
		   (tal (cdr test-names)))         ;; 'return-procs tells the config reader to prep running system but return a proc
          (debug:print-info 4 *default-log-port* "\n\ntestpatt elaboration loop => hed="hed " tal="tal" test-patts="test-patts" test-names="test-names)
	  (change-directory *toppath*) ;; PLEASE OPTIMIZE ME!!! I think this should be a no-op but there are several places where change-directories could be happening.
	  (setenv "MT_TEST_NAME" hed) ;; 
	  (let*-values (((waitons waitors config) (tests:get-waitons hed all-tests-registry (tests:get-global-waitons)))
	  (let*-values (((waitons waitors config) (tests:get-waitons hed all-tests-registry (tests:get-global-waitons *runconfigdat*)))

			;; NOTE: Have the config - can extract [waitons] section
			
                        ((hed-mode)
                         (let ((m (configf:lookup config "requirements" "mode")))
                           (if m (map string->symbol (string-split m)) '(normal))))
                        ((hed-itemized-waiton) ;; are items in hed waiting on items of waiton?

Modified tests.scm from [bc59e95ad2] to [e8a2b4cfe2].

136
137
138
139
140
141
142
143

144
145
146
147
148
149
150
136
137
138
139
140
141
142

143
144
145
146
147
148
149
150







-
+







	   ((string? res) res) ;;; FIX THE ROOT CAUSE HERE ....
	   ((null? res)   #f)
	   ((string? (cdr res)) (cdr res))  ;; it is a pair
	   ((string? (cadr res))(cadr res)) ;; it is a list
	   (else cadr res))))))

(define (tests:get-global-waitons rconfig)
  (let* ((global-waitons (runconfigs-get config "!GLOBAL_WAITONS")))
  (let* ((global-waitons (runconfigs-get rconfig "!GLOBAL_WAITONS")))
    (if (string? global-waitons)
	(string-split global-waitons)
	'())))

;; return items given config
;;
(define (tests:get-items tconfig)
183
184
185
186
187
188
189
190

191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211





212
213
214
215
216
217
218
183
184
185
186
187
188
189

190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209


210
211
212
213
214
215
216
217
218
219
220
221







-
+



















-
-
+
+
+
+
+







		      (begin ;; No config means this is a non-existant test
			(debug:print-error 0 *default-log-port* "non-existent required test \"" test-name "\"")
			(exit 1))))
	   (instr2 (if config
		       (configf:lookup config "requirements" "waitor")
		       "")))
       (debug:print-info 8 *default-log-port* "waitons string is " instr ", waitors string is " instr2)
       (let ((newwaitons-tmp
       (let* ((newwaitons-tmp
	      (string-split (cond
			     ((procedure? instr) ;; here 
			      (let ((res (instr)))
				(debug:print-info 8 *default-log-port* "waiton procedure results in string " res " for test " test-name)
				res))
			     ((string? instr)     instr)
			     (else 
			      ;; NOTE: This is actually the case of *no* waitons! ;; (debug:print-error 0 *default-log-port* "something went wrong in processing waitons for test " test-name)
			      ""))))
	     (newwaitors
	      (string-split (cond
			     ((procedure? instr2)
			      (let ((res (instr2)))
				(debug:print-info 8 *default-log-port* "waitor procedure results in string " res " for test " test-name)
				res))
			     ((string? instr2)     instr2)
			     (else 
			      ;; NOTE: This is actually the case of *no* waitons! ;; (debug:print-error 0 *default-log-port* "something went wrong in processing waitons for test " test-name)
			      ""))))
	     (newwaitons (if global-waitons
			     (append newwaitons-tmp  global-waitons)
	     (newwaitons (if (and (list? global-waitons)
				  (not (null? global-waitons)))
			     (begin
			       (debug:print 0 *default-log-port* "Adding global waitons " global-waitons)
			       (append newwaitons-tmp  global-waitons))
			     newwaitons-tmp)))
	 (values
	  ;; the waitons
	  (filter (lambda (x)
		    (if (hash-table-ref/default all-tests-registry x #f)
			#t
			(begin

Modified tests/simplerun/runconfigs.config from [cd9421e89b] to [1a11813c82].

13
14
15
16
17
18
19

20
21
22
23
13
14
15
16
17
18
19
20
21
22
23
24







+




#     GNU General Public License for more details.
# 
#     You should have received a copy of the GNU General Public License
#     along with Megatest.  If not, see <http://www.gnu.org/licenses/>.

[default]
ALLTESTS see this variable
!GLOBAL_WAITONS test_abc

# Your variables here are grouped by targets [SYSTEM/RELEASE]
[SYSTEM_val/RELEASE_val]
ANOTHERVAR only defined if target is SYSTEM_val/RELEASE_val