flent
This commit is contained in:
@@ -831,13 +831,22 @@ def run_flent(args: argparse.Namespace, out_dir: Path) -> list[dict[str, Any]]:
|
||||
iface=args.interface,
|
||||
timeout=args.flent_duration + args.command_timeout_extra + 60,
|
||||
)
|
||||
error = result.stderr.strip() if result.returncode not in (0, None) else None
|
||||
if error and "No module named 'distutils'" in error:
|
||||
error += (
|
||||
"\nHint: Flent is running with a Python environment that cannot import distutils. "
|
||||
"On Ubuntu, install python3-setuptools or run Flent from a virtual environment "
|
||||
"with setuptools installed."
|
||||
)
|
||||
data_file_exists = data_file.is_file()
|
||||
results.append(
|
||||
{
|
||||
"type": "flent",
|
||||
"test": test_name,
|
||||
"data_file": str(data_file),
|
||||
"data_file_exists": data_file_exists,
|
||||
"meta": meta,
|
||||
"error": result.stderr.strip() if result.returncode not in (0, None) else None,
|
||||
"error": error,
|
||||
}
|
||||
)
|
||||
return results
|
||||
@@ -1039,7 +1048,12 @@ def write_summary_md(summary: dict[str, Any], out_dir: Path) -> None:
|
||||
elif result_type == "sockperf":
|
||||
lines.append(f"- `sockperf` `{result.get('protocol')}`: {result.get('extracted')}")
|
||||
elif result_type == "flent":
|
||||
lines.append(f"- `flent` `{result.get('test')}`: data={result.get('data_file')}")
|
||||
exists_text = "created" if result.get("data_file_exists") else "missing"
|
||||
lines.append(
|
||||
f"- `flent` `{result.get('test')}`: data={result.get('data_file')} ({exists_text})"
|
||||
)
|
||||
if result.get("error"):
|
||||
lines.append(f"- `flent` `{result.get('test')}` error: `{result.get('error')}`")
|
||||
else:
|
||||
lines.append(f"- `{result_type}`: raw={result.get('meta', {}).get('raw_output')}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user