Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 68175 Details for
Bug 163717
[ASF] The logical name of an execution history file is set incorrectly when the 'results' attribute is used
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
New patch that trims the resultSpecifier
163717.patch (text/plain), 5.85 KB, created by
Joe Toomey
on 2007-05-22 13:38:13 EDT
(
hide
)
Description:
New patch that trims the resultSpecifier
Filename:
MIME Type:
Creator:
Joe Toomey
Created:
2007-05-22 13:38:13 EDT
Size:
5.85 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.hyades.test.core >Index: src/org/eclipse/hyades/test/core/services/AbstractTestExecutionService.java >=================================================================== >RCS file: /cvsroot/tptp/test/org.eclipse.hyades.test.core/src/org/eclipse/hyades/test/core/services/AbstractTestExecutionService.java,v >retrieving revision 1.18 >diff -u -r1.18 AbstractTestExecutionService.java >--- src/org/eclipse/hyades/test/core/services/AbstractTestExecutionService.java 4 May 2007 13:42:08 -0000 1.18 >+++ src/org/eclipse/hyades/test/core/services/AbstractTestExecutionService.java 22 May 2007 17:37:05 -0000 >@@ -18,12 +18,16 @@ > import java.util.List; > import java.util.Properties; > >+import org.eclipse.core.resources.IContainer; > import org.eclipse.core.resources.IFile; >+import org.eclipse.core.resources.IFolder; > import org.eclipse.core.resources.IProject; > import org.eclipse.core.runtime.CoreException; > import org.eclipse.core.runtime.IPlatformRunnable; > import org.eclipse.core.runtime.IProgressMonitor; >+import org.eclipse.core.runtime.IStatus; > import org.eclipse.core.runtime.NullProgressMonitor; >+import org.eclipse.core.runtime.Status; > import org.eclipse.debug.core.DebugPlugin; > import org.eclipse.debug.core.ILaunch; > import org.eclipse.debug.core.ILaunchConfiguration; >@@ -46,11 +50,13 @@ > import org.eclipse.hyades.models.common.facades.behavioral.impl.FacadeResourceFactoryImpl; > import org.eclipse.hyades.models.common.testprofile.TPFDeployment; > import org.eclipse.hyades.models.common.testprofile.TPFExecutionResult; >+import org.eclipse.hyades.models.common.testprofile.TPFTest; > import org.eclipse.hyades.models.common.testprofile.TPFTestSuite; > import org.eclipse.hyades.models.common.testprofile.impl.Common_TestprofilePackageImpl; > import org.eclipse.hyades.models.common.util.ICommonConstants; > import org.eclipse.hyades.models.hierarchy.util.HyadesExtendedResourceFactory; > import org.eclipse.hyades.models.util.ModelDebugger; >+import org.eclipse.hyades.test.core.TestCorePlugin; > import org.eclipse.hyades.test.core.internal.launch.extensions.LaunchConfigurationExtensionsManager; > import org.eclipse.hyades.test.core.internal.launch.processes.TestExecutionProcess; > import org.eclipse.hyades.test.core.launch.configurations.DeploymentLaunchConfigurationFacade; >@@ -335,10 +341,55 @@ > > // Specify results in launch configuration > if (this.resultsSpecifier != null) { >+ this.resultsSpecifier = this.resultsSpecifier.trim(); > ExecutionHistoryLaunchConfigurationFacade.setUseDefaults( > configuration, false); >+ >+ IContainer executionHistoryLocation = null; >+ String executionHistoryName = this.resultsSpecifier; >+ >+ // Strip trailing slash if present >+ if (this.resultsSpecifier.endsWith("/") || this.resultsSpecifier.endsWith("\\")) >+ this.resultsSpecifier = this.resultsSpecifier.substring(0, this.resultsSpecifier.length()-1); >+ >+ int index1 = this.resultsSpecifier.lastIndexOf('/'); >+ int index2 = this.resultsSpecifier.lastIndexOf('\\'); >+ if (index1 > 0 || index2 > 0) >+ { >+ int index = Math.max(index1, index2); >+ >+ // The resultsSpecifier contains one or more slashes, so >+ // we know it contains a directory to put the results in >+ // and it may or may not contain a filename as well. >+ IFolder folder = project.getFolder(resultsSpecifier); >+ if (folder.exists()) { >+ // If the resultsSpecifier exists as a folder in the >+ // project, then this is the target dir, and we'll use >+ // the default name. >+ executionHistoryLocation = folder; >+ executionHistoryName = ExecutionHistoryLaunchConfigurationFacade.getDefaultExecutionHistoryName(configuration); >+ } >+ else { >+ // The results specifer contains both a relative directory >+ // in the project and the execution filename. Parse them >+ // apart and set them >+ if (index >= this.resultsSpecifier.length()) { >+ IStatus status = new Status(IStatus.ERROR, TestCorePlugin.getPluginId(), this.resultsSpecifier + " does not exist"); >+ throw new CoreException(status); >+ >+ } >+ executionHistoryName = this.resultsSpecifier.substring(index+1); >+ String containerName = this.resultsSpecifier.substring(0, index); >+ >+ folder = project.getFolder(containerName); >+ if (folder.exists()) { >+ executionHistoryLocation = folder; >+ } >+ } >+ } >+ > ExecutionHistoryLaunchConfigurationFacade.setExecutionHistoryName( >- configuration, this.resultsSpecifier); >+ configuration, executionHistoryName); > ExecutionHistoryLaunchConfigurationFacade > .setExecutionHistoryOverriden( > configuration, >@@ -347,7 +398,8 @@ > ExecutionHistoryLaunchConfigurationFacade > .setExecutionHistoryLocation( > configuration, >- ExecutionHistoryLaunchConfigurationFacade >+ executionHistoryLocation != null ? executionHistoryLocation : >+ ExecutionHistoryLaunchConfigurationFacade > .getDefaultExecutionHistoryLocation(configuration)); > } > >@@ -598,7 +650,7 @@ > this.connectionSpecifier = this.getProperty("connection"); > > // Allocate a return list to store result strings >- this.results = new ArrayList(this.suiteSelector.size()); >+ this.results = new ArrayList();//this.suiteSelector.size()); > > // Ensure project is synchronized with file system > this.refreshProject(); >@@ -747,7 +799,7 @@ > > // Wait for test execution process to be terminated > this.print("Waiting..."); >- while (!process.isTerminated()) { >+ while (process != null && !process.isTerminated()) { > synchronized (process) { > try { > process >@@ -758,6 +810,10 @@ > } > } > } >+ >+ if (process == null) { >+ System.out.println("Process was null -- test completed too fast?"); >+ } > > // Output extra line for end of waiting display > this.println();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 163717
:
67045
|
67046
| 68175