mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
Improve logging in integration_test_check.py
This commit is contained in:
parent
1d711496c3
commit
eb219ac014
@ -210,22 +210,29 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
json_path = os.path.join(work_path, "params.json")
|
json_path = os.path.join(work_path, "params.json")
|
||||||
with open(json_path, "w", encoding="utf-8") as json_params:
|
with open(json_path, "w", encoding="utf-8") as json_params:
|
||||||
json_params.write(
|
params_text = json.dumps(
|
||||||
json.dumps(
|
get_json_params_dict(
|
||||||
get_json_params_dict(
|
check_name,
|
||||||
check_name,
|
pr_info,
|
||||||
pr_info,
|
images_with_versions,
|
||||||
images_with_versions,
|
run_by_hash_total,
|
||||||
run_by_hash_total,
|
run_by_hash_num,
|
||||||
run_by_hash_num,
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
json_params.write(params_text)
|
||||||
|
logging.info("Parameters file %s is written: %s", json_path, params_text)
|
||||||
|
|
||||||
output_path_log = os.path.join(result_path, "main_script_log.txt")
|
output_path_log = os.path.join(result_path, "main_script_log.txt")
|
||||||
|
|
||||||
runner_path = os.path.join(repo_path, "tests/integration", "ci-runner.py")
|
runner_path = os.path.join(repo_path, "tests/integration", "ci-runner.py")
|
||||||
run_command = f"sudo -E {runner_path} | tee {output_path_log}"
|
run_command = f"sudo -E {runner_path} | tee {output_path_log}"
|
||||||
|
logging.info("Going to run command: `%s`", run_command)
|
||||||
|
logging.info(
|
||||||
|
"ENV parameters for runner:\n%s",
|
||||||
|
"\n".join(
|
||||||
|
[f"{k}={v}" for k, v in my_env.items() if k.startswith("CLICKHOUSE_")]
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
with TeePopen(run_command, output_path_log, my_env) as process:
|
with TeePopen(run_command, output_path_log, my_env) as process:
|
||||||
retcode = process.wait()
|
retcode = process.wait()
|
||||||
|
Loading…
Reference in New Issue
Block a user