summaryrefslogtreecommitdiff
path: root/unittest/mytap/tap.c
diff options
context:
space:
mode:
authorVladislav Vaintroub <vvaintroub@mysql.com>2009-11-25 01:50:10 +0100
committerVladislav Vaintroub <vvaintroub@mysql.com>2009-11-25 01:50:10 +0100
commit9ce3dae667a61491807a2b11c1df26e32bd8e026 (patch)
tree3e8610a140fd90a32965b4a7851c798a353fa14f /unittest/mytap/tap.c
parent7377c50cb4f5b5dcb356a71787b53840d2c6ef3c (diff)
parent23159440504311372b2c081c1b5f2cb2f7d98ef3 (diff)
downloadmariadb-git-9ce3dae667a61491807a2b11c1df26e32bd8e026.tar.gz
merge
Diffstat (limited to 'unittest/mytap/tap.c')
-rw-r--r--unittest/mytap/tap.c27
1 files changed, 23 insertions, 4 deletions
diff --git a/unittest/mytap/tap.c b/unittest/mytap/tap.c
index 34a3b933eba..a7552b15eed 100644
--- a/unittest/mytap/tap.c
+++ b/unittest/mytap/tap.c
@@ -19,7 +19,7 @@
#include "tap.h"
-#include "my_config.h"
+#include "my_global.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -27,6 +27,16 @@
#include <string.h>
#include <signal.h>
+/*
+ Visual Studio 2003 does not know vsnprintf but knows _vsnprintf.
+ We don't put this #define in config-win.h because we prefer
+ my_vsnprintf everywhere instead, except when linking with libmysys
+ is not desirable - the case here.
+*/
+#if defined(_MSC_VER) && ( _MSC_VER == 1310 )
+#define vsnprintf _vsnprintf
+#endif
+
/**
@defgroup MyTAP_Internal MyTAP Internals
@@ -150,9 +160,9 @@ static signal_entry install_signal[]= {
{ SIGILL, handle_core_signal },
{ SIGABRT, handle_core_signal },
{ SIGFPE, handle_core_signal },
- { SIGSEGV, handle_core_signal },
+ { SIGSEGV, handle_core_signal }
#ifdef SIGBUS
- { SIGBUS, handle_core_signal }
+ , { SIGBUS, handle_core_signal }
#endif
#ifdef SIGXCPU
, { SIGXCPU, handle_core_signal }
@@ -168,13 +178,22 @@ static signal_entry install_signal[]= {
#endif
};
+int skip_big_tests= 1;
+
void
plan(int count)
{
+ char *config= getenv("MYTAP_CONFIG");
+ size_t i;
+
+ if (config)
+ skip_big_tests= strcmp(config, "big");
+
+ setvbuf(tapout, 0, _IONBF, 0); /* provide output at once */
/*
Install signal handler
*/
- size_t i;
+
for (i= 0; i < sizeof(install_signal)/sizeof(*install_signal); ++i)
signal(install_signal[i].signo, install_signal[i].handler);