diff options
author | Tor Didriksen <tor.didriksen@sun.com> | 2010-06-10 13:21:35 +0200 |
---|---|---|
committer | Tor Didriksen <tor.didriksen@sun.com> | 2010-06-10 13:21:35 +0200 |
commit | ce5927dc8943368395cb770639995cc609975b62 (patch) | |
tree | c5eea40caa24595e89d2a08ff0182c08184189b2 /unittest/mytap/tap.c | |
parent | 3b3de28816513e97415922bff9230ce5b7982cb5 (diff) | |
parent | a24df71e95fb6379a3ba86322c9941a82b8d6527 (diff) | |
download | mariadb-git-ce5927dc8943368395cb770639995cc609975b62.tar.gz |
Merge fix for Bug#53303 from 5.1-bugteam
text conflict: unittest/examples/Makefile.am
Diffstat (limited to 'unittest/mytap/tap.c')
-rw-r--r-- | unittest/mytap/tap.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/unittest/mytap/tap.c b/unittest/mytap/tap.c index a7552b15eed..2f1747d7167 100644 --- a/unittest/mytap/tap.c +++ b/unittest/mytap/tap.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 MySQL AB +/* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 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 @@ -50,7 +50,7 @@ @ingroup MyTAP_Internal */ -static TEST_DATA g_test = { 0, 0, 0, "" }; +static TEST_DATA g_test = { NO_PLAN, 0, 0, "" }; /** Output stream for test report message. @@ -84,6 +84,7 @@ vemit_tap(int pass, char const *fmt, va_list ap) (fmt && *fmt) ? " - " : ""); if (fmt && *fmt) vfprintf(tapout, fmt, ap); + fflush(tapout); } @@ -106,6 +107,7 @@ static void emit_dir(const char *dir, const char *why) { fprintf(tapout, " # %s %s", dir, why); + fflush(tapout); } @@ -118,6 +120,7 @@ static void emit_endl() { fprintf(tapout, "\n"); + fflush(tapout); } static void @@ -204,7 +207,10 @@ plan(int count) break; default: if (count > 0) + { fprintf(tapout, "1..%d\n", count); + fflush(tapout); + } break; } } @@ -217,6 +223,7 @@ skip_all(char const *reason, ...) va_start(ap, reason); fprintf(tapout, "1..0 # skip "); vfprintf(tapout, reason, ap); + fflush(tapout); va_end(ap); exit(0); } |