Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructure codebase and update build configuration #47

Merged
merged 26 commits into from
Feb 4, 2023
Merged

Conversation

marcransome
Copy link
Owner

@marcransome marcransome commented Aug 26, 2022

  • Switch from getopt to libpopt to facilitate unit testing (the cmocka test framework executes all tests for a given test target in the same process and getopt's use of global state makes parsing multiple sets or arguments problematic in this scenario—even when using optreset as described in getopt(3))
  • Refactor functions that operate on opaque FlogConfig instances to simplify testing:
    • exit is no longer called internally and it is now the responsibility of the caller to check for error conditions and handle them appropriately (as in main.c)
    • flog_config_new returns NULL and will set errno to an appropriate value for any of several error conditions (see defs.h)
    • assert is conditionally redefined when testing is enabled in order to test for expected assertion failures in tests
  • Bump version number to 1.4.0 pending next release milestone

@marcransome marcransome added the enhancement New feature or request label Aug 26, 2022
@marcransome marcransome added this to the 1.2.0 milestone Aug 26, 2022
@marcransome marcransome self-assigned this Aug 26, 2022
@marcransome marcransome changed the title Add unit tests Add unit tests and update build configuration Aug 26, 2022
@marcransome marcransome modified the milestones: 1.2.0, 1.3.0 Sep 9, 2022
@marcransome marcransome modified the milestones: 1.3.0, 1.4.0 Jan 14, 2023
@marcransome marcransome changed the title Add unit tests and update build configuration Restructure codebase and update build configuration Feb 4, 2023
@marcransome marcransome merged commit 5f7e4ed into main Feb 4, 2023
@marcransome marcransome deleted the unit-tests branch February 4, 2023 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add CTest and cmocka to build configuration and restructure codebase to support unit testing
1 participant