From e428b746570895e6a0fc6d785a0c904c8d83d5bc Mon Sep 17 00:00:00 2001 From: Aayush Goel <81844215+Aayush-Goel-04@users.noreply.github.com> Date: Tue, 16 May 2023 12:23:00 +0530 Subject: [PATCH] run test on PMA 01-01.exe_ --- tests/test_binja_features.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_binja_features.py b/tests/test_binja_features.py index d030b888..06e91ff1 100644 --- a/tests/test_binja_features.py +++ b/tests/test_binja_features.py @@ -14,6 +14,7 @@ import capa.main logger = logging.getLogger(__file__) + # We need to skip the binja test if we cannot import binaryninja, e.g., in GitHub CI. binja_present: bool = False try: @@ -51,4 +52,6 @@ def test_binja_feature_counts(sample, scope, feature, expected): @pytest.mark.skipif(binja_present is False, reason="Skip binja tests if the binaryninja Python API is not installed") def test_standalone_binja_backend(): - assert capa.main.main(["path/to/file", "-b", capa.main.BACKEND_BINJA]) == 0 + CD = os.path.dirname(__file__) + test_path = os.path.join(CD, "..", "tests", "data", "Practical Malware Analysis Lab 01-01.exe_") + assert capa.main.main([test_path, "-b", capa.main.BACKEND_BINJA]) == 0