-
Notifications
You must be signed in to change notification settings - Fork 6
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
Split EkatCreateUnitTest in two macros #166
Conversation
One macro creates the exec, the other creates the tests. The old macro EkatCreateUnitTest is still available, and simply calls the two new macros (plus some logic to split the optional args).
Note: the old macro could have been implemented easily as
However, this would cause lots of cmake warning from the inner macros, which would receive many more args than what they expect (they would both receive both add-exec and add-test phase args). I could have dropped the check on the input args, but it seemed unsafe, so I had to add some logic to split the input lists of optional args into lists for exec-creation and tests-creation phases. |
Status Flag 'Pre-Test Inspection' - Auto Inspected - Inspection Is Not Necessary for this Pull Request. |
Status Flag 'Pull Request AutoTester' - Testing Jenkins Projects: Pull Request Auto Testing STARTING (click to expand)Build InformationTest Name: EKAT_PullRequest_Autotester_Blake
Jenkins Parameters
Build InformationTest Name: EKAT_PullRequest_Autotester_Weaver
Jenkins Parameters
Build InformationTest Name: EKAT_PullRequest_Autotester_Mappy
Jenkins Parameters
Using Repos:
Pull Request Author: bartgol |
Status Flag 'Pull Request AutoTester' - Jenkins Testing: all Jobs PASSED Pull Request Auto Testing has PASSED (click to expand)Build InformationTest Name: EKAT_PullRequest_Autotester_Blake
Jenkins Parameters
Build InformationTest Name: EKAT_PullRequest_Autotester_Weaver
Jenkins Parameters
Build InformationTest Name: EKAT_PullRequest_Autotester_Mappy
Jenkins Parameters
|
Status Flag 'Pre-Merge Inspection' - SUCCESS: The last commit to this Pull Request has been INSPECTED AND APPROVED by [ jgfouca ]! |
Status Flag 'Pull Request AutoTester' - Pull Request will be Automerged |
Merge on Pull Request# 166: IS A SUCCESS - Pull Request successfully merged |
Motivation
A recent change made it possible to create a unit test with an existing executable. However, the user still had to pass an empty argument for the exec sources. This PR fixes this, by splitting the existing macro into two macros: one to create the executable (
EkatCreateUnitTestExec
), and the other to create the tests (EkatCreateUnitTestFromExec
). The old macroEkatCreateUnitTest
is still available (but does not support theTEST_EXE
optional arg anymore), and simply calls the other two in sequence (plus some logic to split the optional arg among the two macros).To create structurally different tests with the same exec, one can now do
or even
(
EkatCreateUnitTest
makes the exec name coincide with the root test name).Testing
I manually verified that the two macros work as expected. All existing EKAT tests use the old macro, which is now implemented in terms of the two new ones, making them "tested".