You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In order to (attempt to) implement coverage test for PSP modules without redefining the sources for that module, the Cmake script currently redefines the add_psp_module function to do something different when building for coverage tests.
Problem is, this override ends up getting global scope, not directory scope. So in the event that multiple modules are specified and if the psp library gets built first (which will include coverage test if enabled), then any modules built after the psp will fail, because they use the coverage test override function rather than the proper function as defined in arch_build.cmake
To Reproduce
Create a project utilizing several PSP modules/extensions for custom HW access. Modules will fail to build when ENABLE_UNIT_TESTS is set true, even if they do not contain a coverage test, because the FSW build is using the wrong definition of the add_psp_module function.
Expected behavior
Should build successfully.
Code snips
Root of the problem is this override at:
Additional context
This function definition ends up getting global scope, not directory scope, so even after returning to the parent directory, this modified definition remains active.
Reporter Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered:
jphickey
added a commit
to jphickey/PSP
that referenced
this issue
Sep 3, 2021
Implements a differently-named function instead, which does mostly the same thing,
but does not directly re-add the original subdirectory. This does repeat some
info (e.g. the list of FSW source files) that was not repeated otherwise, but
it works in general.
Implements a differently-named function instead, which does mostly the same thing,
but does not directly re-add the original subdirectory. This does repeat some
info (e.g. the list of FSW source files) that was not repeated otherwise, but
it works in general.
Describe the bug
In order to (attempt to) implement coverage test for PSP modules without redefining the sources for that module, the Cmake script currently redefines the
add_psp_module
function to do something different when building for coverage tests.Problem is, this override ends up getting global scope, not directory scope. So in the event that multiple modules are specified and if the psp library gets built first (which will include coverage test if enabled), then any modules built after the psp will fail, because they use the coverage test override function rather than the proper function as defined in
arch_build.cmake
To Reproduce
Create a project utilizing several PSP modules/extensions for custom HW access. Modules will fail to build when ENABLE_UNIT_TESTS is set true, even if they do not contain a coverage test, because the FSW build is using the wrong definition of the
add_psp_module
function.Expected behavior
Should build successfully.
Code snips
Root of the problem is this override at:
PSP/unit-test-coverage/modules/CMakeLists.txt
Line 14 in 6d40816
System observed on:
Ubuntu
Additional context
This function definition ends up getting global scope, not directory scope, so even after returning to the parent directory, this modified definition remains active.
Reporter Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered: