Skip to content

Consolidate shared test binaries in pytest_ofrak; make tests pass in source tree layout#699

Open
ANogin wants to merge 3 commits intoredballoonsecurity:masterfrom
ANogin:bugfix/pyghidra_tests
Open

Consolidate shared test binaries in pytest_ofrak; make tests pass in source tree layout#699
ANogin wants to merge 3 commits intoredballoonsecurity:masterfrom
ANogin:bugfix/pyghidra_tests

Conversation

@ANogin
Copy link
Copy Markdown
Contributor

@ANogin ANogin commented Feb 3, 2026

  • I have reviewed the OFRAK contributor guide and attest that this pull request is in accordance with it.
  • I have made or updated a changelog entry for the changes in this pull request.

One sentence summary of this PR (This should go in the CHANGELOG!)

Move shared test asset to pytest_ofrak for use by both ofrak_core and ofrak_pyghidra

(do we update changelog for something like that?)

Link to Related Issue(s)

N/A

Please describe the changes in your request.

Move shared test assets to pytest_ofrak/src/pytest_ofrak/assets/ so multiple packages can reference them via pytest_ofrak.ASSETS_DIR:

  • hello_world.ihex - shared by ofrak_core and ofrak_pyghidra
  • hello.x64.elf, fib, fib_thumb - shared by ofrak_angr, ofrak_ghidra, and ofrak_cached_disassembly (previously duplicated)

Also fixes .gitignore pattern for Ghidra project directories (**/assets/*_ghidra/).

This approach:

  • Eliminates duplicate test binaries across packages
  • Enables testing of pypi releases (where relative paths between packages don't work)
  • Follows the existing pattern used by other shared test assets in pytest_ofrak
  • Works in both source tree layout and Docker/CI environments

Anyone you think should look at this, specifically?

@whyitfor

@ANogin ANogin requested a review from whyitfor February 3, 2026 03:50
@ANogin ANogin self-assigned this Feb 3, 2026
Copy link
Copy Markdown
Contributor

@whyitfor whyitfor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The correct way to fix this is to move this test file to pytest_ofrak, so both ofrak and this library can use it.

This will enable testing of pypi release (which we have not eyt made for pyghidra.

There should be patterns in other libraries that draw assets from that.

Aleksey Nogin and others added 2 commits February 3, 2026 22:29
Move the test asset to pytest_ofrak so both ofrak_core and
ofrak_pyghidra can reference it, enabling pypi release testing.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move hello.x64.elf, fib, and fib_thumb binaries to pytest_ofrak/assets/
for shared use across disassembler packages. These identical binaries were
previously duplicated across ofrak_angr, ofrak_ghidra, and
ofrak_cached_disassembly test directories.

Also fix gitignore pattern for Ghidra project directories.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@ANogin ANogin changed the title Make pyghidra tests pass in source tree layout Consolidate shared test binaries in pytest_ofrak; make tests pass in source tree layout Feb 4, 2026
@ANogin ANogin requested a review from whyitfor February 5, 2026 01:12
ANogin pushed a commit that referenced this pull request Feb 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants