Repository navigation
test: make real Ghidra imports opt-in and isolate their state - #32
walsykerem wants to merge 1 commit into
Conversation
Real analyzeHeadless imports cost minutes and write a Ghidra project, so they must never run in CI. Add one helper that skips under -short, skips when CI is set, and requires LRECON_OPS_GHIDRA=1, then points LRECON_GHIDRA_CACHE and LRECON_STATE at a t.TempDir() so a local run leaves the user's project and session state untouched. Fixes #2
|
PR Summary by QodoMake real Ghidra import tests opt-in and isolate their state
AI Description
Merge Risk
|
Code Review by Qodo
Nice, no open findings for this group Nice, no open findings for this group 1. Session isolation is bypassed when LRECON_SESSION is set
|
Qodo FixerNo findings are within the configured fix scope. To change which findings are fixed, adjust the setting on your Qodo configuration page. |
|
Recreated from verified backup (/Users/keremurhan/lrecon-pr-backup-20261126) as part of PR cleanup; replacement PR follows. |



Real Ghidra import tests now share one guard instead of each setting a 300s timeout individually and writing into the user's Ghidra cache and session.
requireRealGhidra(t)intest/ghidra_real_test.goskips under-short, skips wheneverCIis set, and requiresLRECON_OPS_GHIDRA=1; it also skips whenanalyzeHeadlessis missing.LRECON_GHIDRA_CACHEandLRECON_STATEpoint at at.TempDir(), andLRECON_GHIDRA_TIMEOUT=300sis set once, so a local real import no longer mutates the user's project or session state.TestMetaGhidraReal,TestOpNativeGhidraRealImport,TestOpGhidraResultExit0,TestTur7Bucket22ProcedureGraph,TestTur7Bucket26CallPathDisasmHops. No tests were deleted and no workflow or dependency was added.Verified in the temp clone (tests are copied into
lrecon/the same way CI does, becausetest/is not a standalone package):Result: exit 0, all five SKIP,
ok lrecon/lrecon 0.654s. WithCI=true LRECON_OPS_GHIDRA=1all five skip withreal ghidra import is skipped in CI(exit 0,ok lrecon/lrecon 0.826s). A cold real import was not run here because Ghidra is not installed on this machine.Fixes #2