Antares_Simulator icon indicating copy to clipboard operation
Antares_Simulator copied to clipboard

Cmake helper functions for tests

Open sylvlecl opened this issue 1 year ago • 0 comments

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 ...

sylvlecl avatar Nov 06 '23 09:11 sylvlecl