Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
I have a test (
add_test(NAME MyTest COMMAND MyExecutable
) that I would like to run only have some "preparation" tasks have been done. When I have one test that depends on another test, I will use
SET_TESTS_PROPERTIES(TestA PROPERTIES DEPENDS AnotherTest)
, but is there a way I can do something like
SET_TESTS_PROPERTIES(TestA PROPERTIES DEPENDS file(REMOVE /path/to/file))
?
The one way I can think of is using some Python or other scripts as test driver in following way as per
documentation
:
add_test(NAME test_req_some_ops_before
COMMAND testDriver.py --config $<CONFIGURATION>
--exe $<TARGET_FILE:myexe>
--path <here path to delete>)
which should do whatever you want
–
–
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.