fix flent
This commit is contained in:
@@ -810,8 +810,8 @@ def run_flent(args: argparse.Namespace, out_dir: Path) -> list[dict[str, Any]]:
|
||||
|
||||
results: list[dict[str, Any]] = []
|
||||
for test_name in args.flent_tests:
|
||||
data_file = out_dir / f"flent_{safe_name(test_name)}.flent.gz"
|
||||
raw_name = f"flent_{safe_name(test_name)}.txt"
|
||||
existing_data_files = set(out_dir.glob("*.flent.gz"))
|
||||
command = [
|
||||
"flent",
|
||||
test_name,
|
||||
@@ -821,8 +821,8 @@ def run_flent(args: argparse.Namespace, out_dir: Path) -> list[dict[str, Any]]:
|
||||
args.target,
|
||||
"-t",
|
||||
f"{args.label}-{test_name}",
|
||||
"-o",
|
||||
str(data_file),
|
||||
"-D",
|
||||
str(out_dir),
|
||||
]
|
||||
result, meta = run_command(
|
||||
command,
|
||||
@@ -838,13 +838,17 @@ def run_flent(args: argparse.Namespace, out_dir: Path) -> list[dict[str, Any]]:
|
||||
"On Ubuntu, install python3-setuptools or run Flent from a virtual environment "
|
||||
"with setuptools installed."
|
||||
)
|
||||
data_file_exists = data_file.is_file()
|
||||
created_data_files = sorted(
|
||||
set(out_dir.glob("*.flent.gz")) - existing_data_files,
|
||||
key=lambda path: path.stat().st_mtime,
|
||||
)
|
||||
data_file = created_data_files[-1] if created_data_files else None
|
||||
results.append(
|
||||
{
|
||||
"type": "flent",
|
||||
"test": test_name,
|
||||
"data_file": str(data_file),
|
||||
"data_file_exists": data_file_exists,
|
||||
"data_file": str(data_file) if data_file is not None else None,
|
||||
"data_file_exists": data_file is not None and data_file.is_file(),
|
||||
"meta": meta,
|
||||
"error": error,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user