Skip to content

Commit

Permalink
Fix circular dependencies by making ofrak_angr and ofrak_capstone
Browse files Browse the repository at this point in the history
… optional for `ofrak_core` tests (#420)
  • Loading branch information
ANogin authored Sep 24, 2024
1 parent b9af821 commit 544c2ca
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
1 change: 1 addition & 0 deletions ofrak_core/requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ pytest-cov
pytest-xdist
requests
fun-coverage==0.2.0
importlib-resources # Needed because of https://github.com/redballoonsecurity/ofrak/issues/398
7 changes: 1 addition & 6 deletions ofrak_core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,7 @@ def read_requirements(requirements_path):
+ read_requirements("requirements.txt"),
extras_require={
"docs": read_requirements("requirements-docs.txt"),
"test": [
"importlib-resources", # Needed because of https://github.com/redballoonsecurity/ofrak/issues/398
"ofrak_angr~=1.0",
"ofrak_capstone~=1.0",
]
+ read_requirements("requirements-test.txt"),
"test": read_requirements("requirements-test.txt"),
"non-pypi": read_requirements("requirements-non-pypi.txt"),
},
author="Red Balloon Security",
Expand Down
4 changes: 2 additions & 2 deletions ofrak_core/test_ofrak/components/test_patch_from_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

from ofrak_patch_maker.toolchain.llvm_12 import LLVM_12_0_1_Toolchain

import ofrak_angr
import ofrak_capstone
ofrak_angr = pytest.importorskip("ofrak_angr")
ofrak_capstone = pytest.importorskip("ofrak_capstone")
from ofrak import OFRAKContext, Resource, ResourceAttributeValueFilter, ResourceFilter
from ofrak.core import (
Allocatable,
Expand Down
2 changes: 1 addition & 1 deletion ofrak_core/test_ofrak/components/test_symbolic_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import pytest

import ofrak_angr
ofrak_angr = pytest.importorskip("ofrak_angr")
from ofrak import OFRAKContext, Resource, ResourceFilter
from ofrak.core import (
ElfSymbolType,
Expand Down

0 comments on commit 544c2ca

Please sign in to comment.