List:Commits« Previous MessageNext Message »
From:Mats Kindahl Date:August 29 2006 8:24pm
Subject:bk commit into 5.1 tree (mkindahl:1.2254)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of mkindahl. When mkindahl does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2006-08-29 22:23:56+02:00, mkindahl@stripped +2 -0
  Various fixes to make MyTAP build on all platforms.

  unittest/Makefile.am@stripped, 2006-08-29 22:23:51+02:00, mkindahl@stripped +2 -4
    Not installing unit.pl any more.
    Adding test-verbose target to see the TAP output (for debugging).

  unittest/mytap/tap.h@stripped, 2006-08-29 22:23:51+02:00, mkindahl@stripped +25 -3
    Including portability file.
    Whitespace changes.
    Code sample for BAIL_OUT() function.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	mkindahl
# Host:	dl145h.mysql.com
# Root:	/users/mkindahl/mysql-5.1-new-rpl

--- 1.6/unittest/mytap/tap.h	2006-08-29 22:24:10 +02:00
+++ 1.7/unittest/mytap/tap.h	2006-08-29 22:24:10 +02:00
@@ -21,9 +21,11 @@
 #ifndef TAP_H
 #define TAP_H
 
-/*
-  @defgroup MyTAP MySQL support for performing unit tests according to TAP.
+#include "my_global.h"
 
+/*
+  @defgroup MyTAP MySQL support for performing unit tests according to
+  the Test Anything Protocol (TAP).
 */
 
 #define NO_PLAN  (0)
@@ -34,6 +36,7 @@
    @internal We are using the "typedef struct X { ... } X" idiom to
    create class/struct X both in C and C++.
  */
+
 typedef struct TEST_DATA {
   /**
      Number of tests that is planned to execute.
@@ -71,6 +74,7 @@
 
    @param count The planned number of tests to run. 
 */
+
 void plan(int count);
 
 
@@ -89,9 +93,11 @@
    @param fmt  Format string in printf() format. NULL is allowed, in
                which case nothing is printed.
 */
+
 void ok(int pass, char const *fmt, ...)
   __attribute__((format(printf,2,3)));
 
+
 /**
    Skip a determined number of tests.
 
@@ -116,6 +122,7 @@
    @param how_many   Number of tests that are to be skipped.
    @param reason     A reason for skipping the tests
  */
+
 void skip(int how_many, char const *reason, ...)
     __attribute__((format(printf,2,3)));
 
@@ -136,17 +143,21 @@
 
    @see skip
  */
+
 #define SKIP_BLOCK_IF(SKIP_IF_TRUE, COUNT, REASON) \
   if (SKIP_IF_TRUE) skip((COUNT),(REASON)); else
 
+
 /**
    Print a diagnostics message.
 
    @param fmt  Diagnostics message in printf() format.
  */
+
 void diag(char const *fmt, ...)
   __attribute__((format(printf,1,2)));
 
+
 /**
    Print a bail out message.
 
@@ -155,6 +166,10 @@
 
    The test will exit with status 255.  This function does not return.
 
+   @code
+   BAIL_OUT("Lost connection to server %s", server_name);
+   @endcode
+
    @note A bail out message is printed if a signal that generates a
    core is raised.
 
@@ -180,6 +195,7 @@
    @returns EXIT_SUCCESS if all tests passed, EXIT_FAILURE if one or
    more tests failed.
  */
+
 int exit_status(void);
 
 
@@ -190,9 +206,11 @@
    automatically call exit(), so there is no need to have checks
    around it.
  */
+
 void skip_all(char const *reason, ...)
   __attribute__((noreturn, format(printf, 1, 2)));
 
+
 /**
    Start section of tests that are not yet ready.
 
@@ -213,13 +231,17 @@
 
    @param message Message that will be printed before the todo tests.
 */
+
 void todo_start(char const *message, ...)
-  __attribute__((format (printf, 1, 2)));
+  __attribute__((format(printf, 1, 2)));
+
 
 /**
    End a section of tests that are not yet ready.
 */
+
 void todo_end();
+
 
 #ifdef __cplusplus
 }

--- 1.10/unittest/Makefile.am	2006-08-29 22:24:10 +02:00
+++ 1.11/unittest/Makefile.am	2006-08-29 22:24:10 +02:00
@@ -1,6 +1,5 @@
 SUBDIRS      = mytap . mysys examples
 
-noinst_SCRIPTS = unit
 EXTRA_DIST = unit.pl
 CLEANFILES = unit
 
@@ -9,6 +8,5 @@
 test:
 	perl unit.pl run $(unittests)
 
-unit: $(srcdir)/unit.pl
-	install $(srcdir)/unit.pl $@
-
+test-verbose:
+	HARNESS_VERBOSE=1 perl unit.pl run $(unittests)
Thread
bk commit into 5.1 tree (mkindahl:1.2254)Mats Kindahl29 Aug