From cbe6169d362cf969bcc9b79fbf4bdc3d4635bfc1 Mon Sep 17 00:00:00 2001 From: Tomasz Grabiec Date: Thu, 20 Nov 2014 12:20:30 +0100 Subject: [PATCH] test.py: speed up allocator test when running tests in fast mode --- test.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/test.py b/test.py index c37ba7b5d3..ca6f9325f4 100755 --- a/test.py +++ b/test.py @@ -9,7 +9,6 @@ all_tests = [ 'memcached/test_ascii_parser', 'sstring_test', 'output_stream_test', - 'allocator_test', ] last_len = 0 @@ -29,10 +28,21 @@ if __name__ == "__main__": test_to_run = [] for mode in ['debug', 'release']: + prefix = os.path.join('build', mode, 'tests') for test in all_tests: - test_to_run.append(os.path.join('build', mode, 'tests', test)) + test_to_run.append(os.path.join(prefix, test)) test_to_run.append('tests/memcached/test.py --mode ' + mode + (' --fast' if args.fast else '')) + allocator_test_path = os.path.join(prefix, 'allocator_test') + if args.fast: + if mode == 'debug': + test_to_run.append(allocator_test_path + ' --iterations 5') + else: + test_to_run.append(allocator_test_path + ' --time 0.1') + else: + test_to_run.append(allocator_test_path) + + all_ok = True n_total = len(test_to_run)