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
|
(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)
(test "Run a test" #t (general-run-call
"-runtests"
"run a test"
(lambda (target runname keys keynames keyvallst)
(let ((test-patts "test1"))
(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")
(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" "" '() '()))))
(number? test-id)))
(test "Get nice table for steps" "2.0s"
(begin
(vector-ref (hash-table-ref (db:get-steps-table db test-id) "test1") 4)))
(hash-table-set! args:arg-hash ":runname" "rollup")
(test "Remove the rollup run" #t (begin (remove-runs) #t))
(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 '() '())
|
|
|
|
|
|
>
|
|
>
>
>
>
|
|
<
<
<
|
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)
(test "Run a test" #t (general-run-call
"-runtests"
"run a test"
(lambda (target runname keys keynames keyvallst)
(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 2 "step1" "start" 0 "This is a comment" "mylogfile.html")
(sleep 2)
(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" "2s"
(begin
(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" "%")
(test "Remove the rollup run" #t (begin (operate-on 'remove-runs)))
;; ADD ME!!!! (db:get-prereqs-not-met *db* 1 '("runfirst") "" mode: 'normal)
;; ADD ME!!!! (rdb:get-tests-for-run *db* 1 "runfirst" #f '() '())
|