Megatest

Changes On Branch v1.60-itempatt-itemmap
Login

Changes In Branch v1.60-itempatt-itemmap Excluding Merge-Ins

This is equivalent to a diff from 7895c3fddf to 13f20f1286

2015-07-30
00:54
Merged in itemmap fixes check-in: 2b8ac70e49 user: mrwellan tags: v1.60
00:53
Got dep-test itemmaps in the correct testconfigs, fixed ordering of added itempatts Closed-Leaf check-in: 13f20f1286 user: matt tags: v1.60-itempatt-itemmap
2015-07-29
23:57
dep test tweak check-in: 45bb26b72a user: mrwellan tags: v1.60
23:50
Fixed dep handling check-in: e150631c4b user: matt tags: v1.60-itempatt-itemmap
01:28
Attempted mechanism to propagate itempatt with an itemmap check-in: ffb9b4f85a user: matt tags: v1.60-itempatt-itemmap
2015-07-28
13:54
Missed a change to reference % for run killing check-in: 7895c3fddf user: mrwellan tags: v1.60
13:44
Kill runner processes when clean is called and the testpatt is an exact match check-in: 9808763d4b user: mrwellan tags: v1.60

Modified db.scm from [753e9325a7] to [fe4d7434d3].

3271
3272
3273
3274
3275
3276
3277














3278
3279
3280
3281
3282
3283
3284
	     (replacement (if (> (length mapparts) 1) (cadr mapparts) "")))
	(if replacement
	    (equal? (string-substitute pattern replacement patha)
		    (string-substitute pattern replacement pathb))
	    (equal? (string-substitute pattern "" patha)
		    (string-substitute pattern "" pathb))))
      (equal? patha pathb)))















;; the new prereqs calculation, looks also at itempath if specified
;; all prereqs must be met:
;;    if prereq test with itempath='' is COMPLETED and PASS, WARN, CHECK, or WAIVED then prereq is met
;;    if prereq test with itempath=ref-item-path and COMPLETED with PASS, WARN, CHECK, or WAIVED then prereq is met
;;
;; Note: mode 'normal means that tests must be COMPLETED and ok (i.e. PASS, WARN, CHECK, SKIP or WAIVED)







>
>
>
>
>
>
>
>
>
>
>
>
>
>







3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
	     (replacement (if (> (length mapparts) 1) (cadr mapparts) "")))
	(if replacement
	    (equal? (string-substitute pattern replacement patha)
		    (string-substitute pattern replacement pathb))
	    (equal? (string-substitute pattern "" patha)
		    (string-substitute pattern "" pathb))))
      (equal? patha pathb)))

;; A routine to convert test/itempath using a itemmap
(define (db:convert-test-itempath path-in itemmap)
  (debug:print-info 6 "ITEMMAP is " itemmap)
  (let* ((mapparts    (string-split itemmap))
	 (pattern     (car mapparts))
	 (replacement (if (> (length mapparts) 1) (cadr mapparts) ""))
	 (path-parts  (string-split path-in "/"))
	 (test-name   (car path-parts))
	 (item-path   (string-intersperse (cdr path-parts) "/")))
    (conc test-name "/" 
	  (if replacement
	      (string-substitute pattern replacement item-path)
	      (string-substitute pattern "" path-in)))))

;; the new prereqs calculation, looks also at itempath if specified
;; all prereqs must be met:
;;    if prereq test with itempath='' is COMPLETED and PASS, WARN, CHECK, or WAIVED then prereq is met
;;    if prereq test with itempath=ref-item-path and COMPLETED with PASS, WARN, CHECK, or WAIVED then prereq is met
;;
;; Note: mode 'normal means that tests must be COMPLETED and ok (i.e. PASS, WARN, CHECK, SKIP or WAIVED)

Modified multi-dboard.scm from [aa5e3f008b] to [e9e822b1ad].

771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
		     0                 ;; current tab id
		     #f                ;; redraw needed for current tab id
		     (make-hash-table) ;; tab-id -> areaname
		     )))
    (hash-table-set! *windows* window-id data)
    (iup:show (dashboard:main-panel data window-id))
    (iup:main-loop)))



;; ease debugging by loading ~/.dashboardrc
(let ((debugcontrolf (conc (get-environment-variable "HOME") "/.dashboardrc")))
  (if (file-exists? debugcontrolf)
      (load debugcontrolf)))

(define (main)







<
<







771
772
773
774
775
776
777


778
779
780
781
782
783
784
		     0                 ;; current tab id
		     #f                ;; redraw needed for current tab id
		     (make-hash-table) ;; tab-id -> areaname
		     )))
    (hash-table-set! *windows* window-id data)
    (iup:show (dashboard:main-panel data window-id))
    (iup:main-loop)))



;; ease debugging by loading ~/.dashboardrc
(let ((debugcontrolf (conc (get-environment-variable "HOME") "/.dashboardrc")))
  (if (file-exists? debugcontrolf)
      (load debugcontrolf)))

(define (main)

Modified runs.scm from [afa07ed136] to [b24323548a].

392
393
394
395
396
397
398
399
400
401
402
403
404


405
406
407
408
409
410
411
						(else #f)))                           ;; not iterated
					     #f      ;; itemsdat 5
					     #f      ;; spare - used for item-path
					     )))
	    (for-each 
	     (lambda (waiton)
	       (if (and waiton (not (member waiton test-names)))
		   (let* ((new-test-patts  (tests:extend-test-patts test-patts hed waiton #f))
			  (waiton-record   (hash-table-ref/default test-records waiton #f))
			  (waiton-tconfig  (if waiton-record (vector-ref waiton-record 1) #f))
			  (waiton-itemized (and waiton-tconfig
						(or (hash-table-ref/default waiton-tconfig "items" #f)
						    (hash-table-ref/default waiton-tconfig "itemstable" #f)))))


		     (debug:print-info 0 "Test " waiton " has " (if waiton-record "a" "no") " waiton-record and" (if waiton-itemized " " " no ") "items")
		     ;; need to account for test-patt here, if I am test "a", selected with a test-patt of "hed/b%"
		     ;; and we are waiting on "waiton" we need to add "waiton/,waiton/b%" to test-patt
		     ;; is this satisfied by merely appending "/" to the waiton name added to the list?
		     ;;
		     ;; This approach causes all of the items in an upstream test to be run 








<
|



|
>
>







392
393
394
395
396
397
398

399
400
401
402
403
404
405
406
407
408
409
410
411
412
						(else #f)))                           ;; not iterated
					     #f      ;; itemsdat 5
					     #f      ;; spare - used for item-path
					     )))
	    (for-each 
	     (lambda (waiton)
	       (if (and waiton (not (member waiton test-names)))

		   (let* ((waiton-record   (hash-table-ref/default test-records waiton #f))
			  (waiton-tconfig  (if waiton-record (vector-ref waiton-record 1) #f))
			  (waiton-itemized (and waiton-tconfig
						(or (hash-table-ref/default waiton-tconfig "items" #f)
						    (hash-table-ref/default waiton-tconfig "itemstable" #f))))
			  (itemmap         (configf:lookup config "requirements" "itemmap"))
			  (new-test-patts  (tests:extend-test-patts test-patts hed waiton itemmap)))
		     (debug:print-info 0 "Test " waiton " has " (if waiton-record "a" "no") " waiton-record and" (if waiton-itemized " " " no ") "items")
		     ;; need to account for test-patt here, if I am test "a", selected with a test-patt of "hed/b%"
		     ;; and we are waiting on "waiton" we need to add "waiton/,waiton/b%" to test-patt
		     ;; is this satisfied by merely appending "/" to the waiton name added to the list?
		     ;;
		     ;; This approach causes all of the items in an upstream test to be run 

420
421
422
423
424
425
426
427

428
429
430
431
432
433
434
			   (if waiton-itemized
			       (begin
				 (debug:print-info 0 "New test patts: " new-test-patts ", prev test patts: " test-patts)
				 (set! required-tests (cons (conc waiton "/") required-tests))
				 (set! test-patts new-test-patts))
			       (begin
				 (debug:print-info 0 "Adding non-itemized test " waiton " to required-tests")
				 (set! required-tests (cons waiton required-tests)))))

			 (begin
			   (debug:print-info 0 "No testconfig info yet for " waiton ", setting up to re-process it")
			   (set! tal (append (cons waiton tal)(list hed))))) ;; (cons (conc waiton "/") required-tests))
			 
		     ;; NOPE: didn't work. required needs to be plain test names. Try tacking on to test-patts
		     ;;  - doesn't work
		     ;; (set! test-patts (conc test-patts "," waiton "/"))







|
>







421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
			   (if waiton-itemized
			       (begin
				 (debug:print-info 0 "New test patts: " new-test-patts ", prev test patts: " test-patts)
				 (set! required-tests (cons (conc waiton "/") required-tests))
				 (set! test-patts new-test-patts))
			       (begin
				 (debug:print-info 0 "Adding non-itemized test " waiton " to required-tests")
				 (set! required-tests (cons waiton required-tests))
				 (set! test-patts new-test-patts))))
			 (begin
			   (debug:print-info 0 "No testconfig info yet for " waiton ", setting up to re-process it")
			   (set! tal (append (cons waiton tal)(list hed))))) ;; (cons (conc waiton "/") required-tests))
			 
		     ;; NOPE: didn't work. required needs to be plain test names. Try tacking on to test-patts
		     ;;  - doesn't work
		     ;; (set! test-patts (conc test-patts "," waiton "/"))

Modified tests.scm from [de4ce3d9c3] to [e76dcf1b44].

72
73
74
75
76
77
78









79
80
81
82

83
84
85
86
87
88
89
90
  (delete-duplicates
   (filter (lambda (testname)
	     (tests:match test-patts testname #f))
	   test-names)))

;; given test-b that is waiting on test-a extend test-patt appropriately
;;









(define (tests:extend-test-patts test-patt test-b test-a itemmap)
  (let* ((patts      (string-split test-patt ","))
	 (test-b-len (+ (string-length test-b) 1))
	 (patts-b    (map (lambda (x)

			    (let ((newpatt (conc test-a "/" (substring x test-b-len (string-length x)))))
			      ;; (print "in map, x=" x ", newpatt=" newpatt)
			      newpatt))
			  (filter (lambda (x)
				    (eq? (substring-index (conc test-b "/") x) 0))
				  patts))))
    (string-intersperse (delete-duplicates (append patts (if (null? patts-b)
							     (list (conc test-a "/%"))







>
>
>
>
>
>
>
>
>




>
|







72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
  (delete-duplicates
   (filter (lambda (testname)
	     (tests:match test-patts testname #f))
	   test-names)))

;; given test-b that is waiting on test-a extend test-patt appropriately
;;
;;  genlib/testconfig               sim/testconfig
;;  genlib/sch                      sim/sch/cell1
;;
;;  [requirements]                  [requirements]
;;                                  mode itemwait
;;                                  # trim off the cell to determine what to run for genlib
;;                                  itemmap /.*
;;
;;                                  test-a is waiting on test-b so we need to create a pattern for test-b given test-a and itemmap
(define (tests:extend-test-patts test-patt test-b test-a itemmap)
  (let* ((patts      (string-split test-patt ","))
	 (test-b-len (+ (string-length test-b) 1))
	 (patts-b    (map (lambda (x)
			    (let* ((modpatt (if itemmap (db:convert-test-itempath x itemmap) x)) 
				   (newpatt (conc test-a "/," test-a "/" (substring modpatt test-b-len (string-length modpatt)))))
			      ;; (print "in map, x=" x ", newpatt=" newpatt)
			      newpatt))
			  (filter (lambda (x)
				    (eq? (substring-index (conc test-b "/") x) 0))
				  patts))))
    (string-intersperse (delete-duplicates (append patts (if (null? patts-b)
							     (list (conc test-a "/%"))

Modified tests/dep-tests/tests/genlib/testconfig from [b79b5cc679] to [5997267de8].

1
2
3
4
5
6
7
8
[include #{getenv MT_RUN_AREA_HOME}/common.testconfig]

[itemstable]
VIEWTYPE layout schematic

[requirements]
waiton #{get #{getenv DEPS} genlib}








|
1
2
3
4
5
6
7
8
[include #{getenv MT_RUN_AREA_HOME}/common.testconfig]

[itemstable]
VIEWTYPE layout schematic

[requirements]
waiton #{get #{getenv DEPS} genlib}
# itemmap /.*

Modified tests/dep-tests/tests/test1/testconfig from [f7e45fbc74] to [d6e3a28a40].

1
2
3
4
5
6
7




[include #{getenv MT_RUN_AREA_HOME}/common.testconfig]

[include #{getenv MT_RUN_AREA_HOME}/common_itemstable.testconfig]

[requirements]
waiton #{get #{getenv DEPS} test1}












>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
[include #{getenv MT_RUN_AREA_HOME}/common.testconfig]

[include #{getenv MT_RUN_AREA_HOME}/common_itemstable.testconfig]

[requirements]
waiton #{get #{getenv DEPS} test1}

# itemmap maps these items back to previous test
# NB// mapping is in reverse - NOT forwards!
#
itemmap /.*