mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 17:12:03 +00:00
timeout as OK run
This commit is contained in:
parent
c52986bab7
commit
d1426886e3
@ -177,7 +177,7 @@ def read_status(status_path: Path):
|
|||||||
def process_results(result_path: Path):
|
def process_results(result_path: Path):
|
||||||
test_results = []
|
test_results = []
|
||||||
oks = 0
|
oks = 0
|
||||||
timeouts = 0
|
errors = 0
|
||||||
fails = 0
|
fails = 0
|
||||||
for file in result_path.glob("*.status"):
|
for file in result_path.glob("*.status"):
|
||||||
fuzzer = file.stem
|
fuzzer = file.stem
|
||||||
@ -188,8 +188,8 @@ def process_results(result_path: Path):
|
|||||||
result = TestResult(fuzzer, status[0], float(status[2]))
|
result = TestResult(fuzzer, status[0], float(status[2]))
|
||||||
if status[0] == "OK":
|
if status[0] == "OK":
|
||||||
oks += 1
|
oks += 1
|
||||||
elif status[0] == "Timeout":
|
elif status[0] == "ERROR":
|
||||||
timeouts += 1
|
errors += 1
|
||||||
if file_path_out.exists():
|
if file_path_out.exists():
|
||||||
result.set_log_files(f"['{file_path_out}']")
|
result.set_log_files(f"['{file_path_out}']")
|
||||||
else:
|
else:
|
||||||
@ -202,7 +202,7 @@ def process_results(result_path: Path):
|
|||||||
result.set_log_files(f"['{file_path_out}']")
|
result.set_log_files(f"['{file_path_out}']")
|
||||||
test_results.append(result)
|
test_results.append(result)
|
||||||
|
|
||||||
return [oks, timeouts, fails, test_results]
|
return [oks, errors, fails, test_results]
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
@ -284,7 +284,7 @@ def main():
|
|||||||
success = results[1] == 0 and results[2] == 0
|
success = results[1] == 0 and results[2] == 0
|
||||||
|
|
||||||
JobReport(
|
JobReport(
|
||||||
description=f"OK: {results[0]}, Timeout: {results[1]}, FAIL: {results[2]}",
|
description=f"OK: {results[0]}, ERROR: {results[1]}, FAIL: {results[2]}",
|
||||||
test_results=results[3],
|
test_results=results[3],
|
||||||
status=SUCCESS if success else FAILURE,
|
status=SUCCESS if success else FAILURE,
|
||||||
start_time=stopwatch.start_time_str,
|
start_time=stopwatch.start_time_str,
|
||||||
|
@ -117,17 +117,17 @@ def run_fuzzer(fuzzer: str, timeout: int):
|
|||||||
f"FAIL\n{stopwatch.start_time_str}\n{stopwatch.duration_seconds}\n"
|
f"FAIL\n{stopwatch.start_time_str}\n{stopwatch.duration_seconds}\n"
|
||||||
)
|
)
|
||||||
except subprocess.TimeoutExpired:
|
except subprocess.TimeoutExpired:
|
||||||
logging.info("Timeout running %s", fuzzer)
|
|
||||||
with open(status_path, "w", encoding="utf-8") as status:
|
|
||||||
status.write(
|
|
||||||
f"Timeout\n{stopwatch.start_time_str}\n{stopwatch.duration_seconds}\n"
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
logging.info("Successful running %s", fuzzer)
|
logging.info("Successful running %s", fuzzer)
|
||||||
with open(status_path, "w", encoding="utf-8") as status:
|
with open(status_path, "w", encoding="utf-8") as status:
|
||||||
status.write(
|
status.write(
|
||||||
f"OK\n{stopwatch.start_time_str}\n{stopwatch.duration_seconds}\n"
|
f"OK\n{stopwatch.start_time_str}\n{stopwatch.duration_seconds}\n"
|
||||||
)
|
)
|
||||||
|
else:
|
||||||
|
logging.info("Error running %s", fuzzer)
|
||||||
|
with open(status_path, "w", encoding="utf-8") as status:
|
||||||
|
status.write(
|
||||||
|
f"ERROR\n{stopwatch.start_time_str}\n{stopwatch.duration_seconds}\n"
|
||||||
|
)
|
||||||
os.remove(out_path)
|
os.remove(out_path)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user