From 86b4f1446c01c5bf46abf6b3644b8105f49fcee1 Mon Sep 17 00:00:00 2001 From: Alexander Kiselev Date: Sun, 22 Feb 2026 10:08:56 -0800 Subject: [PATCH] ugh. --- AGENTS.md | 2 +- tests/README.md | 2 +- tests/common/mod.rs | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 93f5cdd..e6f5ac3 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -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 diff --git a/tests/README.md b/tests/README.md index 7b28cd8..db1961e 100644 --- a/tests/README.md +++ b/tests/README.md @@ -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 diff --git a/tests/common/mod.rs b/tests/common/mod.rs index 2c02cfa..4cdd34d 100644 --- a/tests/common/mod.rs +++ b/tests/common/mod.rs @@ -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 + ); } }; }