Megatest

Check-in [82ac8eea27]
Login
Overview
Comment:Partial implementation of runarun
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.65-runarun
Files: files | file ages | folders
SHA1: 82ac8eea27f64fee4a035c2e45a36cef97e96b9e
User & Date: matt on 2017-10-01 09:36:29
Other Links: branch diff | manifest | tags
Context
2017-10-01
22:40
Basics of runarun in place. check-in: a71e658279 user: matt tags: v1.65-runarun
09:36
Partial implementation of runarun check-in: 82ac8eea27 user: matt tags: v1.65-runarun
09:36
Partial implementation of runarun check-in: 5e8bccaf06 user: matt tags: v1.65-runarun
Changes

Modified launch.scm from [0b13bf104d] to [037e58c0ec].

78
79
80
81
82
83
84
85


86
87
88
89
90
91
92
78
79
80
81
82
83
84

85
86
87
88
89
90
91
92
93







-
+
+







	   (else #f)))
	#f)))

(define (launch:runstep ezstep run-id test-id exit-info m tal testconfig)
  (let* ((stepname       (car ezstep))  ;; do stuff to run the step
	 (stepinfo       (cadr ezstep))
	 (stepparts      (string-match (regexp "^(\\{([^\\}]*)\\}\\s*|)(.*)$") stepinfo))
	 (stepparms      (list-ref stepparts 2)) ;; for future use, {VAR=1,2,3}, run step for each 
	 (stepparms      (list-ref stepparts 2)) ;; for future use, {VAR=1,2,3}, run step for each
	 (paramparts     (string-split 
	 (stepcmd        (list-ref stepparts 3))
	 (script         "") ; "#!/bin/bash\n") ;; yep, we depend on bin/bash FIXME!!!\
	 (logpro-file    (conc stepname ".logpro"))
	 (html-file      (conc stepname ".html"))
	 (dat-file       (conc stepname ".dat"))
	 (tconfig-logpro (configf:lookup testconfig "logpro" stepname))
	 (logpro-used    (common:file-exists? logpro-file)))
331
332
333
334
335
336
337


338
339
340
341
342


343
344
345
346
347
348
349
350
351
352
353
354




355
356
357
358
359
360
361
332
333
334
335
336
337
338
339
340
341
342
343
344

345
346
347
348
349
350
351
352
353
354
355
356


357
358
359
360
361
362
363
364
365
366
367







+
+




-
+
+










-
-
+
+
+
+







	       (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"))
	       (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
				(if testpatt  (conc " -testpatt " testpatt)  "")
				(if mode-patt (conc " -modepatt " mode-patt) "")
				(if tag-expr  (conc " -tag-expr"  tag-expr)  ""))))
				(if tag-expr  (conc " -tag-expr"  tag-expr)  "")
				" -log " log-file)))
	  ;; change directory to runarea, create it if needed, we do NOT create the directory 
	  (if runarea
	      (if (directory-exists? runarea)
		  (change-directory runarea)
		  (begin
		    (debug:print 0 *default-log-port* "ERROR: for sub-megatest run the runarea \"" runarea "\" does not exist! EXITING.")
		    (exit 1)))
	      (let ((subrun (conc *toppath* "/subrun") #t))
		(create-directory subrun)
		(change-directory subrun)))
	  ;; by this point we are in the right place to run the subrun
	  
	  ;; by this point we are in the right place to run the subrun and we have a Megatest command to run
	  ;; (filter (lambda (x)(string-match "MT_.*" (car x))) (get-environment-variables))
	  (common:without-vars mt-cmd "^MT_.*")

	)))

(define (launch:monitor-job run-id test-id item-path fullrunscript ezsteps test-name tconfigreg exit-info m work-area runtlim misc-flags)
  (let* ((update-period (string->number (or (configf:lookup *configdat* "setup" "test-stats-update-period") "30")))
         (start-seconds (current-seconds))
	 (calc-minutes  (lambda ()
			  (inexact->exact