-
Notifications
You must be signed in to change notification settings - Fork 217
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
Adding unit tests from with a unit test not a supported pattern #577
Comments
I just checked for SB in the |
EDIT - I'm mistake here... they do execute in 'sb' |
Starting to look like nasa/cFE#726 may have broken it... still digging in. |
Looks like ut_assert now silently fails to add a test from inside another test. This worked pre #554. |
Or I should probably say doesn't add the test in a way that it will get executed, since it gets added to the front of the list (at least that's what it looks like on quick inspection.) |
Ahh yes, that would explain it - because that happens after combining the setup+test+teardown lists into one summary list, the newly-added test is still sitting on one of the component lists, not the summary list. If this is a desired/necessary feature (to add tests during tests) then perhaps we can add an outer loop into UtTest_Run to pick up tests that been added during the run. Would be simple to add. |
@astrogeco - can we close this? No requirement or real use case identified... just don't add test cases from other test cases. No need to implement additional logic simply to add complexity. At minimum reclassify as not a bug, since it's just not a supported capability. Nothing is broken. |
Fix #577, Document nested tests not supported
Documentation changes only
Fix nasa#344, Remove mission/platform include dirs
Describe the bug
Possibly related to #554 (reverted to v5.1.0-rc1 and they ran). Adding tests after starting to run tests (adding a test within a test) is not a supported pattern, and they won't actually get run (they do get added to the front of the individual list, but the merged test list doesn't not handle them).
To Reproduce
Add a unit test from within a unit test, build/execute and the added unit test will not execute.
Expected behavior
Didn't know NOT to do this... just don't do it.
Resolution
Just don't do it.
Document limitations and proper usage.
Code snips
uttest.c - see the adding and merging
System observed on:
Additional context
#554
Reporter Info
Jacob Hageman - NASA/GSFC
The text was updated successfully, but these errors were encountered: