diff options
Diffstat (limited to 'unittest')
-rw-r--r-- | unittest/mysys/CMakeLists.txt | 32 | ||||
-rw-r--r-- | unittest/mysys/Makefile.am | 2 | ||||
-rw-r--r-- | unittest/mytap/CMakeLists.txt | 7 | ||||
-rw-r--r-- | unittest/mytap/tap.c | 6 |
4 files changed, 39 insertions, 8 deletions
diff --git a/unittest/mysys/CMakeLists.txt b/unittest/mysys/CMakeLists.txt new file mode 100644 index 00000000000..bc07ce1c851 --- /dev/null +++ b/unittest/mysys/CMakeLists.txt @@ -0,0 +1,32 @@ +# 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 +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# 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 + ${CMAKE_SOURCE_DIR}/regex + ${CMAKE_SOURCE_DIR}/extra/yassl/include + ${CMAKE_SOURCE_DIR}/unittest/mytap) + + +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() + + +FOREACH(testname bitmap base64 my_vsnprintf my_atomic) + MY_ADD_TEST(${testname}) +ENDFOREACH() diff --git a/unittest/mysys/Makefile.am b/unittest/mysys/Makefile.am index d83b2909048..47cc9841994 100644 --- a/unittest/mysys/Makefile.am +++ b/unittest/mysys/Makefile.am @@ -24,6 +24,8 @@ LDADD = $(top_builddir)/unittest/mytap/libmytap.a \ $(top_builddir)/strings/libmystrings.a noinst_PROGRAMS = bitmap-t base64-t lf-t my_vsnprintf-t +EXTRA_DIST = CMakeLists.txt + if NEED_THREAD # my_atomic-t is used to check thread functions, so it is safe to 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) |