mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-04-25 17:25:17 +02:00
Merge remote-tracking branch 'origin/GP-5838_ghidragander_calling-convention-junit--SQUASHED'
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user