summaryrefslogtreecommitdiff
path: root/unittest
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2011-07-16 09:09:01 +0200
committerSergei Golubchik <sergii@pisem.net>2011-07-16 09:09:01 +0200
commit2853f6bfbb2f392fa5623b480a2ce112991d2486 (patch)
tree4b089d92c563d49f563e6cadf4475a65974899a2 /unittest
parent66a8da067793b717df0d4682357df15cba3c935f (diff)
downloadmariadb-git-2853f6bfbb2f392fa5623b480a2ce112991d2486.tar.gz
unit test fixes for ctest
Diffstat (limited to 'unittest')
-rw-r--r--unittest/examples/CMakeLists.txt23
-rw-r--r--unittest/mysys/CMakeLists.txt19
-rw-r--r--unittest/mytap/CMakeLists.txt2
-rw-r--r--unittest/strings/CMakeLists.txt3
4 files changed, 10 insertions, 37 deletions
diff --git a/unittest/examples/CMakeLists.txt b/unittest/examples/CMakeLists.txt
index 52272bc412e..86c4a5bea9e 100644
--- a/unittest/examples/CMakeLists.txt
+++ b/unittest/examples/CMakeLists.txt
@@ -13,25 +13,4 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/zlib
- ${CMAKE_SOURCE_DIR}/sql
- ${CMAKE_SOURCE_DIR}/regex
- ${CMAKE_SOURCE_DIR}/extra/yassl/include
- ${CMAKE_SOURCE_DIR}/unittest/mytap)
-ADD_EXECUTABLE(simple-t simple-t.c)
-TARGET_LINK_LIBRARIES(simple-t mytap)
-
-ADD_EXECUTABLE(skip-t skip-t.c)
-TARGET_LINK_LIBRARIES(skip-t mytap)
-
-ADD_EXECUTABLE(todo-t todo-t.c)
-TARGET_LINK_LIBRARIES(todo-t mytap)
-
-ADD_EXECUTABLE(skip_all-t skip_all-t.c)
-TARGET_LINK_LIBRARIES(skip_all-t mytap)
-
-ADD_EXECUTABLE(no_plan-t no_plan-t.c)
-TARGET_LINK_LIBRARIES(no_plan-t mytap)
-
-ADD_EXECUTABLE(core-t core-t.c)
-TARGET_LINK_LIBRARIES(core-t mytap)
+MY_ADD_TESTS(simple skip todo skip_all no_plan)
diff --git a/unittest/mysys/CMakeLists.txt b/unittest/mysys/CMakeLists.txt
index 7bf046162c5..1de1bd19143 100644
--- a/unittest/mysys/CMakeLists.txt
+++ b/unittest/mysys/CMakeLists.txt
@@ -13,20 +13,9 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
- ${CMAKE_SOURCE_DIR}/sql
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/sql
${CMAKE_SOURCE_DIR}/regex
- ${CMAKE_SOURCE_DIR}/extra/yassl/include
- ${CMAKE_SOURCE_DIR}/unittest/mytap)
+ ${CMAKE_SOURCE_DIR}/extra/yassl/include)
-
-MACRO (MY_ADD_TEST name)
- ADD_EXECUTABLE(${name}-t ${name}-t.c)
- TARGET_LINK_LIBRARIES(${name}-t mytap mysys strings)
- ADD_TEST(${name} ${name}-t)
-ENDMACRO()
-
-
-FOREACH(testname bitmap base64 my_vsnprintf my_atomic my_rdtsc lf my_malloc)
- MY_ADD_TEST(${testname})
-ENDFOREACH()
+MY_ADD_TESTS(bitmap base64 my_vsnprintf my_atomic my_rdtsc lf my_malloc
+ LINK_LIBRARIES mysys)
diff --git a/unittest/mytap/CMakeLists.txt b/unittest/mytap/CMakeLists.txt
index 063c69eb925..40f23950369 100644
--- a/unittest/mytap/CMakeLists.txt
+++ b/unittest/mytap/CMakeLists.txt
@@ -15,3 +15,5 @@
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
ADD_LIBRARY(mytap tap.c)
+
+MY_ADD_TESTS(t/basic)
diff --git a/unittest/strings/CMakeLists.txt b/unittest/strings/CMakeLists.txt
new file mode 100644
index 00000000000..10791edfb61
--- /dev/null
+++ b/unittest/strings/CMakeLists.txt
@@ -0,0 +1,3 @@
+
+MY_ADD_TESTS(strings LINK_LIBRARIES strings)
+