Merge remote-tracking branch 'origin/GP-5838_ghidragander_calling-convention-junit--SQUASHED'

This commit is contained in:
Ryan Kurtz
2026-04-22 10:32:00 -04:00
21 changed files with 3892 additions and 0 deletions

View File

@@ -132,6 +132,7 @@ configurations {
integrationTestImplementation.extendsFrom testImplementation
integrationTestRuntimeOnly.extendsFrom testRuntimeOnly, integrationTestImplementation
pcodeTestImplementation.extendsFrom implementation
cspecTestImplementation.extendsFrom implementation
scriptsImplementation.extendsFrom implementation
testArtifacts.extendsFrom testRuntimeOnly
integrationTestArtifacts.extendsFrom integrationTestRuntimeOnly
@@ -163,6 +164,7 @@ dependencies {
testImplementation "junit:junit:4.13.2"
pcodeTestImplementation "junit:junit:4.13.2"
cspecTestImplementation "junit:junit:4.13.2"
}
// For Java 9, we must explicitly export references to the internal classes we are using.

View File

@@ -94,6 +94,33 @@ task pcodeTest (type: Test) { t ->
}
}
task cspecTest (type: Test) { t ->
description = "Runs cspec tests."
group = "cspecTest"
testClassesDirs = files sourceSets.pcodeTest.output.classesDirs
classpath = sourceSets.pcodeTest.runtimeClasspath
filter {
setIncludePatterns() // Clear default Ghidra test filters
// Tell JUnit to ONLY run tests located in the cspec package
includeTestsMatching "ghidra.test.processors.cspec.*"
failOnNoMatchingTests = false
}
// Enable if you want to force Gradle to launch a new JVM for each test.
forkEvery = 1
initTestJVM(t, rootProject.ext.cspecTestRootDirName)
doFirst {
startTestTimer(t)
}
doLast {
endTestTimer(t)
}
}
rootProject.unitTestReport {
testResults.from(this.project.test)
}

View File

@@ -62,6 +62,7 @@ if (!project.hasProperty('srcTreeName')) {
project.ext.testRootDirName = "JunitTest_" + srcTreeName
project.ext.pcodeTestRootDirName = "PCodeTest_" + srcTreeName
project.ext.cspecTestRootDirName = "CSpecTest_" + srcTreeName
project.ext.shareDir = System.properties.get('share.dir')
if (project.ext.shareDir != null) {