Megatest

Diff
Login

Differences From Artifact [2e6377ff4f]:

To Artifact [e5e4720537]:


128
129
130
131
132
133
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
128
129
130
131
132
133
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







-
+




-
+






-
+

-
-
+
+


+
-
+

-
+

+
+
+
+
-
+

-
+
-
-
-



(test #f #t (let ((db (open-test-db testdbpath)))
	      (set! *tdb* db)
	      (sqlite3#database? db)))
(sqlite3#finalize! *tdb*)

;; (test "Remove the rollup run" #t (begin (remove-runs) #t))

(set! *verbosity* 20)
;; (set! *verbosity* 20)
(test "Run a test" #t (general-run-call 
		       "-runtests" 
		       "run a test"
		       (lambda (target runname keys keynames keyvallst)
			 (let ((test-patts "test1"))
			 (let ((test-patts "test%"))
			   (runs:run-tests target runname test-patts user (make-hash-table))
			   ))))

(change-directory test-work-dir)
(test "Add a step"  #t
      (begin
	(db:teststep-set-status! db 1 "step1" "start" 0 "This is a comment" "mylogfile.html")
	(db:teststep-set-status! db 2 "step1" "start" 0 "This is a comment" "mylogfile.html")
	(sleep 2)
	(db:teststep-set-status! db 1 "step1" "end" "pass" "This is a different comment" "finallogfile.html")
	(set! test-id (db:test-get-id (car (db:get-tests-for-run db 1 "test1" "" '() '()))))
	(db:teststep-set-status! db 2 "step1" "end" "pass" "This is a different comment" "finallogfile.html")
	(set! test-id (db:test-get-id (car (db:get-tests-for-run db 2 "test1" "" '() '()))))
	(number? test-id)))

(sleep 5)
(test "Get nice table for steps" "2.0s"
(test "Get nice table for steps" "2s"
      (begin
	(vector-ref (hash-table-ref (db:get-steps-table db test-id) "test1") 4)))
	(vector-ref (hash-table-ref (db:get-steps-table db test-id) "step1") 4)))

(test "Rollup the run(s)" #t (begin
			       (runs:rollup-run keys (keys->alist keys "na") "rollup" "matt")
			       #t))

(hash-table-set! args:arg-hash ":runname" "rollup")
(hash-table-set! args:arg-hash ":runname" "%")

(test "Remove the rollup run" #t (begin (remove-runs) #t))
(test "Remove the rollup run" #t (begin (operate-on 'remove-runs)))
(test "Rollup the run(s)" #t (begin
			       (runs:rollup-run db keys)
			       #t))

;; ADD ME!!!! (db:get-prereqs-not-met *db* 1 '("runfirst") "" mode: 'normal)
;; ADD ME!!!! (rdb:get-tests-for-run *db* 1 "runfirst" #f '() '())