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

time unit tests are broken if CFE_PLATFORM_TIME_CFG_SRC_MET is set to true #2439

Open
aliounis opened this issue Sep 1, 2023 · 2 comments · May be fixed by #2608
Open

time unit tests are broken if CFE_PLATFORM_TIME_CFG_SRC_MET is set to true #2439

aliounis opened this issue Sep 1, 2023 · 2 comments · May be fixed by #2608

Comments

@aliounis
Copy link
Contributor

aliounis commented Sep 1, 2023

Describe the bug
When attempting to run unit/coverage tests (SIMULATION=NATIVE, ENABLE_UNIT_TESTS=true) there is a compilation error for the time_UT.c unit test file if the CFE_PLATFORM_TIME_CFG_SRC_MET flag is set to true for the project. The compilation error appears to causes by references to undefined members of the CFE_TIME_Global structure (at minimum these are references to ClockSetState, AtToneMET, AtToneDelay, AtToneLatch, and AtToneMET. After doing a cursory investigation, it looks like these may have been moved to a substructure array ReferenceState, though I'm not certain since the unit test seems to imply they were scalar values but ReferenceState is an array of structs.

To Reproduce
Steps to reproduce the behavior:

  1. Create a fresh cFS build
  2. Change the CFE_PLATFORM_TIME_CFG_SRC_MET to true
  3. Configure with SIMULATION=native, ENABLE_UNIT_TESTS=true
  4. Attempt to build

Expected behavior
the unit tests should build and pass

Code snips
If applicable, add references to the software.

System observed on:

  • Hardware Intel Xeon
  • OS: ubuntu 22.4
  • Versions at least >= 7.0.0-rc4 (confirmed the issue is still present in main)

Additional context
N/A

Reporter Info
Andrew Liounis, NASA/GSFC

@aliounis
Copy link
Contributor Author

aliounis commented Sep 1, 2023

It looks like htis also might be an issue for other TIME_CFG_SRC selections

thnkslprpt added a commit to thnkslprpt/cFE that referenced this issue Sep 28, 2024
@thnkslprpt thnkslprpt linked a pull request Sep 28, 2024 that will close this issue
2 tasks
@thnkslprpt
Copy link
Contributor

@skliper already applied a fix for CFE_PLATFORM_TIME_CFG_SRC_TIME here and that options builds fine (and the tests all pass).

I'll put a quick PR in for the other 2 options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants