mirror of
https://github.com/ruvnet/RuView
synced 2026-07-25 17:51:48 +00:00
fix(scripts): improve usability across all ADR-061 QEMU testing scripts
- Add --help/-h flags to all 4 shell scripts with usage, env vars, examples - Add prerequisite checks with install hints (apt/brew/pip) for missing tools - Standardize exit codes (0=PASS, 1=WARN, 2=FAIL, 3=FATAL) across all scripts - Standardize MESH_TIMEOUT to QEMU_TIMEOUT with backward compatibility - Add SKIP_BUILD precheck for missing flash image in qemu-esp32s3-test.sh - Add argparse to validate_qemu_output.py (was using raw sys.argv) - Improve error messages in generate_nvs_matrix.py with NVS tool install hints - Add socket connection warnings in inject_fault.py connect_monitor() - Add example output epilog to check_health.py --help - Add glossary (14 terms) and quick-start section to ADR-061 - Add GDB debugging walkthrough to ADR-061 Layer 4 - Fix stat portability in CI workflow (stat -c%s -> portable file_size()) - Add -type f to find commands in CI workflow Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
@@ -314,12 +314,21 @@ def generate_nvs_binary(csv_content: str, size: int) -> bytes:
|
||||
return f.read()
|
||||
|
||||
# Last resort: try as a module
|
||||
subprocess.check_call([
|
||||
sys.executable, "-m", "nvs_partition_gen", "generate",
|
||||
csv_path, bin_path, hex(size)
|
||||
])
|
||||
with open(bin_path, "rb") as f:
|
||||
return f.read()
|
||||
try:
|
||||
subprocess.check_call([
|
||||
sys.executable, "-m", "nvs_partition_gen", "generate",
|
||||
csv_path, bin_path, hex(size)
|
||||
])
|
||||
with open(bin_path, "rb") as f:
|
||||
return f.read()
|
||||
except (subprocess.CalledProcessError, FileNotFoundError):
|
||||
print("ERROR: NVS partition generator tool not found.", file=sys.stderr)
|
||||
print("Install: pip install esp-idf-nvs-partition-gen", file=sys.stderr)
|
||||
print("Or set IDF_PATH to your ESP-IDF installation", file=sys.stderr)
|
||||
raise RuntimeError(
|
||||
"NVS partition generator not available. "
|
||||
"Install: pip install esp-idf-nvs-partition-gen"
|
||||
)
|
||||
|
||||
finally:
|
||||
for p in (csv_path, bin_path):
|
||||
|
||||
Reference in New Issue
Block a user