vmware / splinterdb

High Performance Embedded Key-Value Store
https://splinterdb.org
Apache License 2.0
685 stars 57 forks source link

Refactor code that manages stdout / stderr file handles in unit tests to a common routine. #513

Closed gapisback closed 1 year ago

gapisback commented 1 year ago

Under PR #494 (at SHA 83de5e0), we introduced platform_set_log_streams(stdout, stderr) as the mechanism to keep execution of unit-tests silent, and to redirect outputs to /dev/null for normal execution. Output log-stream handling is supposed to be done in the CTEST_SETUP() method.

This code chunk is now appearing in multiple unit-test source files. Refactor the code chunk into a common function that can be called from all unit-test files.

As part of this issue, also clean-up the db-name defined for unit-tests, in tests/unit/unit_tests.h: #define TEST_DB_NAME "unit_tests_db"

Change this to conform to r.e. defined in .gitignore to suppress listing it in git status output.