Megatest

Check-in [7ba7704d24]
Login
Overview
Comment:re-Fixed crash from empty items list
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.55 | v1.5506
Files: files | file ages | folders
SHA1: 7ba7704d24ce94ac979f760918ae7d6768db92cf
User & Date: mrwellan on 2013-06-27 12:53:32
Other Links: branch diff | manifest | tags
Context
2013-06-27
13:06
re-Fixed crash from empty items list check-in: 031fcf1466 user: mrwellan tags: v1.55, v1.5506
12:53
re-Fixed crash from empty items list check-in: 7ba7704d24 user: mrwellan tags: v1.55, v1.5506
11:11
Fixed missing newtal var and added correct test for having items and some tweaks to tests check-in: 0df6a67888 user: mrwellan tags: v1.55, v1.5506
Changes

Modified runs.scm from [d08658e161] to [a0ac827331].

635
636
637
638
639
640
641

642
643
644
645

646
647
648
649
650
651
652
653
654
655
656
657
658
659
660

661
662
663
664
665


666
667
668
669
670
671
672
673
	    (if loop-list (apply loop loop-list))))

	 ;; items processed into a list but not came in as a list been processed
	 ;;
	 ((and (list? items)     ;; thus we know our items are already calculated
	       (not   itemdat))  ;; and not yet expanded into the list of things to be done
	  (debug:print-info 4 "OUTER COND: (and (list? items)(not itemdat))")

	  (if (and (debug:debug-mode 1) ;; (>= *verbosity* 1)
		   (> (length items) 0)
		   (and (list? (car items))
			(> (length (car items)) 0)))

	      (pp items))
	  (for-each
	   (lambda (my-itemdat)
	     (let* ((new-test-record (let ((newrec (make-tests:testqueue)))
				       (vector-copy! test-record newrec)
				       newrec))
		    (my-item-path (item-list->path my-itemdat)))
	       (if (tests:match test-patts hed my-item-path required: required-tests) ;; (patt-list-match my-item-path item-patts)           ;; yes, we want to process this item, NOTE: Should not need this check here!
		   (let ((newtestname (runs:make-full-test-name hed my-item-path)))    ;; test names are unique on testname/item-path
		     (tests:testqueue-set-items!     new-test-record #f)
		     (tests:testqueue-set-itemdat!   new-test-record my-itemdat)
		     (tests:testqueue-set-item_path! new-test-record my-item-path)
		     (hash-table-set! test-records newtestname new-test-record)
		     (set! tal (append tal (list newtestname))))))) ;; since these are itemized create new test names testname/itempath
	   items)

	  ;; At this point we have possibly added items to tal but all must be handed off to 
	  ;; INNER COND logic. I think loop without rotating the queue 
	  ;; (loop hed tal reg reruns))
	  ;; (let ((newtal (append tal (list hed))))  ;; We should discard hed as it has been expanded into it's items? Yes, but only if this *is* an itemized test
	  ;; (loop (car newtal)(cdr newtal) reg reruns)


	  (loop (car tal)(cdr tal) reg reruns))
	    
	 ;; if items is a proc then need to run items:get-items-from-config, get the list and loop 
	 ;;    - but only do that if resources exist to kick off the job
	 ;; EXPAND ITEMS
	 ((or (procedure? items)(eq? items 'have-procedure))
	  (let ((can-run-more    (runs:can-run-more-tests jobgroup max-concurrent-jobs)))
	    (if (and (list? can-run-more)







>
|



>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>





>
>
|







635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
	    (if loop-list (apply loop loop-list))))

	 ;; items processed into a list but not came in as a list been processed
	 ;;
	 ((and (list? items)     ;; thus we know our items are already calculated
	       (not   itemdat))  ;; and not yet expanded into the list of things to be done
	  (debug:print-info 4 "OUTER COND: (and (list? items)(not itemdat))")
	  ;; Must determine if the items list is valid. Discard the test if it is not.
	  (if (and (list? items)
		   (> (length items) 0)
		   (and (list? (car items))
			(> (length (car items)) 0)))
	      (begin
		(if (debug:debug-mode 1)(pp items))
		(for-each
		 (lambda (my-itemdat)
		   (let* ((new-test-record (let ((newrec (make-tests:testqueue)))
					     (vector-copy! test-record newrec)
					     newrec))
			  (my-item-path (item-list->path my-itemdat)))
		     (if (tests:match test-patts hed my-item-path required: required-tests) ;; (patt-list-match my-item-path item-patts)           ;; yes, we want to process this item, NOTE: Should not need this check here!
			 (let ((newtestname (runs:make-full-test-name hed my-item-path)))    ;; test names are unique on testname/item-path
			   (tests:testqueue-set-items!     new-test-record #f)
			   (tests:testqueue-set-itemdat!   new-test-record my-itemdat)
			   (tests:testqueue-set-item_path! new-test-record my-item-path)
			   (hash-table-set! test-records newtestname new-test-record)
			   (set! tal (append tal (list newtestname))))))) ;; since these are itemized create new test names testname/itempath
		 items))
	      (debug:print-info 0 "Test " (tests:testqueue-get-testname test-record) " is itemized but has no items"))
	  ;; At this point we have possibly added items to tal but all must be handed off to 
	  ;; INNER COND logic. I think loop without rotating the queue 
	  ;; (loop hed tal reg reruns))
	  ;; (let ((newtal (append tal (list hed))))  ;; We should discard hed as it has been expanded into it's items? Yes, but only if this *is* an itemized test
	  ;; (loop (car newtal)(cdr newtal) reg reruns)
	  (if (null? tal)
	      #f
	      (loop (car tal)(cdr tal) reg reruns)))
	    
	 ;; if items is a proc then need to run items:get-items-from-config, get the list and loop 
	 ;;    - but only do that if resources exist to kick off the job
	 ;; EXPAND ITEMS
	 ((or (procedure? items)(eq? items 'have-procedure))
	  (let ((can-run-more    (runs:can-run-more-tests jobgroup max-concurrent-jobs)))
	    (if (and (list? can-run-more)

Modified tests/Makefile from [6fc64fa3cd] to [2a555dddb7].

93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113



114
115
116
117
118
119
120
test8 : test8a
	cd fullrun;$(MEGATEST) -runtests lineitem_fail 1 -target ubuntu/nfs/none :runname $(RUNNAME)_singletest
	cd fullrun;$(MEGATEST) -runtests runfirst/fall 1 -target ubuntu/nfs/none :runname $(RUNNAME)_singleitem
	cd fullrun;$(MEGATEST) -runtests test_mt_vars/2 -target ubuntu/nfs/none :runname $(RUNNAME)_singleitem_waiton

# Some simple checks for bootstrapping and run loop logic 

test9 : minsetup test9a test9b test9c

test9a :
	@echo Run super-simple mintest e, no waitons.
	cd mintest;megatest -runtests e -target $(VER) :runname `date +%H.%M.%S` -debug $(DEBUG)

test9b :
	@echo Run simple mintest d with one waiton c
	cd mintest;megatest -runtests d -target $(VER) :runname `date +%H.%M.%S` -debug $(DEBUG)

test9c :
	@echo Run mintest a with full waiton chain a -> b -> c -> d -> e
	cd mintest;megatest -runtests a -target $(VER) :runname `date +%H.%M.%S` -debug $(DEBUG)





minsetup : 
	cd ..;make && make install
	mkdir -p mintest/{runs,links}
	cd mintest;megatest -stop-server 0
	cd mintest;megatest -server - -debug $(DEBUG) > server.log 2> server.log & 
	sleep 3







|













>
>
>







93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
test8 : test8a
	cd fullrun;$(MEGATEST) -runtests lineitem_fail 1 -target ubuntu/nfs/none :runname $(RUNNAME)_singletest
	cd fullrun;$(MEGATEST) -runtests runfirst/fall 1 -target ubuntu/nfs/none :runname $(RUNNAME)_singleitem
	cd fullrun;$(MEGATEST) -runtests test_mt_vars/2 -target ubuntu/nfs/none :runname $(RUNNAME)_singleitem_waiton

# Some simple checks for bootstrapping and run loop logic 

test9 : minsetup test9a test9b test9c test9d

test9a :
	@echo Run super-simple mintest e, no waitons.
	cd mintest;megatest -runtests e -target $(VER) :runname `date +%H.%M.%S` -debug $(DEBUG)

test9b :
	@echo Run simple mintest d with one waiton c
	cd mintest;megatest -runtests d -target $(VER) :runname `date +%H.%M.%S` -debug $(DEBUG)

test9c :
	@echo Run mintest a with full waiton chain a -> b -> c -> d -> e
	cd mintest;megatest -runtests a -target $(VER) :runname `date +%H.%M.%S` -debug $(DEBUG)

test9d :
	@echo Run mintest f with an empty waiton spec
	cd mintest;megatest -runtests f -target $(VER) :runname `date +%H.%M.%S` -debug $(DEBUG)

minsetup : 
	cd ..;make && make install
	mkdir -p mintest/{runs,links}
	cd mintest;megatest -stop-server 0
	cd mintest;megatest -server - -debug $(DEBUG) > server.log 2> server.log & 
	sleep 3

Modified tests/fdktestqa/testqa/Makefile from [1da3e6f8f7] to [958bbaad3d].

1

2
3
4
5
6
7
8
9
10
BINDIR=$(PWD)/../../../bin

MEGATEST=$(BINDIR)/megatest
DASHBOARD=$(BINDIR)/dashboard
all :
	$(MEGATEST) -runtests % -target a/b :runname c

bigbig :
	for tn in a b c d;do \
	   ($(MEGATEST) -runtests % -target a/b :runname $tn & ) ; \
	done
|
>
|
|







1
2
3
4
5
6
7
8
9
10
11
BINDIR    = $(PWD)/../../../bin
PATH     := $(BINDIR):$(PATH)
MEGATEST  = $(BINDIR)/megatest
DASHBOARD = $(BINDIR)/dashboard
all :
	$(MEGATEST) -runtests % -target a/b :runname c

bigbig :
	for tn in a b c d;do \
	   ($(MEGATEST) -runtests % -target a/b :runname $tn & ) ; \
	done

Modified tests/mintest/tests/f/testconfig from [facb7c910d] to [8af865d5b6].

1
2
3
4
5
6
# Add steps here. Format is "stepname script"
[ezsteps]
step1 echo SUCCESS

[requirements]
waiton b





|
1
2
3
4
5
6
# Add steps here. Format is "stepname script"
[ezsteps]
step1 echo SUCCESS

[requirements]
waiton