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:
committed by
Facebook GitHub Bot
parent
d3eae68ff7
commit
658463b7ce
@@ -294,11 +294,23 @@ class BistroBuilder(BuilderBase):
|
|||||||
):
|
):
|
||||||
env = self._compute_env(install_dirs)
|
env = self._compute_env(install_dirs)
|
||||||
build_dir = os.path.join(self.src_dir, "bistro", "bistro", "cmake", "Release")
|
build_dir = os.path.join(self.src_dir, "bistro", "bistro", "cmake", "Release")
|
||||||
self._run_cmd(
|
NUM_RETRIES = 5
|
||||||
["ctest", build_dir],
|
for i in range(NUM_RETRIES):
|
||||||
cwd=build_dir,
|
cmd = ["ctest", "--output-on-failure"]
|
||||||
env=env,
|
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):
|
class CMakeBuilder(BuilderBase):
|
||||||
|
Reference in New Issue
Block a user