aboutsummaryrefslogtreecommitdiffhomepage
path: root/unittest
diff options
context:
space:
mode:
authorGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2014-11-25 15:22:09 -0800
committerGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2014-11-25 15:22:09 -0800
commit203501c14afaf6704d965de0ae7de3474424d166 (patch)
treee352a045c0c7c71d0ab953d92c6dbe06f545ce3f /unittest
parent64bf89ebdd0584a6951b68d815a3bb5abd4cdc1d (diff)
Refactored CMakefiles, unit tests for Linux enabled
Diffstat (limited to 'unittest')
-rw-r--r--unittest/CMakeLists.txt16
-rw-r--r--unittest/unittest.cpp4
2 files changed, 20 insertions, 0 deletions
diff --git a/unittest/CMakeLists.txt b/unittest/CMakeLists.txt
new file mode 100644
index 00000000..3437518a
--- /dev/null
+++ b/unittest/CMakeLists.txt
@@ -0,0 +1,16 @@
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}/../src/include
+ ${GLIB2_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${additional_lib_searchpath}
+)
+
+add_executable (unittestcpp unittest.cpp)
+target_link_libraries (
+ unittestcpp MailCore
+ ${ZLIB_LIBRARY} ${LIBETPAN_LIBRARY} ${LIBXML_LIBRARY} ${UCHARDET_LIBRARY} sasl2
+ ${TIDY_LIBRARY} ${CTEMPLATE_LIBRARY} ssl crypto ${linux_libraries} ${mac_libraries} ${ICU4C_LIBRARY}
+ ${GLIB2_LIBRARIES} ${FOUNDATIONFRAMEWORK} ${SECURITYFRAMEWORK} ${CORESERVICESFRAMEWORK}
+)
diff --git a/unittest/unittest.cpp b/unittest/unittest.cpp
index a96a82e2..f79397f4 100644
--- a/unittest/unittest.cpp
+++ b/unittest/unittest.cpp
@@ -319,5 +319,9 @@ int main(int argc, char ** argv)
pool->release();
+ if (global_failure > 0) {
+ exit(EXIT_FAILURE);
+ }
+
exit(EXIT_SUCCESS);
} \ No newline at end of file