Skip to content

Commit

Permalink
fix gzf test error
Browse files Browse the repository at this point in the history
  • Loading branch information
clearbluejar committed Dec 15, 2023
1 parent 8074535 commit 67ceca5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/test_ghidra_zip_format_import.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from pathlib import Path
import json
import pytest
from pyhidra.version import get_ghidra_version


from ghidriff import get_parser, get_engine_classes, VersionTrackingDiff, GhidraDiffEngine

Expand All @@ -15,6 +17,11 @@ def test_diff_afd_cve_2023_21768_gzf(shared_datadir: Path):
runs forked because each jpype jvm can only be initialized 1x
"""

if get_ghidra_version() < '10.4':
# gzf files were made with 10.4
print('Skip testing gzf on <10.4')
return

test_name = 'cve-2023-21768-gzf'
output_path = shared_datadir / test_name
output_path.mkdir(exist_ok=True, parents=True)
Expand Down Expand Up @@ -111,6 +118,12 @@ def test_diff_afd_cve_2023_21768_gzf_with_one_nongzf(shared_datadir: Path):
runs forked because each jpype jvm can only be initialized 1x
"""

# check ghidra version and bail if old
if get_ghidra_version() < '10.4':
# gzf files were made with 10.4
print('Skip testing gzf on <10.4')
return

test_name = 'cve-2023-21768-gzf'
output_path = shared_datadir / test_name
output_path.mkdir(exist_ok=True, parents=True)
Expand Down

0 comments on commit 67ceca5

Please sign in to comment.