aboutsummaryrefslogtreecommitdiff
path: root/lib/std/debug.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2025-08-21 13:44:43 +0100
committerMatthew Lugg <mlugg@mlugg.co.uk>2025-10-18 09:28:39 +0100
commit7e7d7875b9af97bd04ca03a98b2e4188d57e3c13 (patch)
tree59d1f3ebe4d23a4c92fee31a5a2c763de7a9012e /lib/std/debug.zig
parent337762114f575824a1ab793dca41a3d073aa17cd (diff)
downloadzig-7e7d7875b9af97bd04ca03a98b2e4188d57e3c13.tar.gz
zig-7e7d7875b9af97bd04ca03a98b2e4188d57e3c13.zip
std.Build: implement unit test timeouts
For now, there is a flag to `zig build` called `--test-timeout-ms` which accepts a value in milliseconds. If the execution time of any individual unit test exceeds that number of milliseconds, the test is terminated and marked as timed out. In the future, we may want to increase the granularity of this feature by allowing timeouts to be specified per-step or even per-test. However, a global option is actually very useful. In particular, it can be used in CI scripts to ensure that no individual unit test exceeds some reasonable limit (e.g. 60 seconds) without having to assign limits to every individual test step in the build script. Also, individual unit test durations are now shown in the time report web interface -- this was fairly trivial to add since we're timing tests (to check for timeouts) anyway. This commit makes progress on #19821, but does not close it, because that proposal includes a more sophisticated mechanism for setting timeouts. Co-Authored-By: David Rubin <david@vortan.dev>
Diffstat (limited to 'lib/std/debug.zig')
0 files changed, 0 insertions, 0 deletions