Megatest

Check-in [b2ea6646eb]
Login
Overview
Comment:Added subrun launch dashboard button support using testconfig.subrun
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.65
Files: files | file ages | folders
SHA1: b2ea6646eb94c43ebcbb98463157dcd38c1eac50
User & Date: matt on 2017-11-13 21:45:55
Other Links: branch diff | manifest | tags
Context
2017-11-16
10:24
Hide messages in communications that will likely go away when the communications recovers check-in: 5fe44e9393 user: mrwellan tags: v1.65
2017-11-13
21:45
Added subrun launch dashboard button support using testconfig.subrun check-in: b2ea6646eb user: matt tags: v1.65
2017-11-12
22:50
Create the .testconfig files - so often needed for debug. However create them at the time the test starts to execute so that it is clear that all needed vars are available. check-in: 52d24fd4b2 user: matt tags: v1.65
Changes

Modified dashboard-tests.scm from [732cc4e623] to [c114ec0352].

241
242
243
244
245
246
247





248

249
250
251
252
253
254
255
			 (lambda (testdat) ;; (sdb:qry 'getstr 
			   (db:test-get-uname testdat))) ;; )
	    )))))

;; if there is a submegatest create a button to launch dashboard in that area
;;
(define (submegatest-panel dbstruct keydat testdat runname testconfig)





  (let* ((subarea (configf:lookup testconfig "setup" "submegatest"))

	 (area-exists (and subarea (common:file-exists? subarea))))
    ;; (debug:print-info 0 *default-log-port* "Megatest subarea=" subarea ", area-exists=" area-exists)
    (if subarea
	(iup:frame 
	 #:title "Megatest Run Info" ; #:expand "YES"
	 (iup:button
	  "Launch Dashboard"







>
>
>
>
>
|
>







241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
			 (lambda (testdat) ;; (sdb:qry 'getstr 
			   (db:test-get-uname testdat))) ;; )
	    )))))

;; if there is a submegatest create a button to launch dashboard in that area
;;
(define (submegatest-panel dbstruct keydat testdat runname testconfig)
  (let* ((test-run-dir      (db:test-get-rundir testdat))
	 (subrun-tconf-file (conc test-run-dir "/testconfig.subrun"))
	 (subrun-tconf      (if (file-exists? subrun-tconf-file)
				(configf:read-alist subrun-tconf-file)
				(make-hash-table)))
	 (subarea           (or (configf:lookup testconfig "setup" "submegatest")
				(configf:lookup subrun-tconf "subrun" "runarea")))
	 (area-exists (and subarea (common:file-exists? subarea))))
    ;; (debug:print-info 0 *default-log-port* "Megatest subarea=" subarea ", area-exists=" area-exists)
    (if subarea
	(iup:frame 
	 #:title "Megatest Run Info" ; #:expand "YES"
	 (iup:button
	  "Launch Dashboard"

Modified launch.scm from [31b2766204] to [13e1eee06d].

319
320
321
322
323
324
325
326





327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
	;; 2. unset MT_* vars
	;; 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
	(if (configf:lookup testconfig "subrun" "runwait") ;; we use runwait as the flag that a subrun is requested
	    (let* ((runarea   (configf:lookup testconfig "subrun" "runarea"))





		   (passfail  (configf:lookup testconfig "subrun" "passfail"))
		   (target    (configf:lookup testconfig "subrun" "target"))
		   (runname   (configf:lookup testconfig "subrun" "runname"))
		   (contour   (configf:lookup testconfig "subrun" "contour"))
		   (testpatt  (configf:lookup testconfig "subrun" "testpatt"))
		   (mode-patt (configf:lookup testconfig "subrun" "mode-patt"))
		   (tag-expr  (configf:lookup testconfig "subrun" "tag-expr"))
		   (run-wait  (configf:lookup testconfig "subrun" "runwait"))
		   (logpro    (configf:lookup testconfig "subrun" "logpro"))
		   (compact-stem (string-substitute "[/*]" "_" (conc target "-" runname "-" (or testpatt mode-patt tag-expr))))
		   (log-file (conc compact-stem ".log"))
		   (mt-cmd    (conc "megatest -run -target " target
				    " -runname " (or runname (get-environment-variable "MT_RUNNAME"))
				    (conc " -start-dir " (if runarea runarea *toppath*))
				    (if testpatt  (conc " -testpatt " testpatt)  "")
				    (if mode-patt (conc " -modepatt " mode-patt) "")
				    (if tag-expr  (conc " -tag-expr"  tag-expr)  "")
				    (if (equal? run-wait "yes") " -run-wait " "")
				    " -log " log-file)))
	      ;; change directory to runarea, create it if needed, we do NOT create the directory 
	;; (if runarea







|
>
>
>
>
>

|
|









|
|







319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
	;; 2. unset MT_* vars
	;; 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
	(if (configf:lookup testconfig "subrun" "runwait") ;; we use runwait as the flag that a subrun is requested
	    (let* ((runarea   (let ((ra (configf:lookup testconfig "subrun" "runarea")))
				(if ra      ;; when runarea is not set we default to *toppath*. However 
				    ra      ;; we need to force the setting in the testconfig so it will
				    (begin  ;; be preserved in the testconfig.subrun file
				      (configf:set-section-var testconfig "subrun" "runarea" *toppath*)
				      *toppath*))))
		   (passfail  (configf:lookup testconfig "subrun" "passfail"))
		   (target    (or (configf:lookup testconfig "subrun" "target") (get-environment-variable "MT_TARGET")))
		   (runname   (or (configf:lookup testconfig "subrun" "runname")(get-environment-variable "MT_RUNNAME")))
		   (contour   (configf:lookup testconfig "subrun" "contour"))
		   (testpatt  (configf:lookup testconfig "subrun" "testpatt"))
		   (mode-patt (configf:lookup testconfig "subrun" "mode-patt"))
		   (tag-expr  (configf:lookup testconfig "subrun" "tag-expr"))
		   (run-wait  (configf:lookup testconfig "subrun" "runwait"))
		   (logpro    (configf:lookup testconfig "subrun" "logpro"))
		   (compact-stem (string-substitute "[/*]" "_" (conc target "-" runname "-" (or testpatt mode-patt tag-expr))))
		   (log-file (conc compact-stem ".log"))
		   (mt-cmd    (conc "megatest -run -target " target
				    " -runname " runname
				    (conc " -start-dir " runarea) ;; (if runarea runarea *toppath*))
				    (if testpatt  (conc " -testpatt " testpatt)  "")
				    (if mode-patt (conc " -modepatt " mode-patt) "")
				    (if tag-expr  (conc " -tag-expr"  tag-expr)  "")
				    (if (equal? run-wait "yes") " -run-wait " "")
				    " -log " log-file)))
	      ;; change directory to runarea, create it if needed, we do NOT create the directory 
	;; (if runarea