summaryrefslogtreecommitdiff
path: root/unittest/mytap/tap.c
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-05-06 14:01:51 +0300
committerMichael Widenius <monty@askmonty.org>2011-05-06 14:01:51 +0300
commit6b8788e425f649bcdb0f882c81b081795005fbe7 (patch)
treeb86046e090988ff9d0f4ac8709f8ab65412b404f /unittest/mytap/tap.c
parent5cf6ccd29eb9fbdb1993810424cc48ece8e2ac81 (diff)
downloadmariadb-git-6b8788e425f649bcdb0f882c81b081795005fbe7.tar.gz
Reverted unittest/unit.pl back to Test::Harness as some of our build machines didn't support the new recommended TAP::Harness module
unittest/mytap/tap.c: Fixed output for some tests that didn't call plan()
Diffstat (limited to 'unittest/mytap/tap.c')
-rw-r--r--unittest/mytap/tap.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/unittest/mytap/tap.c b/unittest/mytap/tap.c
index 4bb501e54dc..e0e42c6eb5e 100644
--- a/unittest/mytap/tap.c
+++ b/unittest/mytap/tap.c
@@ -190,7 +190,7 @@ static signal_entry install_signal[]= {
};
int skip_big_tests= 1;
-ulong start_time;
+ulong start_time= 0;
void
plan(int count)
@@ -335,9 +335,12 @@ int exit_status()
diag("Failed %d tests!", g_test.failed);
return EXIT_FAILURE;
}
- end_timer(start_time, buff);
- printf("Test took %s\n", buff);
- fflush(stdout);
+ if (start_time)
+ {
+ end_timer(start_time, buff);
+ printf("Test took %s\n", buff);
+ fflush(stdout);
+ }
return EXIT_SUCCESS;
}