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
I am writing unit tests to run on hardware, using twister. I have a need to pass extra arguments (using -x, --extra-args) to cmake at the command line when I invoke twister. The output folder twister generates seems to have two different cmake areas, one for the overall invocation of twister, and then a subfolder for each test. However the extra arguments are only defined in the CMakeCache.txt file for the overall test folder, and they are not defined in the test specific CMakeCache.txt file (in the subfolder). And so my cmakelist.txt file which depends on these variables being available does not work right.
To Reproduce
Generate a unit test that runs on a hardware platform.
Add something in the cmakelist.txt file for that test that uses a variable that should come from the cmake cache (not otherwise defined). Which if its not defined causes the build to fail.
invoke the test with twister defining your above variable with -x=MY_VARIABLE=VALUE
See that the build fails, and that the variable is only defined in the overall twister cmake cache, and not in the test specific one.
Expected behavior
I would expect the variable to be defined in the tests cmake cache file.
Impact
I can't use twister, and will probably end up creating my own test orchestration framework.
Logs and console output
Environment (please complete the following information):
OS: Windows
Toolchain: 0.16.8
v3.7.99-ncs2 (I know this is a Nordic version, but I don't think there are any twister specific changes in it)
Additional context
The same thing happens if I specify the extra-args in the testcase.yaml file.
The text was updated successfully, but these errors were encountered:
Describe the bug
I am writing unit tests to run on hardware, using twister. I have a need to pass extra arguments (using -x, --extra-args) to cmake at the command line when I invoke twister. The output folder twister generates seems to have two different cmake areas, one for the overall invocation of twister, and then a subfolder for each test. However the extra arguments are only defined in the CMakeCache.txt file for the overall test folder, and they are not defined in the test specific CMakeCache.txt file (in the subfolder). And so my cmakelist.txt file which depends on these variables being available does not work right.
To Reproduce
Expected behavior
I would expect the variable to be defined in the tests cmake cache file.
Impact
I can't use twister, and will probably end up creating my own test orchestration framework.
Logs and console output
Environment (please complete the following information):
Additional context
The same thing happens if I specify the extra-args in the testcase.yaml file.
The text was updated successfully, but these errors were encountered: