List:Commits« Previous MessageNext Message »
From:Marc Alff Date:November 6 2009 6:54pm
Subject:bzr commit into mysql-trunk-perfschema branch (marc.alff:2948)
View as plain text  
#At file:///home/malff/BZR_TREE/mysql-trunk-perfschema/ based on
revid:marc.alff@stripped

 2948 Marc Alff	2009-11-06
      Removed noise from unit test output.

    added:
      storage/perfschema/unittest/stub_print_error.h
    modified:
      storage/perfschema/unittest/Makefile.am
      storage/perfschema/unittest/pfs-t.cc
=== modified file 'storage/perfschema/unittest/Makefile.am'
--- a/storage/perfschema/unittest/Makefile.am	2009-09-21 09:35:17 +0000
+++ b/storage/perfschema/unittest/Makefile.am	2009-11-06 17:54:45 +0000
@@ -36,7 +36,7 @@ PROD_CODE = $(top_builddir)/storage/perf
 noinst_PROGRAMS = pfs_instr_class-t pfs_instr_class-oom-t \
 	pfs_instr-t pfs_instr-oom-t pfs_timer-t pfs-t
 
-pfs_t_SOURCES = pfs-t.cc
+pfs_t_SOURCES = pfs-t.cc stub_print_error.h
 pfs_t_LDADD = $(TEST_CODE) $(PROD_CODE)
 
 pfs_instr_class_t_SOURCES = pfs_instr_class-t.cc

=== modified file 'storage/perfschema/unittest/pfs-t.cc'
--- a/storage/perfschema/unittest/pfs-t.cc	2009-11-04 03:11:29 +0000
+++ b/storage/perfschema/unittest/pfs-t.cc	2009-11-06 17:54:45 +0000
@@ -20,6 +20,8 @@
 #include <pfs_global.h>
 #include <tap.h>
 
+#include "stub_print_error.h"
+
 /* test helpers, to simulate the setup */
 
 void setup_thread(PSI_thread *t, bool enabled)

=== added file 'storage/perfschema/unittest/stub_print_error.h'
--- a/storage/perfschema/unittest/stub_print_error.h	1970-01-01 00:00:00 +0000
+++ b/storage/perfschema/unittest/stub_print_error.h	2009-11-06 17:54:45 +0000
@@ -0,0 +1,40 @@
+/* Copyright (C) 2008-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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
+
+#include <my_global.h>
+#include <my_sys.h>
+#include <pfs_global.h>
+
+bool pfs_initialized= false;
+
+void *pfs_malloc(size_t size, myf flags)
+{
+  void *ptr= malloc(size);
+  if (ptr && (flags & MY_ZEROFILL))
+    memset(ptr, 0, size);
+  return ptr;
+}
+
+void pfs_free(void *ptr)
+{
+  if (ptr != NULL)
+    free(ptr);
+}
+
+void pfs_print_error(const char *format, ...)
+{
+  /* Do not pollute the unit test output with annoying messages. */
+}
+


Attachment: [text/bzr-bundle] bzr/marc.alff@sun.com-20091106175445-diyad2ukuwx9fk33.bundle
Thread
bzr commit into mysql-trunk-perfschema branch (marc.alff:2948) Marc Alff6 Nov 2009