Antares_Simulator
Antares_Simulator copied to clipboard
Cmake helper functions for tests
Description
Adding unit tests involves a few instructions which need to be repeated for each test. They are sometimes forgotten, leading to mistakes, see for example #1744 .
add_executable(<executable>)
...
# For VS folder
set_target_properties(<executable> PROPERTIES FOLDER Unit-tests/<folder>)
add_test(NAME <test> COMMND <executable>)
set_property(TEST <test> PROPERTY LABELS unit)
We should provide one or more helper functions to avoid the need for those repeated instructions, for example
antares_add_unit_test
, antares_add_e2e_test
...