summaryrefslogtreecommitdiffstats
path: root/tdeabc/vcardparser/CMakeLists.txt
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2016-09-27 17:24:29 +0200
committerSlávek Banko <[email protected]>2016-09-27 17:24:41 +0200
commitaca395819150543f3d769c2ed9b2fff05e1bbb61 (patch)
tree8da675c9c93418e1309cb80bd368770b1b6c4f05 /tdeabc/vcardparser/CMakeLists.txt
parent83681c9b08996739e7c17100e5e85eaee18d24ad (diff)
downloadtdelibs-aca395819150543f3d769c2ed9b2fff05e1bbb61.tar.gz
tdelibs-aca395819150543f3d769c2ed9b2fff05e1bbb61.zip
Fix FTBFS on vcardparser tests from prior commit
Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit 1571e6174436e1af461745296cacfbb3b369fdf9)
Diffstat (limited to 'tdeabc/vcardparser/CMakeLists.txt')
-rw-r--r--tdeabc/vcardparser/CMakeLists.txt42
1 files changed, 17 insertions, 25 deletions
diff --git a/tdeabc/vcardparser/CMakeLists.txt b/tdeabc/vcardparser/CMakeLists.txt
index 632c4fb9f..b23a23ffb 100644
--- a/tdeabc/vcardparser/CMakeLists.txt
+++ b/tdeabc/vcardparser/CMakeLists.txt
@@ -90,34 +90,26 @@ tde_add_executable( testvcardformatimpl
LINK ${TDEABC_TESTS_LINK}
)
-add_custom_target(test ALL echo "performing tests on vcardparser"
- COMMAND bash ./test.sh
- DEPENDS testing
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-)
-
-add_custom_target(testing ALL echo "creating test infrastructure"
- DEPENDS testvcardformatimpl testvcardformat testwrite2 testwrite testread2 testread
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-)
-
-add_custom_command(
- TARGET testing PRE_BUILD
- COMMAND test
- ARGS -f ${CMAKE_CURRENT_BINARY_DIR}/test.sh || ln -s ${CMAKE_SOURCE_DIR}/tdeabc/vcardparser/test.sh ${CMAKE_CURRENT_BINARY_DIR}
+add_custom_target( vcardparser_tests ALL
+ COMMENT "[VCardParser] Performing tests"
+ COMMAND rm -f ${CMAKE_CURRENT_BINARY_DIR}/FAILED
+ DEPENDS
+ testvcardformatimpl testvcardformat testwrite2 testwrite testread2 testread
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
-add_custom_command(
- TARGET testing PRE_BUILD
- COMMAND test
- ARGS -f ${CMAKE_CURRENT_BINARY_DIR}/checkvcard.pl || ln -s ${CMAKE_SOURCE_DIR}/tdeabc/vcardparser/checkvcard.pl ${CMAKE_CURRENT_BINARY_DIR}
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-)
+file( GLOB vcardparser_testfiles "tests/*.vcf" )
+list( REMOVE_ITEM vcardparser_testfiles "${CMAKE_CURRENT_SOURCE_DIR}/tests/vcard5.vcf" )
+list( SORT vcardparser_testfiles )
+
+foreach(testfile ${vcardparser_testfiles})
+ add_custom_command(
+ TARGET vcardparser_tests
+ COMMAND perl ${CMAKE_CURRENT_SOURCE_DIR}/checkvcard.pl ${testfile}
+ )
+endforeach(testfile)
add_custom_command(
- TARGET testing PRE_BUILD
- COMMAND test
- ARGS -d ${CMAKE_CURRENT_BINARY_DIR}/tests || ln -s ${CMAKE_SOURCE_DIR}/tdeabc/vcardparser/tests ${CMAKE_CURRENT_BINARY_DIR}
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ TARGET vcardparser_tests
+ COMMAND test ! -f ${CMAKE_CURRENT_BINARY_DIR}/FAILED
)