summaryrefslogtreecommitdiff
path: root/unittest
diff options
context:
space:
mode:
Diffstat (limited to 'unittest')
-rw-r--r--unittest/mysys/CMakeLists.txt23
-rw-r--r--unittest/mytap/CMakeLists.txt7
-rw-r--r--unittest/mytap/tap.c6
3 files changed, 15 insertions, 21 deletions
diff --git a/unittest/mysys/CMakeLists.txt b/unittest/mysys/CMakeLists.txt
index a4c79afbf8b..3bf23df6066 100644
--- a/unittest/mysys/CMakeLists.txt
+++ b/unittest/mysys/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 MySQL AB, 2008-2009 Sun Microsystems, Inc
+# Copyright (C) 2007 MySQL AB, 2009 Sun Microsystems,Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -13,23 +13,20 @@
# 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
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/sql
${CMAKE_SOURCE_DIR}/regex
${CMAKE_SOURCE_DIR}/extra/yassl/include
${CMAKE_SOURCE_DIR}/unittest/mytap)
-ADD_EXECUTABLE(bitmap-t bitmap-t.c)
-TARGET_LINK_LIBRARIES(bitmap-t mytap mysys dbug strings)
-ADD_EXECUTABLE(base64-t base64-t.c)
-TARGET_LINK_LIBRARIES(base64-t mytap mysys dbug strings)
-ADD_EXECUTABLE(my_atomic-t my_atomic-t.c)
-TARGET_LINK_LIBRARIES(my_atomic-t mytap mysys dbug strings)
+MACRO (MY_ADD_TEST name)
+ ADD_EXECUTABLE(${name}-t ${name}-t.c)
+ TARGET_LINK_LIBRARIES(${name}-t mytap mysys)
+ ADD_TEST(${name} ${name}-t)
+ENDMACRO()
-ADD_EXECUTABLE(lf-t lf-t.c)
-TARGET_LINK_LIBRARIES(lf-t mytap mysys dbug strings)
-
-ADD_EXECUTABLE(my_rdtsc-t my_rdtsc-t.c)
-TARGET_LINK_LIBRARIES(my_rdtsc-t mytap mysys dbug strings)
+FOREACH(testname bitmap base64 my_vsnprintf my_atomic my_rdtsc lf)
+ MY_ADD_TEST(${testname})
+ENDFOREACH()
diff --git a/unittest/mytap/CMakeLists.txt b/unittest/mytap/CMakeLists.txt
index 9875f46697d..8a2f6c9639a 100644
--- a/unittest/mytap/CMakeLists.txt
+++ b/unittest/mytap/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 MySQL AB
+# Copyright (C) 2007 MySQL AB, 2009 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,8 +14,5 @@
# 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)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
ADD_LIBRARY(mytap tap.c)
diff --git a/unittest/mytap/tap.c b/unittest/mytap/tap.c
index 5cdbfeb428c..a7552b15eed 100644
--- a/unittest/mytap/tap.c
+++ b/unittest/mytap/tap.c
@@ -181,7 +181,7 @@ static signal_entry install_signal[]= {
int skip_big_tests= 1;
void
-plan(int const count)
+plan(int count)
{
char *config= getenv("MYTAP_CONFIG");
size_t i;
@@ -222,7 +222,7 @@ skip_all(char const *reason, ...)
}
void
-ok(int const pass, char const *fmt, ...)
+ok(int pass, char const *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
@@ -239,7 +239,7 @@ ok(int const pass, char const *fmt, ...)
void
-skip(int how_many, char const *const fmt, ...)
+skip(int how_many, char const *fmt, ...)
{
char reason[80];
if (fmt && *fmt)