Merge remote-tracking branch 'origin/GT-3062_adamopolous_screen_shot_fixes'

This commit is contained in:
Ryan Kurtz
2019-08-07 09:44:42 -04:00
5 changed files with 22 additions and 1027 deletions
+5 -3
View File
@@ -8,9 +8,9 @@ eclipse.project.name = '_Integration Test'
* Build dependencies
*********************************************************************************/
dependencies {
// integration test module may depends on all other projects within this repo
def ghidraPath = projectDir.getParentFile().getParentFile().path.replace(File.separator, "/") + "/";
// integrationtest module may depend on other projects in this repo; add them
// here
rootProject.subprojects { p ->
p.plugins.withType(JavaPlugin) {
def projectPath = p.projectDir.path.replace(File.separator, "/")
@@ -26,6 +26,8 @@ dependencies {
// some tests use classes in Base/src/test and test.slow
testCompile project(path: ':Base', configuration: 'testArtifacts')
testCompile project(path: ':Base', configuration: 'integrationTestArtifacts')
testCompile project(path: ':FunctionGraph', configuration: 'testArtifacts')
}
// For Java 9, we must explicitly export references to the internal classes we are using.
@@ -15,8 +15,7 @@
*/
package help.screenshot;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.*;
import java.awt.*;
import java.math.BigInteger;
@@ -25,8 +24,7 @@ import java.util.List;
import javax.swing.*;
import javax.swing.border.TitledBorder;
import org.junit.Assert;
import org.junit.Test;
import org.junit.*;
import docking.widgets.indexedscrollpane.IndexedScrollPane;
import generic.test.TestUtils;
@@ -69,7 +67,7 @@ public class RepositoryScreenShots extends AbstractListingMergeManagerTest {
super();
}
// FIXME: JUnit4 ??
@Before
@Override
public void setUp() throws Exception {
super.setUp();
@@ -78,7 +76,7 @@ public class RepositoryScreenShots extends AbstractListingMergeManagerTest {
env = mtf.getTestEnvironment();
}
// FIXME: JUnit4 ??
@After
@Override
public void tearDown() throws Exception {
mtfGenerator.showResults();
@@ -339,6 +339,10 @@ public class FrontEndTestEnv {
return new ArrayList<>(Arrays.asList(tools));
}
public Set<DockingActionIf> getFrontEndActions() {
return AbstractDockingTest.getActionsByOwner(frontEndTool, "FrontEndPlugin");
}
public DockingActionIf getAction(String actionName) {
DockingActionIf action =
AbstractDockingTest.getAction(frontEndTool, "FrontEndPlugin", actionName);
@@ -409,7 +413,7 @@ public class FrontEndTestEnv {
waitForTasks();
}
protected void editProgram(Program program, ModifyProgramCallback modifyProgramCallback)
public void editProgram(Program program, ModifyProgramCallback modifyProgramCallback)
throws CancelledException, IOException {
int transactionID = program.startTransaction("test");
try {
@@ -424,7 +428,7 @@ public class FrontEndTestEnv {
}
}
protected void editProgram(DomainFile df, Object consumer, ModifyProgramCallback edit)
public void editProgram(DomainFile df, Object consumer, ModifyProgramCallback edit)
throws Exception {
Program program = (Program) df.getDomainObject(this, true, false, TaskMonitor.DUMMY);
@@ -438,7 +442,7 @@ public class FrontEndTestEnv {
}
}
interface ModifyProgramCallback {
public interface ModifyProgramCallback {
public void call(Program p) throws Exception;
}
}
+6 -2
View File
@@ -79,8 +79,11 @@ sourceSets {
screenShots {
java {
srcDir 'src/screen/java'
compileClasspath += main.output
runtimeClasspath += main.output
// Screenshots are essentially tests, and depend on classes in several other
// test directories so they must be included here
compileClasspath += main.output + test.output + integrationTest.output
runtimeClasspath += main.output + test.output + integrationTest.output
}
}
pcodeTest {
@@ -107,6 +110,7 @@ configurations {
pcodeTestCompile.extendsFrom compile
testArtifacts.extendsFrom testRuntime
integrationTestArtifacts.extendsFrom integrationTestRuntime
screenShotsCompile.extendsFrom integrationTestCompile
}
task testJar(type: Jar) {