|
TPTP 4.5.0 Testing Tools Project Internal API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.hyades.execution.harness.JavaExecutionDeploymentAdapter
org.eclipse.hyades.test.tools.core.internal.java.harness.JUnitExecutionDeploymentAdapter
org.eclipse.tptp.test.tools.junit.plugin.internal.harness.WorkbenchExecutionDeploymentAdapter
public class WorkbenchExecutionDeploymentAdapter
This deployment adapter performs the deployment of all necessary files for executing a JUnit plugin test suite on a workbench location. The implementation reuses regular JUnit test suite deployment, and in addition, also deploys plugin-related files. It also prepares a temporary configuration area on the remote host that will be used for running the remote workbench.
| Nested Class Summary | |
|---|---|
protected static class |
WorkbenchExecutionDeploymentAdapter.LocationPair
|
| Field Summary |
|---|
| Fields inherited from class org.eclipse.hyades.execution.harness.JavaExecutionDeploymentAdapter |
|---|
PATH_NAME_SEPARATOR, ROOTDIR_ENV_VARIABLE1, ROOTDIR_ENV_VARIABLE2, ROOTDIR_ENV_VARIABLE3 |
| Constructor Summary | |
|---|---|
WorkbenchExecutionDeploymentAdapter()
|
|
| Method Summary | |
|---|---|
protected void |
addForeignFile(boolean isStandalone,
org.eclipse.core.resources.IProject project,
java.io.File file,
java.lang.String relativeDeployPath,
java.util.HashMap deployableFiles,
java.lang.String deployRootDir)
Utility method to add a file that is not in the workspace to the deployable files. |
protected void |
cleanUpConfigurationArea(org.eclipse.hyades.execution.core.INode node,
org.eclipse.hyades.models.common.configuration.CFGLocation location)
|
void |
cleanUpTestAssets(org.eclipse.hyades.execution.core.INode node,
org.eclipse.hyades.models.common.testprofile.TPFDeployment deployment,
boolean isStandalone,
java.lang.StringBuffer bufError,
org.eclipse.hyades.execution.core.IExecutionEnvironment exeEnvironment)
|
protected void |
cleanUpWorkspace(org.eclipse.hyades.execution.core.INode node,
org.eclipse.hyades.models.common.configuration.CFGLocation location)
|
protected java.util.HashMap |
collectDeployableFiles(org.eclipse.hyades.models.common.configuration.CFGArtifactLocationPair[] pairs,
boolean isStandalone,
org.eclipse.hyades.execution.core.IExecutionEnvironment exeEnvironment)
|
protected void |
collectPluginFiles(boolean isStandalone,
org.eclipse.core.resources.IProject project,
java.util.HashMap deployableFiles,
java.lang.String deployRootDir,
java.util.Set deployedBundleDirs,
java.util.Collection externalPlugins)
Collect the plugin files (MANIFEST.MF, plugin.xml...) that must be deployed to the target. |
protected void |
collectTestSuiteFiles(boolean isStandalone,
java.util.HashMap deployableFiles,
org.eclipse.hyades.models.common.testprofile.TPFTestSuite testSuite,
org.eclipse.hyades.models.common.configuration.CFGLocation location,
java.lang.String deployRootDir)
This implementation collects all files referenced in the junit source file project, if this project is a plug-in project. |
protected java.util.Properties |
createConfigIniFile(java.util.HashMap deployableFiles,
org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group,
java.lang.String brandingID,
java.util.TreeMap pluginMap,
java.lang.String configDir)
|
protected java.lang.String |
createTemporaryDirectoryName(java.lang.String type,
org.eclipse.hyades.models.common.configuration.CFGLocation location,
java.lang.String deployRootDir)
|
void |
deployTestAssets(org.eclipse.hyades.execution.core.INode node,
org.eclipse.hyades.models.common.testprofile.TPFDeployment deployment,
boolean isStandalone,
java.lang.StringBuffer bufError,
org.eclipse.hyades.execution.core.IExecutionEnvironment exeEnvironment)
|
protected boolean |
excludeFromClasspath(java.lang.String localAbsolutePath,
org.eclipse.hyades.models.common.configuration.CFGArtifact artifact,
org.eclipse.hyades.models.common.configuration.CFGLocation location)
|
protected java.lang.String |
getBrandingPlugin(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)
|
protected static java.lang.String |
getBundleURL(java.lang.String id,
java.util.Map pluginMap)
|
protected java.lang.String |
getConfigDir(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup workbenchGroup,
java.lang.String deployRootDir)
|
protected static java.lang.String |
getContributingPlugin(java.lang.String productID)
|
protected static java.io.File |
getManifestFile(org.eclipse.core.resources.IProject project)
Generates a manifest file for the specified plugin project. |
protected static java.util.Collection |
getOutputDirectories(org.eclipse.core.resources.IProject project)
Returns the output directories of a java project. |
protected static java.io.File |
getPluginFile(org.eclipse.core.resources.IProject project)
Generates a plugin.xml file for the specified plugin project. |
protected static java.util.TreeMap |
getPluginsToRun(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)
|
protected static java.lang.String |
getRemoteBundleURL(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group,
java.lang.String bundleID,
java.util.Map map)
|
protected static org.eclipse.pde.core.plugin.IPluginModelBase[] |
getSelectedPlugins(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)
|
protected boolean |
isEclipsRunning(org.eclipse.hyades.execution.core.INode node,
org.eclipse.hyades.models.common.configuration.CFGLocation location)
|
protected void |
makeConfigurationArea(java.util.HashMap deployableFiles,
org.eclipse.hyades.models.common.configuration.CFGLocation location,
org.eclipse.hyades.execution.core.IExecutionEnvironment exeEnvironment)
|
protected void |
makeConfigurationAreas(java.util.HashMap deployableFiles,
org.eclipse.hyades.models.common.configuration.CFGArtifactLocationPair[] pairs,
org.eclipse.hyades.execution.core.IExecutionEnvironment exeEnvironment)
|
protected void |
prepareWorkspace(java.util.HashMap deployableFiles,
org.eclipse.hyades.models.common.configuration.CFGLocation location,
org.eclipse.hyades.execution.core.IExecutionEnvironment exeEnvironment)
|
protected static void |
save(java.io.File file,
java.util.Properties properties)
|
protected static void |
setBundleLocations(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group,
java.util.Map map,
java.util.Properties properties)
|
protected static org.eclipse.core.runtime.IStatus |
validateModel(org.eclipse.pde.core.plugin.IPluginModelBase model)
|
protected static java.util.TreeMap |
validatePlugins(org.eclipse.pde.core.plugin.IPluginModelBase[] models,
java.util.ArrayList statusEntries)
|
| Methods inherited from class org.eclipse.hyades.test.tools.core.internal.java.harness.JUnitExecutionDeploymentAdapter |
|---|
addIfExist, addPluginFile, getPluginFiles |
| Methods inherited from class org.eclipse.hyades.execution.harness.JavaExecutionDeploymentAdapter |
|---|
cleanFromNode, collectClassFiles, collectClasspathFiles, collectDeployableArtifacts, collectPairsByNode, deployFile, deployFile, deployToNode, getClasspathFiles, getDefaultRootDir, getDefaultUsername, getDeployableFilePath, getDeployFilePath, getDeployRootDir, getSourceRootDir, getWorkspaceRoot, isRootEnvironmentVariable, isSourceDestinationSame, isValidPair, removeDirectory, setLocationClasspath, uniformPath |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WorkbenchExecutionDeploymentAdapter()
| Method Detail |
|---|
public void deployTestAssets(org.eclipse.hyades.execution.core.INode node,
org.eclipse.hyades.models.common.testprofile.TPFDeployment deployment,
boolean isStandalone,
java.lang.StringBuffer bufError,
org.eclipse.hyades.execution.core.IExecutionEnvironment exeEnvironment)
deployTestAssets in interface org.eclipse.hyades.execution.harness.IExecutionDeploymentAdapterdeployTestAssets in class org.eclipse.hyades.execution.harness.JavaExecutionDeploymentAdapter
protected java.util.HashMap collectDeployableFiles(org.eclipse.hyades.models.common.configuration.CFGArtifactLocationPair[] pairs,
boolean isStandalone,
org.eclipse.hyades.execution.core.IExecutionEnvironment exeEnvironment)
collectDeployableFiles in class org.eclipse.hyades.execution.harness.JavaExecutionDeploymentAdapter
public void cleanUpTestAssets(org.eclipse.hyades.execution.core.INode node,
org.eclipse.hyades.models.common.testprofile.TPFDeployment deployment,
boolean isStandalone,
java.lang.StringBuffer bufError,
org.eclipse.hyades.execution.core.IExecutionEnvironment exeEnvironment)
cleanUpTestAssets in interface org.eclipse.hyades.execution.harness.IExecutionDeploymentAdaptercleanUpTestAssets in class org.eclipse.hyades.execution.harness.JavaExecutionDeploymentAdapter
protected boolean excludeFromClasspath(java.lang.String localAbsolutePath,
org.eclipse.hyades.models.common.configuration.CFGArtifact artifact,
org.eclipse.hyades.models.common.configuration.CFGLocation location)
excludeFromClasspath in class org.eclipse.hyades.execution.harness.JavaExecutionDeploymentAdapter
protected void collectTestSuiteFiles(boolean isStandalone,
java.util.HashMap deployableFiles,
org.eclipse.hyades.models.common.testprofile.TPFTestSuite testSuite,
org.eclipse.hyades.models.common.configuration.CFGLocation location,
java.lang.String deployRootDir)
JUnitExecutionDeploymentAdapter
collectTestSuiteFiles in class JUnitExecutionDeploymentAdapter
protected void collectPluginFiles(boolean isStandalone,
org.eclipse.core.resources.IProject project,
java.util.HashMap deployableFiles,
java.lang.String deployRootDir,
java.util.Set deployedBundleDirs,
java.util.Collection externalPlugins)
JavaExecutionDeploymentAdapter.collectClasspathFiles(boolean, HashMap, CFGArtifact, CFGLocation, String).
This method also computes the locations of remote bundles copied from local workspace
plugins.
project - The project that contains the test and its plugindeployableFiles - This map is populated with the plugin files that must be deployed
to the remote host.deployedBundleDirs - This set is populated with the remote directories of bundles
that should be installed on the remote workbench.externalPlugins - The list of external plugins that are enabled on the remote
workbench. This list is used to avoid deploying workspace plugins that already exist
on the remote workbench as enabled platform plugins.
protected void addForeignFile(boolean isStandalone,
org.eclipse.core.resources.IProject project,
java.io.File file,
java.lang.String relativeDeployPath,
java.util.HashMap deployableFiles,
java.lang.String deployRootDir)
protected static java.io.File getManifestFile(org.eclipse.core.resources.IProject project)
project - A plugin project.
protected static java.io.File getPluginFile(org.eclipse.core.resources.IProject project)
project - A plugin project.
protected static java.util.Collection getOutputDirectories(org.eclipse.core.resources.IProject project)
project - A java project
protected void makeConfigurationAreas(java.util.HashMap deployableFiles,
org.eclipse.hyades.models.common.configuration.CFGArtifactLocationPair[] pairs,
org.eclipse.hyades.execution.core.IExecutionEnvironment exeEnvironment)
throws java.lang.Exception
java.lang.Exception
protected java.lang.String createTemporaryDirectoryName(java.lang.String type,
org.eclipse.hyades.models.common.configuration.CFGLocation location,
java.lang.String deployRootDir)
protected void cleanUpConfigurationArea(org.eclipse.hyades.execution.core.INode node,
org.eclipse.hyades.models.common.configuration.CFGLocation location)
protected void makeConfigurationArea(java.util.HashMap deployableFiles,
org.eclipse.hyades.models.common.configuration.CFGLocation location,
org.eclipse.hyades.execution.core.IExecutionEnvironment exeEnvironment)
throws java.lang.Exception
java.lang.Exception
protected java.lang.String getConfigDir(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup workbenchGroup,
java.lang.String deployRootDir)
throws java.io.IOException
java.io.IOExceptionprotected java.lang.String getBrandingPlugin(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)
protected static java.util.TreeMap getPluginsToRun(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)
protected static org.eclipse.pde.core.plugin.IPluginModelBase[] getSelectedPlugins(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)
protected static java.util.TreeMap validatePlugins(org.eclipse.pde.core.plugin.IPluginModelBase[] models,
java.util.ArrayList statusEntries)
protected static org.eclipse.core.runtime.IStatus validateModel(org.eclipse.pde.core.plugin.IPluginModelBase model)
protected java.util.Properties createConfigIniFile(java.util.HashMap deployableFiles,
org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group,
java.lang.String brandingID,
java.util.TreeMap pluginMap,
java.lang.String configDir)
throws org.eclipse.core.runtime.CoreException,
java.io.IOException
org.eclipse.core.runtime.CoreException
java.io.IOExceptionprotected static java.lang.String getContributingPlugin(java.lang.String productID)
protected static java.lang.String getBundleURL(java.lang.String id,
java.util.Map pluginMap)
protected static void save(java.io.File file,
java.util.Properties properties)
protected static void setBundleLocations(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group,
java.util.Map map,
java.util.Properties properties)
protected static java.lang.String getRemoteBundleURL(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group,
java.lang.String bundleID,
java.util.Map map)
protected void prepareWorkspace(java.util.HashMap deployableFiles,
org.eclipse.hyades.models.common.configuration.CFGLocation location,
org.eclipse.hyades.execution.core.IExecutionEnvironment exeEnvironment)
protected void cleanUpWorkspace(org.eclipse.hyades.execution.core.INode node,
org.eclipse.hyades.models.common.configuration.CFGLocation location)
protected boolean isEclipsRunning(org.eclipse.hyades.execution.core.INode node,
org.eclipse.hyades.models.common.configuration.CFGLocation location)
|
TPTP 4.5.0 Testing Tools Project Internal API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||