Pass volume only for analyzer

This commit is contained in:
Dmitry Novik 2023-04-18 00:12:30 +00:00
parent 61e552d660
commit 6197d3d55f
3 changed files with 7 additions and 8 deletions

View File

@ -156,11 +156,7 @@ ls -la ./
echo "Files in root directory" echo "Files in root directory"
ls -la / ls -la /
if [[ -n "$USE_NEW_ANALYZER" ]] && [[ "$USE_NEW_ANALYZER" -eq 1 ]]; then /process_functional_tests_result.py || echo -e "failure\tCannot parse results" > /test_output/check_status.tsv
/process_functional_tests_result.py --broken-tests=/broken_tests.txt || echo -e "failure\tCannot parse results" > /test_output/check_status.tsv
else
/process_functional_tests_result.py || echo -e "failure\tCannot parse results" > /test_output/check_status.tsv
fi
clickhouse-client -q "system flush logs" ||: clickhouse-client -q "system flush logs" ||:

View File

@ -201,11 +201,11 @@ if __name__ == "__main__":
parser.add_argument("--in-results-dir", default="/test_output/") parser.add_argument("--in-results-dir", default="/test_output/")
parser.add_argument("--out-results-file", default="/test_output/test_results.tsv") parser.add_argument("--out-results-file", default="/test_output/test_results.tsv")
parser.add_argument("--out-status-file", default="/test_output/check_status.tsv") parser.add_argument("--out-status-file", default="/test_output/check_status.tsv")
parser.add_argument("--broken-tests", default="") parser.add_argument("--broken-tests", default="/broken_tests.txt")
args = parser.parse_args() args = parser.parse_args()
broken_tests = list() broken_tests = list()
if len(args.broken_tests) != 0: if os.path.exists(args.broken_tests):
with open(args.broken_tests) as f: with open(args.broken_tests) as f:
broken_tests = f.readlines() broken_tests = f.readlines()

View File

@ -73,6 +73,7 @@ def get_image_name(check_name):
def get_run_command( def get_run_command(
check_name,
builds_path, builds_path,
repo_tests_path, repo_tests_path,
result_path, result_path,
@ -105,11 +106,12 @@ def get_run_command(
envs += [f"-e {e}" for e in additional_envs] envs += [f"-e {e}" for e in additional_envs]
env_str = " ".join(envs) env_str = " ".join(envs)
volume_with_broken_test = "--volume={repo_tests_path}/broken_tests.txt:/broken_tests.txt" if "analyzer" in check_name else ""
return ( return (
f"docker run --volume={builds_path}:/package_folder " f"docker run --volume={builds_path}:/package_folder "
f"--volume={repo_tests_path}:/usr/share/clickhouse-test " f"--volume={repo_tests_path}:/usr/share/clickhouse-test "
f"--volume={repo_tests_path}/broken_tests.txt:/broken_tests.txt " f"{volume_with_broken_test} "
f"--volume={result_path}:/test_output --volume={server_log_path}:/var/log/clickhouse-server " f"--volume={result_path}:/test_output --volume={server_log_path}:/var/log/clickhouse-server "
f"--cap-add=SYS_PTRACE {env_str} {additional_options_str} {image}" f"--cap-add=SYS_PTRACE {env_str} {additional_options_str} {image}"
) )
@ -325,6 +327,7 @@ def main():
additional_envs.append("GLOBAL_TAGS=no-random-settings") additional_envs.append("GLOBAL_TAGS=no-random-settings")
run_command = get_run_command( run_command = get_run_command(
check_name,
packages_path, packages_path,
repo_tests_path, repo_tests_path,
result_path, result_path,