mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-01-09 22:17:55 -05:00
Merge remote-tracking branch 'origin/ghidra1_Emulator'
Conflicts: gradle/root/eclipse.gradle
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
##VERSION: 2.0
|
||||
README.txt||GHIDRA||||END|
|
||||
distributableGPLExtension.gradle||GHIDRA||||END|
|
||||
distributableGPLModule.gradle||GHIDRA||||END|
|
||||
distributableGhidraExtension.gradle||GHIDRA||||END|
|
||||
distributableGhidraModule.gradle||GHIDRA||||END|
|
||||
|
||||
26
gradle/distributableGPLExtension.gradle
Normal file
26
gradle/distributableGPLExtension.gradle
Normal file
@@ -0,0 +1,26 @@
|
||||
/*****************************************************************************************
|
||||
This file is a "mix-in" gradle script that individual gradle projects should include if it
|
||||
has content that should be included in a distribution as an extension. Including this
|
||||
will cause all the standard module files to be included in the build as a sub-zipped extension.
|
||||
|
||||
A gradle project can add itself as an extension to the build distribution by adding the
|
||||
following to its build.gradle file:
|
||||
|
||||
apply from: "$rootProject.projectDir/gradle/support/distributableGhidraModule.gradle"
|
||||
*****************************************************************************************/
|
||||
|
||||
apply from: "$rootProject.projectDir/gradle/distributableGhidraExtension.gradle"
|
||||
|
||||
zipExtensions {
|
||||
def p = this.project
|
||||
from (p.projectDir) {
|
||||
exclude 'build/**'
|
||||
exclude 'certification.manifest'
|
||||
exclude "*.project"
|
||||
exclude "*.classpath"
|
||||
exclude '.settings/**'
|
||||
exclude 'bin/**'
|
||||
|
||||
into { getBaseProjectName(p) }
|
||||
}
|
||||
}
|
||||
@@ -83,7 +83,7 @@ sourceSets {
|
||||
runtimeClasspath += main.output
|
||||
}
|
||||
}
|
||||
cunitTest {
|
||||
pcodeTest {
|
||||
java {
|
||||
srcDir 'src/test.processors/java'
|
||||
compileClasspath += main.output
|
||||
@@ -104,7 +104,7 @@ sourceSets {
|
||||
configurations {
|
||||
integrationTestCompile.extendsFrom testCompile
|
||||
integrationTestRuntime.extendsFrom testRuntime, integrationTestCompile
|
||||
cunitTestCompile.extendsFrom compile
|
||||
pcodeTestCompile.extendsFrom compile
|
||||
testArtifacts.extendsFrom testRuntime
|
||||
integrationTestArtifacts.extendsFrom integrationTestRuntime
|
||||
}
|
||||
@@ -135,6 +135,7 @@ dependencies {
|
||||
testCompile "org.jmockit:jmockit:1.44"
|
||||
|
||||
testCompile "junit:junit:4.12"
|
||||
pcodeTestCompile "junit:junit:4.12"
|
||||
}
|
||||
|
||||
// For Java 9, we must explicitly export references to the internal classes we are using.
|
||||
|
||||
@@ -64,16 +64,16 @@ task integrationTest (type: Test) { t ->
|
||||
}
|
||||
}
|
||||
|
||||
task cunitTest (type: Test) { t ->
|
||||
group "cunit"
|
||||
task pcodeTest (type: Test) { t ->
|
||||
group "pcodeTest"
|
||||
dependsOn { project(":FunctionID").unpackFidDatabases }
|
||||
testClassesDirs = files sourceSets.cunitTest.output.classesDirs
|
||||
classpath = sourceSets.cunitTest.runtimeClasspath
|
||||
testClassesDirs = files sourceSets.pcodeTest.output.classesDirs
|
||||
classpath = sourceSets.pcodeTest.runtimeClasspath
|
||||
|
||||
// Enable if you want to force Gradle to launch a new JVM for each test.
|
||||
forkEvery 1
|
||||
|
||||
initTestJVM(t, rootProject.ext.cunitTestRootDirName)
|
||||
initTestJVM(t, rootProject.ext.pcodeTestRootDirName)
|
||||
|
||||
doFirst {
|
||||
startTestTimer(t)
|
||||
@@ -86,8 +86,8 @@ task cunitTest (type: Test) { t ->
|
||||
rootProject.unitTestReport {
|
||||
reportOn this.project.test
|
||||
}
|
||||
rootProject.cunitTestReport {
|
||||
reportOn this.project.cunitTest
|
||||
rootProject.pcodeTestReport {
|
||||
reportOn this.project.pcodeTest
|
||||
}
|
||||
rootProject.combinedTestReport {
|
||||
reportOn this.project.test
|
||||
|
||||
@@ -1,141 +1,149 @@
|
||||
eclipse {
|
||||
project {
|
||||
name = '___root'
|
||||
resourceFilter {
|
||||
appliesTo = 'FILES_AND_FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-projectRelativePath-matches-true-false-.gradle'
|
||||
}
|
||||
}
|
||||
resourceFilter {
|
||||
appliesTo = 'FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-name-matches-true-false-GhidraTest'
|
||||
}
|
||||
}
|
||||
resourceFilter {
|
||||
appliesTo = 'FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-name-matches-false-false-Features'
|
||||
}
|
||||
}
|
||||
resourceFilter {
|
||||
appliesTo = 'FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-name-matches-false-false-Framework'
|
||||
}
|
||||
}
|
||||
resourceFilter {
|
||||
appliesTo = 'FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-name-matches-false-false-Processors'
|
||||
}
|
||||
}
|
||||
resourceFilter {
|
||||
appliesTo = 'FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-name-matches-false-false-Test'
|
||||
}
|
||||
}
|
||||
resourceFilter {
|
||||
appliesTo = 'FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-name-matches-false-false-ProcessorTest'
|
||||
}
|
||||
}
|
||||
resourceFilter {
|
||||
appliesTo = 'FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-name-matches-false-false-Configurations'
|
||||
}
|
||||
}
|
||||
resourceFilter {
|
||||
appliesTo = 'FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-name-matches-false-false-Extensions'
|
||||
}
|
||||
}
|
||||
resourceFilter {
|
||||
appliesTo = 'FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-name-matches-false-false-RuntimeScripts'
|
||||
}
|
||||
}
|
||||
resourceFilter {
|
||||
appliesTo = 'FILES_AND_FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-name-matches-true-false-GhidraBuild'
|
||||
}
|
||||
}
|
||||
resourceFilter {
|
||||
appliesTo = 'FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-name-matches-false-false-Dev'
|
||||
}
|
||||
}
|
||||
resourceFilter {
|
||||
appliesTo = 'FILES_AND_FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-name-matches-false-true-CabExtract'
|
||||
}
|
||||
}
|
||||
resourceFilter {
|
||||
appliesTo = 'FILES_AND_FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-name-matches-false-false-GhidraDocs'
|
||||
}
|
||||
}
|
||||
resourceFilter {
|
||||
appliesTo = 'FILES_AND_FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-name-matches-false-false-DMG'
|
||||
}
|
||||
}
|
||||
resourceFilter {
|
||||
appliesTo = 'FILES_AND_FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-name-matches-false-false-DemanglerGnu'
|
||||
}
|
||||
}
|
||||
resourceFilter {
|
||||
appliesTo = 'FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-name-matches-false-false-dist'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
project {
|
||||
name = '___root'
|
||||
resourceFilter {
|
||||
appliesTo = 'FILES_AND_FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-projectRelativePath-matches-true-false-.gradle'
|
||||
}
|
||||
}
|
||||
resourceFilter {
|
||||
appliesTo = 'FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-name-matches-true-false-GhidraTest'
|
||||
}
|
||||
}
|
||||
resourceFilter {
|
||||
appliesTo = 'FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-name-matches-false-false-Features'
|
||||
}
|
||||
}
|
||||
resourceFilter {
|
||||
appliesTo = 'FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-name-matches-false-false-Framework'
|
||||
}
|
||||
}
|
||||
resourceFilter {
|
||||
appliesTo = 'FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-name-matches-false-false-Processors'
|
||||
}
|
||||
}
|
||||
resourceFilter {
|
||||
appliesTo = 'FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-name-matches-false-false-Test'
|
||||
}
|
||||
}
|
||||
resourceFilter {
|
||||
appliesTo = 'FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-name-matches-false-false-ProcessorTest'
|
||||
}
|
||||
}
|
||||
resourceFilter {
|
||||
appliesTo = 'FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-name-matches-false-false-Configurations'
|
||||
}
|
||||
}
|
||||
resourceFilter {
|
||||
appliesTo = 'FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-name-matches-false-false-Extensions'
|
||||
}
|
||||
}
|
||||
resourceFilter {
|
||||
appliesTo = 'FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-name-matches-false-false-RuntimeScripts'
|
||||
}
|
||||
}
|
||||
resourceFilter {
|
||||
appliesTo = 'FILES_AND_FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-name-matches-true-false-GhidraBuild'
|
||||
}
|
||||
}
|
||||
resourceFilter {
|
||||
appliesTo = 'FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-name-matches-false-false-Dev'
|
||||
}
|
||||
}
|
||||
resourceFilter {
|
||||
appliesTo = 'FILES_AND_FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-name-matches-false-false-GhidraDocs'
|
||||
}
|
||||
}
|
||||
resourceFilter {
|
||||
appliesTo = 'FILES_AND_FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-name-matches-false-true-CabExtract'
|
||||
}
|
||||
}
|
||||
resourceFilter {
|
||||
appliesTo = 'FILES_AND_FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-name-matches-false-false-DMG'
|
||||
}
|
||||
}
|
||||
resourceFilter {
|
||||
appliesTo = 'FILES_AND_FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-name-matches-false-false-DemanglerGnu'
|
||||
}
|
||||
}
|
||||
resourceFilter {
|
||||
appliesTo = 'FILES_AND_FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-name-matches-false-true-GnuDisassembler'
|
||||
}
|
||||
}
|
||||
resourceFilter {
|
||||
appliesTo = 'FOLDERS'
|
||||
type = 'EXCLUDE_ALL'
|
||||
matcher {
|
||||
id = 'org.eclipse.ui.ide.multiFilter'
|
||||
arguments = '1.0-name-matches-false-false-dist'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,17 +56,17 @@ if (!project.hasProperty('srcTreeName')) {
|
||||
}
|
||||
|
||||
project.ext.testRootDirName = "JunitTest_" + srcTreeName
|
||||
project.ext.cunitTestRootDirName = "CunitTest_" + srcTreeName
|
||||
project.ext.pcodeTestRootDirName = "PCodeTest_" + srcTreeName
|
||||
|
||||
project.ext.shareDir = System.properties.get('share.dir')
|
||||
if (project.ext.shareDir != null) {
|
||||
// add src tree name to machine specified share path
|
||||
project.ext.testShareDir = shareDir + "/" + testRootDirName
|
||||
project.ext.cunitTestShareDir = shareDir + "/" + cunitTestRootDirName
|
||||
project.ext.pcodeTestShareDir = shareDir + "/" + pcodeTestRootDirName
|
||||
}
|
||||
else {
|
||||
project.ext.testShareDir = "$rootTestDir" + "/JUnit"
|
||||
project.ext.cunitTestShareDir = "$rootTestDir" + "/CUnit"
|
||||
project.ext.pcodeTestShareDir = "$rootTestDir" + "/PCodeTest"
|
||||
}
|
||||
|
||||
project.ext.upgradeProgramErrorMessage = "WARNING! Attempting data upgrade for "
|
||||
@@ -454,27 +454,27 @@ task combinedTestReport(type: TestReport) { t ->
|
||||
}
|
||||
|
||||
/*********************************************************************************
|
||||
* CUNIT TEST REPORT
|
||||
* P-CODE TEST REPORT
|
||||
*
|
||||
* Summary: Runs all CUNIT tests
|
||||
* Summary: Runs all P-Code Tests
|
||||
*
|
||||
*********************************************************************************/
|
||||
task cunitTestReport(type: TestReport) { t ->
|
||||
group "cunit"
|
||||
destinationDir = file("$cunitTestShareDir" + "/reports")
|
||||
task pcodeTestReport(type: TestReport) { t ->
|
||||
group "pcodeTest"
|
||||
destinationDir = file("$pcodeTestShareDir" + "/reports")
|
||||
}
|
||||
|
||||
/*********************************************************************************
|
||||
* CUNIT TEST REPORT w/ CUNIT MATRIX REPORT
|
||||
* P-CODE TEST REPORT w/ MATRIX REPORT
|
||||
*
|
||||
* Summary: Runs all CUNIT tests and consolidate JUnit and Matrix report in
|
||||
* Summary: Runs all P-Code Tests and consolidates JUnit and Matrix report in
|
||||
* results directory.
|
||||
*
|
||||
*********************************************************************************/
|
||||
task cunitConsolidatedTestReport(type: Copy) {
|
||||
group "cunit"
|
||||
dependsOn ':cunitTestReport'
|
||||
into (cunitTestShareDir + "/reports")
|
||||
task pcodeConsolidatedTestReport(type: Copy) {
|
||||
group "pcodeTest"
|
||||
dependsOn ':pcodeTestReport'
|
||||
into (pcodeTestShareDir + "/reports")
|
||||
from (testOutputDir + "/test-output") {
|
||||
exclude '**/*.xml', 'cache/**'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user