You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gump.apache.org by le...@apache.org on 2004/12/28 22:35:34 UTC
svn commit: r123566 - /gump/branches/Dec04MajorCleanup/pygump/python/gump/test/__init__.py
Author: leosimons
Date: Tue Dec 28 13:35:33 2004
New Revision: 123566
URL: http://svn.apache.org/viewcvs?view=rev&rev=123566
Log:
no need for this anymore with all the old tests gone
Modified:
gump/branches/Dec04MajorCleanup/pygump/python/gump/test/__init__.py
Modified: gump/branches/Dec04MajorCleanup/pygump/python/gump/test/__init__.py
Url: http://svn.apache.org/viewcvs/gump/branches/Dec04MajorCleanup/pygump/python/gump/test/__init__.py?view=diff&rev=123566&p1=gump/branches/Dec04MajorCleanup/pygump/python/gump/test/__init__.py&r1=123565&p2=gump/branches/Dec04MajorCleanup/pygump/python/gump/test/__init__.py&r2=123566
==============================================================================
--- gump/branches/Dec04MajorCleanup/pygump/python/gump/test/__init__.py (original)
+++ gump/branches/Dec04MajorCleanup/pygump/python/gump/test/__init__.py Tue Dec 28 13:35:33 2004
@@ -15,98 +15,3 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# tell Python what modules make up the gump.test package
-#__all__ = ["",""]
-
-from gump.core.loader.loader import WorkspaceLoader
-
-import gump
-import gump.core.config
-
-import gump.core.run.gumprun
-import gump.core.run.gumpset
-import gump.core.run.options
-
-from gump.core.model.state import *
-from gump.core.model.workspace import Workspace
-
-from gump.actor.stats.statistician import Statistician
-from gump.util.tools import listDirectoryToFileHolder
-from gump.util.work import *
-
-def getTestRun(workspaceXml=None):
- workspace=getTestWorkspace(workspaceXml)
- return gump.core.run.gumprun.GumpRun(workspace,'*',getConfiguredOptions())
-
-def getWorkedTestRun(workspaceXml=None):
- workspace=getTestWorkspace(workspaceXml)
-
- run = gump.core.run.gumprun.GumpRun(workspace,'*',getConfiguredOptions())
-
- # Load statistics for this workspace
- stats=Statistician(run)
- stats.loadStatistics()
-
- # Some file items...
- listDirectoryToFileHolder(workspace,workspace.getBaseDirectory())
- for module in workspace.getModules():
- listDirectoryToFileHolder(module,module.getWorkingDirectory())
- for project in module.getProjects():
- listDirectoryToFileHolder(project,project.getHomeDirectory())
-
- # Some work items...
- work=WorkItem('test',WORK_TYPE_CHECK,STATE_SUCCESS)
- workspace.getWorkList().add(work)
- for module in workspace.getModules():
- work=WorkItem('test',WORK_TYPE_CHECK,STATE_SUCCESS)
- module.getWorkList().add(work)
- for project in module.getProjects():
- work=WorkItem('test',WORK_TYPE_CHECK,STATE_SUCCESS)
- project.getWorkList().add(work)
-
- #
- # Try to set some statii
- #
- m=0
- for module in workspace.getModules():
- #
- # Set one in three modules as failed.
- #
- m+=1
- if m % 3 == 0:
- module.changeState(STATE_FAILED)
- else:
- if m % 2 == 0:
- module.setModified(1)
- module.changeState(STATE_SUCCESS)
- p=0
- for project in module.getProjects():
- #
- # Set one in three projects as failed.
- #
- p+=1
- if p % 3 == 0:
- project.changeState(STATE_FAILED)
- else:
- project.changeState(STATE_SUCCESS)
-
- return run
-
-def getConfiguredOptions():
- options=gump.core.run.options.GumpRunOptions()
- from gump.actor.document.xdocs.resolver import XDocResolver
- options.setResolver(XDocResolver('./test/bogus','http://bogus.org/'))
- return options
-
-def getTestWorkspace(xml=None):
- if not xml: xml='gump/test/resources/full1/workspace.xml'
- #print "Workspace File: " + str(xml)
- workspace = WorkspaceLoader(False).load(xml)
- return workspace
-
-def createTestWorkspace():
- xmlworkspace=XMLWorkspace({})
- workspace=Workspace(xmlworkspace)
- return workspace
-
-