i am using CMake together with ctest to generate software tests. As an example i have a binary foo
which get's exactly three input arguments p1
, p2
, p3
. The Parameters can range from 0-2. To check my binary foo
with all possible combination of p1
, p2
, p3
i do the following in my CMakeList.txt
foreach(P1 0 1 2)
foreach(P2 0 1 2)
foreach(P3 0 1 2)
add_test(foo-p1${P1}-p2${P2}-p3${P3} ${P1} ${P2} ${P3})
endforeach(P3)
endforeach(P2)
endforeach(P3)
Is there a more "elegant" way to generate all these different tests? Assume foo
needs 10 Parameter p1
,...,p10
this would look horrible. Thanks in advance.
Aucun commentaire:
Enregistrer un commentaire