-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify output handling in unit tests (#494)
- Unit tests respect VERBOSE environment variable, which ensures output goes to stdout/stderr. - When VERBOSE is unset, or set to "0" or "false", then: - stdout will show only 1 status line per test - stderr will be silent, except for error messages - When VERBOSE is set to any other value, then library and unit test info messages go to stdout. - 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 and Platform_error_log_handle are no longer part of the public API surface. Applications (and tests that mimic apps) must use platform_set_log_streams() instead. - Cleans up most unit tests to avoid a direct dependency on platform.h: - Removes some references to Platform_*_log_handle globals and instead calls platform_set_log_streams() - Removes some calls to platform_default_log() and instead use a dedicated CTEST_LOG_INFO() macro. - This isn't complete, but is a start - Enable VERBOSE mode when running tests in CI - fixup: move file_error_returns test to limitations test file, since it covers an error condition
- Loading branch information
1 parent
74e0360
commit 83de5e0
Showing
15 changed files
with
183 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.