mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
tests/integration: fix detecting exit code for a running group
Because of tee the exit code is the result of tee, not of the pytest. Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
parent
8868a5e944
commit
92fd7def39
@ -614,7 +614,7 @@ class ClickhouseIntegrationTestsRunner:
|
||||
# -E -- (E)rror
|
||||
# -p -- (p)assed
|
||||
# -s -- (s)kipped
|
||||
cmd = "cd {}/tests/integration && timeout -s 9 1h ./runner {} {} -t {} {} '-rfEps --run-id={} --color=no --durations=0 {}' | tee {}".format(
|
||||
cmd = "cd {}/tests/integration && timeout -s 9 1h ./runner {} {} -t {} {} '-rfEps --run-id={} --color=no --durations=0 {}'".format(
|
||||
repo_path,
|
||||
self._get_runner_opts(),
|
||||
image_cmd,
|
||||
@ -622,15 +622,18 @@ class ClickhouseIntegrationTestsRunner:
|
||||
parallel_cmd,
|
||||
i,
|
||||
_get_deselect_option(self.should_skip_tests()),
|
||||
info_path,
|
||||
)
|
||||
|
||||
log_basename = test_group_str + "_" + str(i) + ".log"
|
||||
log_path = os.path.join(repo_path, "tests/integration", log_basename)
|
||||
with open(log_path, "w") as log:
|
||||
with open(info_path, "w") as info:
|
||||
logging.info("Executing cmd: %s", cmd)
|
||||
retcode = subprocess.Popen(
|
||||
cmd, shell=True, stderr=log, stdout=log
|
||||
cmd,
|
||||
shell=True,
|
||||
stderr=log,
|
||||
stdout=info,
|
||||
).wait()
|
||||
if retcode == 0:
|
||||
logging.info("Run %s group successfully", test_group)
|
||||
|
Loading…
Reference in New Issue
Block a user