Megatest

Check-in [f7c2939894]
Login
Overview
Comment:Added error messages to item calculations but can't seem to trigger them.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.55
Files: files | file ages | folders
SHA1: f7c29398946f11ec4a3d2991a560efe80b98a467
User & Date: matt on 2013-11-03 10:05:10
Other Links: branch diff | manifest | tags
Context
2013-11-03
21:54
Heuristic method added to end the run when there are waitons clogging up the queue check-in: 388090bb52 user: matt tags: v1.55
10:05
Added error messages to item calculations but can't seem to trigger them. check-in: f7c2939894 user: matt tags: v1.55
09:21
Added more error checking for bad items specs check-in: bc2d2738d3 user: matt tags: v1.55
Changes

Modified items.scm from [8ea3260641] to [8234d9cd3a].

134
135
136
137
138
139
140
141

142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
			(if s (string-split s) #f))))
    (if valid-values
	(if (member item valid-values)
	    item #f)
	item)))

(define (items:get-items-from-config tconfig)
  (let* (;; db is always at *toppath*/db/megatest.db

	 (items       (hash-table-ref/default tconfig "items" #f))
	 (itemstable  (hash-table-ref/default tconfig "itemstable" #f)))
    (debug:print 5 "items: " items " itemstable: " itemstable)
    (if items
	(set! items (map (lambda (item)
			   (if (procedure? (cadr item))
			       (list (car item)((cadr item)))
			       item))
			 items)))
    (if itemstable 
	(set! itemstable (map (lambda (item)
				(if (procedure? (cadr item))
				    (list (car item)((cadr item)))
				    item))
			      itemstable)))
    (if (and items (null? items))
	(debug:print 0 "ERROR: You have an [items] section in your testconfig but there were no items define!"))
    (if (and itemstable (null? itemstable))
	(debug:print 0 "ERROR: You have an [itemstable] section in your testconfig but there were no entries defined!"))
    (if (or (not (null? items))(not (null? itemstable)))
	(append (if items      (item-assoc->item-list items)      '())
		(if itemstable (item-table->item-list itemstable) '()))
	'(()))))

;; (pp (item-assoc->item-list itemdat))


	







|
>
|
|

<
|
|
|
|
|
<
|
|
|
|
|
<
|
|
<

|
|






134
135
136
137
138
139
140
141
142
143
144
145

146
147
148
149
150

151
152
153
154
155

156
157

158
159
160
161
162
163
164
165
166
			(if s (string-split s) #f))))
    (if valid-values
	(if (member item valid-values)
	    item #f)
	item)))

(define (items:get-items-from-config tconfig)
  (let* ((have-items  (hash-table-ref/default tconfig "items"      #f))
	 (have-itable (hash-table-ref/default tconfig "itemstable" #f))
	 (items       (hash-table-ref/default tconfig "items"      '()))
	 (itemstable  (hash-table-ref/default tconfig "itemstable" '())))
    (debug:print 5 "items: " items " itemstable: " itemstable)

    (set! items (map (lambda (item)
		       (if (procedure? (cadr item))
			   (list (car item)((cadr item)))
			   item))
		     items))

    (set! itemstable (map (lambda (item)
			    (if (procedure? (cadr item))
				(list (car item)((cadr item)))
				item))
			  itemstable))

    (if (and have-items  (null? items))     (debug:print 0 "ERROR: [items] section in testconfig but no entries defined"))
    (if (and have-itable (null? itemstable))(debug:print 0 "ERROR: [itemstable] section in testconfig but no entries defined"))

    (if (or (not (null? items))(not (null? itemstable)))
	(append (item-assoc->item-list items)
		(item-table->item-list itemstable))
	'(()))))

;; (pp (item-assoc->item-list itemdat))