Skip to content

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

Description

@gapisback

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.

Activity

  1. self-assigned this
    on Dec 23, 2022
  2. added
    code-cleanupMinor corrections, improvements, code-cleanup; not necessarily a bug per se.
    on Dec 23, 2022
  3. added a commit that references this issue on Dec 23, 2022
  4. added a commit that references this issue on Dec 25, 2022
  5. added 2 commits that reference this issue on Jan 9, 2023
  6. added 2 commits that reference this issue on Jan 18, 2023
  7. added a commit that references this issue on Jan 18, 2023
  8. added a commit that references this issue on Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

code-cleanupMinor corrections, improvements, code-cleanup; not necessarily a bug per se.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions