def run

ezx@1.11.0.0 · src/ez/test.bend:120

import ezx@1.11.0.0/src/ez/test.bend as Test
import Base
import snap@1.4.0.0/main.bend as R
import ezx@1.11.0.0/src/share/env.bend as Env
import ezx@1.11.0.0/src/share/cap.bend as Cap
import ezx@1.11.0.0/src/ez/clock.bend as Clock
import ezx@1.11.0.0/src/ez/timer.bend as Timer
import ezx@1.11.0.0/src/ez/prove.bend as P

120# `ez test`: every test in the tree, all of them at once. Nothing here is
121# ordered against anything else, since each test has its own scratch directory
122# and port, and the report is still walked in the tree's order whatever order
123# the jobs finished in.
124def run() -> IO(Unit):
125  do IO<Unit>:
126    +cap : Bool <- Cap.ok()
127    Cap.warn(cap)
128    +secs : String <- Timer.seconds()
129    +deadline : String <- Timer.start(secs)
130    +g : String <- Cap.gb()
131    +at : String <- Env.lib()
132    +jobs : String <- P.width()
133    +ts : List<&2, String> <- find()
134    P.fresh.dir(out.at())
135    +by : String <- IO.pure(String, Clock.by.effect(deadline))
136    as : List<&2, String> <- R.par(P.cmds(ts, cap, g, at), jobs, g, out.at(), by)
137    every : Tally <- report(ts, as, Tally{0n, 0n})
138    +late : Bool <- Timer.over(deadline)
139    kept : Tally <- budget(late, secs, every)
140    done(kept)

Uses (25)

Used by (1)