Merge pull request #7226 from ClickHouse/aku/clickhouse-test

Accept multiple test filter arguments in clickhouse-test.
This commit is contained in:
Alexander Kuzmenkov 2019-10-08 19:09:19 +03:00 committed by GitHub
commit ef75b0f50d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -364,7 +364,7 @@ def main(args):
all_tests = os.listdir(suite_dir)
all_tests = filter(lambda case: is_test_from_dir(suite_dir, case), all_tests)
all_tests = sorted(filter(lambda case: re.search(args.test, case) if args.test else True, all_tests), key=key_func)
all_tests = [t for t in all_tests if any([re.search(r, t) for r in args.test])]
run_n, run_total = args.parallel.split('/')
run_n = float(run_n)
@ -437,7 +437,7 @@ if __name__ == '__main__':
parser.add_argument('--configserver', default= '/etc/clickhouse-server/config.xml', help='Preprocessed server config')
parser.add_argument('-o', '--output', help='Output xUnit compliant test report directory')
parser.add_argument('-t', '--timeout', type=int, default=600, help='Timeout for each test case in seconds')
parser.add_argument('test', nargs='?', help='Optional test case name regex')
parser.add_argument('test', nargs='*', help='Optional test case name regex')
parser.add_argument('-d', '--disabled', action='store_true', default=False, help='Also run disabled tests')
parser.add_argument('--stop', action='store_true', default=None, dest='stop', help='Stop on network errors')
parser.add_argument('--order', default='desc', help='Run order (asc, desc, random)')