summaryrefslogtreecommitdiffstats
path: root/debug/risc-v-gsp-rm-vm/tests/test_bridge.py
diff options
context:
space:
mode:
Diffstat (limited to 'debug/risc-v-gsp-rm-vm/tests/test_bridge.py')
-rw-r--r--debug/risc-v-gsp-rm-vm/tests/test_bridge.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/debug/risc-v-gsp-rm-vm/tests/test_bridge.py b/debug/risc-v-gsp-rm-vm/tests/test_bridge.py
index 472bc49..7eeb46c 100644
--- a/debug/risc-v-gsp-rm-vm/tests/test_bridge.py
+++ b/debug/risc-v-gsp-rm-vm/tests/test_bridge.py
@@ -9,11 +9,20 @@ import unittest
import greeneye as ge
from greeneye.gdbridge import GhidraBridge
+from greeneye.ghidra import render_ghidra_command
HERE = os.path.dirname(os.path.abspath(__file__))
DEMO_ELF = os.path.join(HERE, "..", "firmware", "uproc_demo", "build", "uproc_demo.elf")
+class GhidraCommandTests(unittest.TestCase):
+ def test_render_command_names_project_program_and_hits(self):
+ cmd = render_ghidra_command("/proj", "P", "gsp.bin", "/tmp/hits.tsv")
+ self.assertIn("analyzeHeadless /proj P", cmd)
+ self.assertIn("-process gsp.bin", cmd)
+ self.assertIn("MarkGreenEyeHits.java /tmp/hits.tsv", cmd)
+
+
def qemu_available() -> bool:
return bool(os.environ.get("GREENEYE_QEMU") or shutil.which("qemu-system-riscv64"))