Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • sac2c sac2c
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 394
    • Issues 394
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 25
    • Merge requests 25
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Merge requests
  • !121

Improve CTest-based Testing

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Hans-Nikolai Viessmann requested to merge hans/sac2c:hans-improve-cmake-testing into develop Sep 17, 2020
  • Overview 1
  • Commits 5
  • Changes 23

Though CMake provides CTest framework for adding unit tests to a projects build system, it lacks fine control. Such as when to build tests, either on first run or on file changes. This missing control can lead to unfortunately circumstances where unit tests are not being re-compiled after being modified, or tests fail because they have not been built (WTF?!).

This work achieves the following:

  • we now track all *.sac based source files, meaning changes lead to re-compilation of tests
  • we add a check target, through which we bind dependencies between tests and the building of the compiler
  • we appropriately compile units tests (handled by GTest) when calling the check make target
  • add documentation to explain most all of this within the relevent CMake files
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: hans-improve-cmake-testing