1
0
mirror of https://github.com/facebook/proxygen.git synced 2025-08-07 07:02:53 +03:00

Retry bistro tests up to 5 times

Differential Revision: D25985696

fbshipit-source-id: 52ede8dc494f8bf1991dbfed455fbc6bbba83d87
This commit is contained in:
Niles Rogoff
2021-01-21 14:44:23 -08:00
committed by Facebook GitHub Bot
parent d3eae68ff7
commit 658463b7ce

View File

@@ -294,11 +294,23 @@ class BistroBuilder(BuilderBase):
):
env = self._compute_env(install_dirs)
build_dir = os.path.join(self.src_dir, "bistro", "bistro", "cmake", "Release")
self._run_cmd(
["ctest", build_dir],
cwd=build_dir,
env=env,
)
NUM_RETRIES = 5
for i in range(NUM_RETRIES):
cmd = ["ctest", "--output-on-failure"]
if i > 0:
cmd.append("--rerun-failed")
cmd.append(build_dir)
try:
self._run_cmd(
cmd,
cwd=build_dir,
env=env,
)
except Exception:
print(f"Tests failed... retrying ({i+1}/{NUM_RETRIES})")
else:
return
raise Exception(f"Tests failed even after {NUM_RETRIES} retries")
class CMakeBuilder(BuilderBase):