diff options
author | Emanoil Kotsev <[email protected]> | 2016-09-26 21:20:31 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2016-09-26 21:25:15 +0900 |
commit | 83681c9b08996739e7c17100e5e85eaee18d24ad (patch) | |
tree | 16e804b49d19591e4e4fd24c3703aa6edbb2653b | |
parent | 515aec93f3ab3da6298b0d895710202647de2ab1 (diff) | |
download | tdelibs-83681c9b08996739e7c17100e5e85eaee18d24ad.tar.gz tdelibs-83681c9b08996739e7c17100e5e85eaee18d24ad.zip |
Fixed vcardparser tests during building. This resolves bug 2695.
Signed-off-by: Emanoil Kotsev <[email protected]>
Removed not-required part of the patch from original Emanoil's patch (empty spaces at the end of line)
Signed-off-by: Michele Calgaro <[email protected]>
(cherry picked from commit 13e032939ea40c33e4964b54bf755a6f1c9d70be)
-rw-r--r-- | tdeabc/vcardparser/CMakeLists.txt | 11 | ||||
-rwxr-xr-x | tdeabc/vcardparser/checkvcard.pl | 3 | ||||
-rw-r--r-- | tdeabc/vcardparser/test.sh | 7 |
3 files changed, 16 insertions, 5 deletions
diff --git a/tdeabc/vcardparser/CMakeLists.txt b/tdeabc/vcardparser/CMakeLists.txt index 8e916aa0b..632c4fb9f 100644 --- a/tdeabc/vcardparser/CMakeLists.txt +++ b/tdeabc/vcardparser/CMakeLists.txt @@ -90,9 +90,14 @@ tde_add_executable( testvcardformatimpl LINK ${TDEABC_TESTS_LINK} ) -add_custom_target(testing ALL - COMMAND echo "creating test infrastructure" - DEPENDS testread +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} ) diff --git a/tdeabc/vcardparser/checkvcard.pl b/tdeabc/vcardparser/checkvcard.pl index 1360972e6..b55097fdc 100755 --- a/tdeabc/vcardparser/checkvcard.pl +++ b/tdeabc/vcardparser/checkvcard.pl @@ -44,7 +44,8 @@ if ( $#refcont != $#prscont ) { system "touch FAILED"; exit 1; } - +@prscont = sort @prscont; +@refcont = sort @refcont; for (my $i=0; $i<=$#refcont; $i++) { if ( $refcont[$i] ne $prscont[$i] ) { $error++; diff --git a/tdeabc/vcardparser/test.sh b/tdeabc/vcardparser/test.sh index f7855f2d1..4badd6af7 100644 --- a/tdeabc/vcardparser/test.sh +++ b/tdeabc/vcardparser/test.sh @@ -1,6 +1,11 @@ TESTFILES="vcard1.vcf vcard2.vcf vcard3.vcf vcard4.vcf vcard6.vcf vcard7.vcf vcard8.vcf vcard9.vcf" -test -f FAILED && rm -f FAILED; +test -f FAILED && rm -f FAILED for i in $TESTFILES; do perl ./checkvcard.pl ./tests/$i ; done; + +if [ -f FAILED ]; then + echo ERROR + exit 1 +fi
\ No newline at end of file |