Megatest

Check-in [7d8e24827c]
Login
Overview
Comment:Merged in item deps handling fix branch:
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.60
Files: files | file ages | folders
SHA1: 7d8e24827c089ab5c1bed67cc73863d76ca5327e
User & Date: mrwellan on 2015-07-29 23:57:56
Other Links: branch diff | manifest | tags
Context
2015-07-30
00:54
Merged in itemmap fixes check-in: 2b8ac70e49 user: mrwellan tags: v1.60
2015-07-29
23:57
Merged in item deps handling fix branch: check-in: 7d8e24827c user: mrwellan tags: v1.60
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
Changes

Modified db.scm from [3890e6d8b5] to [8a33d5ef0f].

3270
3271
3272
3273
3274
3275
3276














3277
3278
3279
3280
3281
3282
3283
	     (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)







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







3270
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
	     (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 [cdda747b65].

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))))
			  (waiton-itemmap  (configf:lookup waiton-tconfig "requirements" "itemmap"))
			  (new-test-patts  (tests:extend-test-patts test-patts hed waiton 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 [6ce512b6dd].

76
77
78
79
80
81
82

83
84
85
86
87
88
89
90

;; 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 "/%"))







>
|







76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91

;; 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* ((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 [37b8dd3e28].

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 [9d441a3bde].

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

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

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

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