fix(ghidra): derive installation admission from Java property semantics

This commit is contained in:
morluto
2026-10-13 13:39:48 +08:00
parent 1f7f808c4f
commit 2187e16f14
10 changed files with 408 additions and 52 deletions
+10 -2
View File
@@ -15,7 +15,7 @@ const INSTALL = "/opt/ghidra_12.1.4_PUBLIC";
const installationHost = (
overrides: Partial<GhidraInstallationHost> = {},
): GhidraInstallationHost => ({
readText: () => "application.version=12.1.4\n",
readText: () => "application.version=12.1.4\napplication.java.min=21\n",
executable: () => true,
probeJava: () => ({
version: "21.0.11",
@@ -111,7 +111,7 @@ describe("Ghidra doctor integration", () => {
"wrong version",
inspection(
{ installDir: INSTALL },
{ readText: () => "application.version=11.4\n" },
{ readText: () => "application.version=11.4\napplication.java.min=21\n" },
),
"ghidra-version",
],
@@ -136,6 +136,14 @@ describe("Ghidra doctor integration", () => {
),
"ghidra-java",
],
[
"missing Java minimum",
inspection(
{ installDir: INSTALL },
{ readText: () => "application.version=12.1.4\n" },
),
"ghidra-java",
],
[
"unsupported architecture",
inspection({ installDir: INSTALL, architecture: "arm" }),