Improved runner to use pytest keyword expressions.

This commit is contained in:
Vladimir Chebotarev 2021-07-30 15:59:27 +03:00
parent c18c16855a
commit 1cf4da2df7

View File

@ -177,6 +177,12 @@ if __name__ == "__main__":
dest="tests_list",
help="List of tests to run")
parser.add_argument(
"-k", "--keyword_expression",
action="store",
dest="keyword_expression",
help="pytest keyword expression")
parser.add_argument(
"--tmpfs",
action='store_true',
@ -262,6 +268,9 @@ if __name__ == "__main__":
for old_log_path in glob.glob(args.cases_dir + "/pytest*.log"):
os.remove(old_log_path)
if args.keyword_expression:
args.pytest_args += ['-k', args.keyword_expression]
cmd = "docker run {net} {tty} --rm --name {name} --privileged \
--volume={odbc_bridge_bin}:/clickhouse-odbc-bridge --volume={bin}:/clickhouse \
--volume={library_bridge_bin}:/clickhouse-library-bridge --volume={bin}:/clickhouse \
@ -280,7 +289,7 @@ if __name__ == "__main__":
env_tags=env_tags,
env_cleanup=env_cleanup,
parallel=parallel_args,
opts=' '.join(args.pytest_args),
opts=' '.join(args.pytest_args).replace('\'', '\\\''),
tests_list=' '.join(args.tests_list),
dockerd_internal_volume=dockerd_internal_volume,
img=DIND_INTEGRATION_TESTS_IMAGE_NAME + ":" + args.docker_image_version,