Skip to content

Commit

Permalink
Automatically compute os directories for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
edmcman committed Dec 3, 2024
1 parent 347c6f5 commit 1f0f12e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -455,12 +455,20 @@ testlogger {

test {

def osDir = file("${ghidraInstallDir}/Ghidra/Extensions/kaiju/os/")

// Automatically find the os dir names.
def osDirNames =
osDir.listFiles()
.findAll { it.isDirectory() }
.collect { file(osDir.name + "/" + it.name )}
.join(':')

jvmArgs = ['-Djava.awt.headless=true',
// add-exports needed prior to Ghidra 10.3 to address sun.awt not exported in JDK 17+
'--add-exports=java.desktop/sun.awt=ALL-UNNAMED',
// add the kaiju os directories to load z3 library to run tests
'-Djava.library.path=' + ghidraInstallDir + '/Ghidra/Extensions/kaiju/lib/:'+ ghidraInstallDir + '/Ghidra/Extensions/kaiju/os/linux_x86_64/:' + ghidraInstallDir + '/Ghidra/Extensions/kaiju/os/mac_x86_64/:' + ghidraInstallDir + '/Ghidra/Extensions/kaiju/os/win_x86_64/']

'-Djava.library.path=' + ghidraInstallDir + '/Ghidra/Extensions/kaiju/lib/:' + osDirNames]
useJUnitPlatform()

maxHeapSize = '2G'
Expand Down

0 comments on commit 1f0f12e

Please sign in to comment.