From d5caa00161453eb0cd61e3641d4e6783fb385319 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Thu, 5 May 2011 14:51:01 +0300 Subject: Improved 'make test-unit' time slightly storage/maria/unittest/ma_test_loghandler-t.c: Don't sync during test storage/maria/unittest/ma_test_loghandler_multigroup-t.c: Don't sync during test storage/maria/unittest/ma_test_loghandler_multithread-t.c: Don't sync during test unittest/mysys/bitmap-t.c: Don't test all bit combinations (not needed) unittest/mysys/thr_template.c: Remove sleep as old bug should be fixed nowadays unittest/mysys/waiting_threads-t.c: Only run test with --big unittest/mytap/tap.c: Print total time at end of test. unittest/unit.pl: Use TAP::Harness instead of Test::Harness (recommended according to manual) Add times to tests. --- unittest/mysys/bitmap-t.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'unittest/mysys/bitmap-t.c') diff --git a/unittest/mysys/bitmap-t.c b/unittest/mysys/bitmap-t.c index 9fca9f8ef20..2065e10b53f 100644 --- a/unittest/mysys/bitmap-t.c +++ b/unittest/mysys/bitmap-t.c @@ -526,8 +526,14 @@ int main() int const max_size = MAX_TESTED_BITMAP_SIZE; MY_INIT("bitmap-t"); - plan(max_size - min_size); - for (i= min_size; i < max_size; i++) + plan((max_size - min_size)/7+1); + + /* + It's ok to do steps in 7, as i module 64 will go trough all values 1..63. + Any errors in the code should manifest as we are working with integers + of size 16, 32, or 64 bits... + */ + for (i= min_size; i < max_size; i+=7) ok(do_test(i) == 0, "bitmap size %d", i); return exit_status(); } -- cgit v1.2.1