|
59 | 59 | (assert-spec :kaocha/testable testable)
|
60 | 60 | (let [type (::type testable)]
|
61 | 61 | (try-load-third-party-lib type)
|
62 |
| - (assert-spec type testable))) |
| 62 | + (try |
| 63 | + (assert-spec type testable) |
| 64 | + (catch Exception e |
| 65 | + (prn e) |
| 66 | + ) |
| 67 | + ))) |
63 | 68 |
|
64 | 69 | (defmulti -load
|
65 | 70 | "Given a testable, load the specified tests, producing a test-plan."
|
|
125 | 130 | Also performs validation, and lazy loading of the testable type's
|
126 | 131 | implementation."
|
127 | 132 | [testable test-plan]
|
128 |
| - (load-type+validate testable) |
| 133 | + ;; (println (class testable)) |
129 | 134 | (binding [*current-testable* testable]
|
| 135 | + ;; (println (:kaocha.testable/id *current-testable*)) |
| 136 | + (load-type+validate testable) |
130 | 137 | (let [run (plugin/run-hook :kaocha.hooks/wrap-run -run test-plan)
|
131 | 138 | result (run testable test-plan)]
|
132 | 139 | (if-let [history history/*history*]
|
|
232 | 239 | (defn run-testables
|
233 | 240 | "Run a collection of testables, returning a result collection."
|
234 | 241 | [testables test-plan]
|
235 |
| - (print "run-testables got a collection of size" (count testables) |
| 242 | + (doall testables) |
| 243 | + #_(print "run-testables got a collection of size" (count testables) |
236 | 244 | " the first of which is "
|
237 | 245 | (:kaocha.testable/type (first testables))
|
238 | 246 | )
|
|
253 | 261 | (defn run-testables-parallel
|
254 | 262 | "Run a collection of testables, returning a result collection."
|
255 | 263 | [testables test-plan]
|
256 |
| - |
257 |
| - (print "run-testables-parallel got a collection of size" (count testables)) |
| 264 | + (doall testables) |
| 265 | + ;; (print "run-testables-parallel got a collection of size" (count testables)) |
258 | 266 | (let [load-error? (some ::load-error testables)
|
259 | 267 | ;; results (watch/make-queue)
|
260 | 268 | ;; put-return (fn [acc value]
|
261 | 269 | ;; (if (instance? BlockingQueue value)
|
262 | 270 | ;; (.drainTo value acc)
|
263 | 271 | ;; (.put acc value))
|
264 | 272 | ;; acc)
|
265 |
| - futures (doall (map #(future (do (println "Firing off future!" (Thread/currentThread)) (binding [*config* (dissoc *config* :parallel)] (run-testable % test-plan)))) testables))] |
| 273 | + futures (doall (map #(do |
| 274 | + (println (:parallel *config*) \space (.getName (Thread/currentThread))) |
| 275 | + (future |
| 276 | + ;(do #_(println "Firing off future!" (Thread/currentThread)) ) |
| 277 | + (binding [*config* (dissoc *config* :parallel)] (run-testable % test-plan)))) |
| 278 | + testables))] |
266 | 279 | (comment (loop [result [] ;(ArrayBlockingQueue. 1024)
|
267 | 280 | [test & testables] testables]
|
268 | 281 | (if test
|
|
0 commit comments