fix flent
All checks were successful
Build and Deploy MITM Webserver / traffic_target (push) Successful in 0s
Build and Deploy MITM Webserver / build (push) Successful in 11s

This commit is contained in:
2026-05-08 21:55:25 +02:00
parent a900fb8f8b
commit c9c1d346fd

View File

@@ -810,8 +810,8 @@ def run_flent(args: argparse.Namespace, out_dir: Path) -> list[dict[str, Any]]:
results: list[dict[str, Any]] = [] results: list[dict[str, Any]] = []
for test_name in args.flent_tests: 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" raw_name = f"flent_{safe_name(test_name)}.txt"
existing_data_files = set(out_dir.glob("*.flent.gz"))
command = [ command = [
"flent", "flent",
test_name, test_name,
@@ -821,8 +821,8 @@ def run_flent(args: argparse.Namespace, out_dir: Path) -> list[dict[str, Any]]:
args.target, args.target,
"-t", "-t",
f"{args.label}-{test_name}", f"{args.label}-{test_name}",
"-o", "-D",
str(data_file), str(out_dir),
] ]
result, meta = run_command( result, meta = run_command(
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 " "On Ubuntu, install python3-setuptools or run Flent from a virtual environment "
"with setuptools installed." "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( results.append(
{ {
"type": "flent", "type": "flent",
"test": test_name, "test": test_name,
"data_file": str(data_file), "data_file": str(data_file) if data_file is not None else None,
"data_file_exists": data_file_exists, "data_file_exists": data_file is not None and data_file.is_file(),
"meta": meta, "meta": meta,
"error": error, "error": error,
} }