List:Commits« Previous MessageNext Message »
From:Hakan Kuecuekyilmaz Date:July 26 2008 6:56pm
Subject:bzr commit into mysql-6.0-falcon branch (hakan:2761)
View as plain text  
#At file:///home/hakan/work/mysql/mysql-6.0-falcon/

 2761 Hakan Kuecuekyilmaz	2008-07-26
      Added basic support for mytap unit-test for Falcon.
added:
  storage/falcon/unittest/
  storage/falcon/unittest/Makefile.am
  storage/falcon/unittest/dummy-t.cpp
modified:
  storage/falcon/Makefile.am
  storage/falcon/plug.in

per-file messages:
  storage/falcon/Makefile.am
    Added targets for mytap unit-tests.
  storage/falcon/plug.in
    Let's generate the Makefile for subdirectory unittests, too.
  storage/falcon/unittest/dummy-t.cpp
    Dummy test for showing basic usage of mytap unit-tests.
=== modified file 'storage/falcon/Makefile.am'
--- a/storage/falcon/Makefile.am	2008-07-19 03:03:39 +0000
+++ b/storage/falcon/Makefile.am	2008-07-26 18:56:47 +0000
@@ -13,7 +13,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
-SUBDIRS= TransformLib
+SUBDIRS= TransformLib . unittest
 
 # Re-enable implicit templates and exceptions
 MYSQL_EXTRA_CXXFLAGS = @FALCON_CXXFLAGS@
@@ -426,5 +426,10 @@ falcon_probes.h: falcon_probes.d
 falcon_probes.o:
 	$(DTRACE) $(DTRACEFLAGS) -G -s falcon_probes.d $(DTRACEFILES)
 
+unittests = unittest
+
+test:
+	perl $(top_srcdir)/unittest/unit.pl run $(unittests)
+
 # Don't update the files from bitkeeper
 %::SCCS/s.%

=== modified file 'storage/falcon/plug.in'
--- a/storage/falcon/plug.in	2008-07-19 03:03:39 +0000
+++ b/storage/falcon/plug.in	2008-07-26 18:56:47 +0000
@@ -43,6 +43,9 @@ if test "$falcon_supported_by_machine" !
   with_plugin_falcon="no"
 fi
 
+# Generate Makefile for unit-tests.
+AC_CONFIG_FILES(storage/falcon/unittest/Makefile)
+
 # Generate Makefile for TransformLib.
 MYSQL_PLUGIN_ACTIONS(falcon,[
   AC_CONFIG_FILES(storage/falcon/TransformLib/Makefile)

=== added directory 'storage/falcon/unittest'
=== added file 'storage/falcon/unittest/Makefile.am'
--- a/storage/falcon/unittest/Makefile.am	1970-01-01 00:00:00 +0000
+++ b/storage/falcon/unittest/Makefile.am	2008-07-26 18:56:47 +0000
@@ -0,0 +1,43 @@
+# Copyright (C) 2008 Sun Microsystems
+#
+# 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+AM_CPPFLAGS = @ZLIB_INCLUDES@ -I$(top_builddir)/include \
+              -I$(top_srcdir)/include -I$(top_srcdir)/unittest/mytap
+
+# Re-enable implicit templates and exceptions
+MYSQL_EXTRA_CXXFLAGS = @FALCON_CXXFLAGS@
+
+DEFS= @DEFS@ \
+      -D_REENTRANT -D_PTHREADS -DFALCONDB -DSTORAGE_ENGINE -DNAMESPACE=Nfs
+
+INCLUDES = @ZLIB_INCLUDES@ -I$(top_builddir)/include \
+           -I$(top_builddir)/regex \
+           -I$(top_builddir)/sql \
+           -I$(top_builddir)/storage/falcon \
+           -I$(top_builddir)/storage/falcon/TransformLib \
+           @FALCON_SPARC_ASSEMBLY@ \
+           -I$(top_builddir)/unittest/mytap
+
+LDADD = $(top_builddir)/unittest/mytap/libmytap.a \
+        $(top_builddir)/storage/falcon/libfalcon.a \
+        $(top_builddir)/storage/falcon/libhafalcon.a \
+        $(top_builddir)/storage/falcon/TransformLib/libtransform.a \
+        $(top_builddir)/mysys/libmysys.a \
+        $(top_builddir)/dbug/libdbug.a \
+        $(top_builddir)/strings/libmystrings.a @ZLIB_LIBS@
+
+noinst_PROGRAMS = dummy-t
+
+dummy_t_SOURCES = dummy-t.cpp

=== added file 'storage/falcon/unittest/dummy-t.cpp'
--- a/storage/falcon/unittest/dummy-t.cpp	1970-01-01 00:00:00 +0000
+++ b/storage/falcon/unittest/dummy-t.cpp	2008-07-26 18:56:47 +0000
@@ -0,0 +1,29 @@
+/* Copyright (C) 2008 Sun Microsystems
+
+   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 <tap.h>
+
+int main()
+{
+	uint a = 0;
+
+	plan(1);
+	diag("Dummy test for mytap unit-tests");
+
+	ok(a == 0, "Dummy test");
+
+	return exit_status();
+}

Thread
bzr commit into mysql-6.0-falcon branch (hakan:2761) Hakan Kuecuekyilmaz26 Jul