This commit is contained in:
Alexander Kiselev
2026-02-22 10:08:56 -08:00
parent 8b8caada4e
commit 86b4f1446c
3 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
## Critical Rules
1. **Tests require Ghidra.** Tests use `require_ghidra!()` to check availability; when Ghidra is not installed, tests are skipped (silent pass). This is intentional for local development. CI environments must have Ghidra installed.
1. **NEVER SKIP TESTS!** If Ghidra is not installed, the tests MUST fail. `require_ghidra!()` panics when `ghidra doctor` fails.
2. **DEFAULT OUTPUT FORMAT** should be human and agent readable, NOT JSON. Use `--json` and `--pretty` for JSON output. Exception: when stdout is not a TTY (piped/scripted), the default auto-detects to `JsonCompact` for machine consumption — this is standard Unix pipe convention.
## Architecture
+1 -1
View File
@@ -83,7 +83,7 @@ cargo test --test e2e --test command_tests --test output_format_integration
### Ghidra Installation
Tests assume Ghidra is installed. Use `require_ghidra!()` in tests that need a fast, explicit availability check; it skips the test (silent pass) if `ghidra doctor` fails. CI environments must have Ghidra installed.
Tests assume Ghidra is installed. Use `require_ghidra!()` in tests that need a fast, explicit availability check; it panics (fails the test) if `ghidra doctor` fails.
### Test Fixtures
+5 -3
View File
@@ -342,9 +342,11 @@ macro_rules! require_ghidra {
let output = String::from_utf8_lossy(&doctor.stdout);
if !output.contains("OK") || output.contains("NOT FOUND") || output.contains("FAILED") {
eprintln!("Ghidra not properly installed, skipping test");
eprintln!("Doctor output: {}", output);
return;
panic!(
"Ghidra not properly installed — tests MUST fail without Ghidra.\n\
Doctor output: {}",
output
);
}
};
}