Closed rosenhouse closed 1 year ago
Name | Link |
---|---|
Latest commit | 5d3e22407871dc98cb705e78a03af5110ecf0211 |
Latest deploy log | https://app.netlify.com/sites/splinterdb/deploys/638faf8d2fd2270008975134 |
@gapisback Thanks for the review. I've tried to improve the "new test author experience" part by updating splinter_test
as much as was practical in a short-time, and leaving a note up top to caution against following patterns there. And then there's at least a clearer distinction between "unit" versus "functional".
And yes, let's merge this as-is, and we'll defer the flag thing to later.
Unit tests respect a new
VERBOSE
environment variable, which ensures output goes tostdout
/stderr
.When
VERBOSE
is unset, or set to0
orfalse
, then:stdout
will show only 1 status line per teststderr
will be silent, except for error messagesWhen
VERBOSE
is set to any other value, then library and unit test info messages go tostdout
.When a unit test fails, the user will see a suggestion to set
VERBOSE=1
to see all the detailed output. (TODO: the suggestion doesn't appear on a crash, but that'd be nice)Library log lines from unit tests no longer go to
/tmp/unit_test.std[out,err]
Platform_default_log_handle
andPlatform_error_log_handle
are no longer part of the public API surface. Applications (and tests that mimic apps) must useplatform_set_log_streams()
instead (see #487)Cleans up some tests to avoid a direct dependency on
platform.h
:Platform_*_log_handle
globals and instead calls newplatform_set_log_streams()
platform_default_log()
and instead use a dedicatedCTEST_LOG_INFO()
macro.Fixes #288
Here's a side-by-side comparison, running in quiet mode (default) on the left, and with
VERBOSE=1
on the right.and here's what it looks like when a test fails and you haven't set VERBOSE yet: