2016-06-19 15:41 GMT+03:00 deloptes <deloptes(a)gmail.com>om>:
deloptes wrote:
deloptes wrote:
add_custom_target(testing check
COMMAND bash test.sh
COMMENT .......
DEPENDS .......
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
does this look good to you
especially add_custom_target(testing check
thanks
I tested now and it seems it should be
add_custom_target(testing ALL
I don't see any other option in docs except all or skip this, but ALL also
means it should pass the tests as the target is called on build and if
skipped the testing target can not be called
fakeroot debian/rules testing
...
make: *** No rule to make target 'testing'. Stop.
Another problem I have with
COMMAND bash test.sh
is that it tries executing this but test is not created at this point of
time. However I have defined
add_custom_command(
TARGET testing PRE_BUILD
COMMAND test
ARGS -f ${CMAKE_CURRENT_BINARY_DIR}/test.sh || ln -s
${CMAKE_CURRENT_SOURCE_DIR}/test.sh ${CMAKE_CURRENT_BINARY_DIR}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
Can you help a bit please?
thanks
Hi, I was played around with repairing the check/test system some time ago...
Some notes to be taken into account:
1) There are two types of checks:
- "make check" builds test snippets that are required to be run by
the user and see if they produce correct output
- "make test" runs those few which are intended to be run as part
of automatic system
2) The programs themselves are broken (mostly they have same mistake
related to changed TDEApplication constructor signature)
I may fix the cmake stuff for you, if you will repair the programs
themselves (95% is to change 1 line, but I wouldn't trust in that
particular case to a script) and do the testing (at least make sure
that all checks are getting run and won't crash instantly).
Also for doing it right I will follow the order: tdelibs -> tdebase -> tdepim.
Note to maintainers: changes to the main cmake files will be required.