CMakeLists.txt tests/CMakeLists.txt tests/conversiontest.cpp
Christian Mollekopf
mollekopf at kolabsys.com
Thu Aug 9 12:05:42 CEST 2012
CMakeLists.txt | 1 +
tests/CMakeLists.txt | 3 +++
tests/conversiontest.cpp | 2 +-
3 files changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 470178f429c17e73e080a95bb6ca391664063ed2
Author: Christian Mollekopf <mollekopf at kolabsys.com>
Date: Thu Aug 9 12:05:30 2012 +0200
enable the 'make test' target and don't wait overly long in the threading test
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 04418f5..a523538 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -180,6 +180,7 @@ include_directories(
add_subdirectory(src)
if (BUILD_TESTS)
+ enable_testing()
add_subdirectory(tests)
endif()
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index dc4da78..63c06cb 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -14,14 +14,17 @@ if (QT4_FOUND)
QT4_AUTOMOC(bindingstest.cpp)
add_executable(bindingstest bindingstest.cpp ${CMAKE_CURRENT_BINARY_DIR}/${BINDINGSTEST_MOC})
target_link_libraries(bindingstest ${QT_QTTEST_LIBRARY} ${QT_QTCORE_LIBRARY} kolabxml ${XERCES_C})
+ add_test(bindingstest ${CMAKE_CURRENT_BINARY_DIR}/bindingstest)
QT4_AUTOMOC(conversiontest.cpp)
add_executable(conversiontest conversiontest.cpp ${CMAKE_CURRENT_BINARY_DIR}/${CONVERSIONTEST_MOC})
target_link_libraries(conversiontest ${QT_QTTEST_LIBRARY} ${QT_QTCORE_LIBRARY} kolabxml ${XERCES_C})
+ add_test(conversiontest ${CMAKE_CURRENT_BINARY_DIR}/conversiontest)
QT4_AUTOMOC(parsingtest.cpp)
add_executable(parsingtest parsingtest.cpp ${CMAKE_CURRENT_BINARY_DIR}/${CONVERSIONTEST_MOC})
target_link_libraries(parsingtest ${QT_QTTEST_LIBRARY} ${QT_QTCORE_LIBRARY} kolabxml ${XERCES_C})
+ add_test(parsingtest ${CMAKE_CURRENT_BINARY_DIR}/parsingtest)
else()
message(WARNING "Could not build tests because qt is missing")
endif()
diff --git a/tests/conversiontest.cpp b/tests/conversiontest.cpp
index 8ead31d..5b5c6d2 100644
--- a/tests/conversiontest.cpp
+++ b/tests/conversiontest.cpp
@@ -255,7 +255,7 @@ void threadF()
std::string uid = s.str();
// std::cout << uid << std::endl;
Kolab::Utils::setCreatedUid(uid);
- boost::this_thread::sleep(boost::posix_time::seconds(1));
+ boost::this_thread::sleep(boost::posix_time::millisec(50));
QCOMPARE(Kolab::Utils::createdUid(), uid);
}
}
More information about the commits
mailing list