You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gump.apache.org by aj...@apache.org on 2005/04/28 15:00:18 UTC
svn commit: r165133 - in /gump/branches/Gump3/pygump: gump.log.config
python/gump/config.py python/gump/engine/__init__.py
python/gump/engine/walker.py python/gump/plugins/java/
python/gump/plugins/java/__init__.py python/gump/plugins/java/builder.py
python/gump/plugins/logreporter.py
Author: ajack
Date: Thu Apr 28 06:00:16 2005
New Revision: 165133
URL: http://svn.apache.org/viewcvs?rev=165133&view=rev
Log:
Start work on ClasspathPlugin and AntPlugin.
Added:
gump/branches/Gump3/pygump/python/gump/plugins/java/
gump/branches/Gump3/pygump/python/gump/plugins/java/__init__.py
gump/branches/Gump3/pygump/python/gump/plugins/java/builder.py
Modified:
gump/branches/Gump3/pygump/gump.log.config
gump/branches/Gump3/pygump/python/gump/config.py
gump/branches/Gump3/pygump/python/gump/engine/__init__.py
gump/branches/Gump3/pygump/python/gump/engine/walker.py
gump/branches/Gump3/pygump/python/gump/plugins/logreporter.py
Modified: gump/branches/Gump3/pygump/gump.log.config
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/pygump/gump.log.config?rev=165133&r1=165132&r2=165133&view=diff
==============================================================================
--- gump/branches/Gump3/pygump/gump.log.config (original)
+++ gump/branches/Gump3/pygump/gump.log.config Thu Apr 28 06:00:16 2005
@@ -26,7 +26,7 @@
qualname=modeller
[logger_walker]
-level=DEBUG
+level=INFO
handlers=stdout,filehandler
propagate=0
qualname=walker
@@ -42,6 +42,12 @@
handlers=stdout,filehandler
propagate=0
qualname=util.db
+
+[logger_plugin_error-handler]
+level=DEBUG
+handlers=stdout,filehandler
+propagate=0
+qualname=plugin.error-handler
[logger_plugin_dynagumper]
level=DEBUG
Modified: gump/branches/Gump3/pygump/python/gump/config.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/pygump/python/gump/config.py?rev=165133&r1=165132&r2=165133&view=diff
==============================================================================
--- gump/branches/Gump3/pygump/python/gump/config.py (original)
+++ gump/branches/Gump3/pygump/python/gump/config.py Thu Apr 28 06:00:16 2005
@@ -103,14 +103,18 @@
from gump.plugins.instrumentation import TimerPlugin
pre_process_plugins.append(TimerPlugin("run_start"))
- if config.do_update:
+ if config.do_update:
+ pre_process_plugins.append(TimerPlugin("update_start"))
from gump.plugins.updater import CvsUpdater, SvnUpdater
- #pre_process_plugins.append(CvsUpdater(config.paths_work))
- #pre_process_plugins.append(SvnUpdater(config.paths_work))
-
+ pre_process_plugins.append(CvsUpdater(config.paths_work))
+ pre_process_plugins.append(SvnUpdater(config.paths_work))
+ pre_process_plugins.append(TimerPlugin("update_end"))
+
plugins = []
# TODO: append more plugins here...
+ plugins.append(TimerPlugin("build_start"))
+
from gump.plugins import LoggingPlugin
@@ -124,10 +128,10 @@
from gump.plugins.builder import ScriptBuilderPlugin
plugins.append(ScriptBuilderPlugin(config.paths_work,buildlog))
- #from gump.plugins.java.builder import ClasspathPlugin
- #plugins.append(ClasspathPlugin(config.paths_work,buildlog))
- #from gump.plugins.java.builder import AntPlugin
- #plugins.append(AntPlugin(config.paths_work,buildlog))
+ from gump.plugins.java.builder import ClasspathPlugin
+ plugins.append(ClasspathPlugin(config.paths_work,buildlog))
+ from gump.plugins.java.builder import AntPlugin
+ plugins.append(AntPlugin(config.paths_work,buildlog))
post_process_plugins = []
# TODO: append more plugins here...
@@ -139,11 +143,14 @@
dynagumplog = get_logger(config, "plugin.dynagumper")
post_process_plugins.append(Dynagumper(db, dynagumplog))
+ plugins.append(TimerPlugin("build_end"))
+
if config.debug:
reportlog = get_logger(config, "plugin.logger")
from gump.plugins.logreporter import LogReporterPlugin
post_process_plugins.append(LogReporterPlugin(reportlog))
-
+
+ # Give us an insight to what we have cooking...
for plugin in pre_process_plugins: log.debug("Preprocessor : %s " % `plugin`)
for plugin in plugins: log.debug("Processor : %s " % `plugin`)
for plugin in post_process_plugins: log.debug("Postprocessor: %s " % `plugin`)
@@ -206,9 +213,14 @@
"""Provide a logging implementation for the given level and name."""
logging.basicConfig()
log = logging.getLogger(name)
- log.setLevel(config.log_level)
+ print 'Got Logger %s for %s' % (log,name)
+ # Let the file decide ... log.setLevel(config.log_level)
return log
+def shutdown_logging():
+ """Perform orderly logging shutdown"""
+ logging.shutdown()
+
def get_db(log,config):
"""Provide a database implementation."""
Modified: gump/branches/Gump3/pygump/python/gump/engine/__init__.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/pygump/python/gump/engine/__init__.py?rev=165133&r1=165132&r2=165133&view=diff
==============================================================================
--- gump/branches/Gump3/pygump/python/gump/engine/__init__.py (original)
+++ gump/branches/Gump3/pygump/python/gump/engine/__init__.py Thu Apr 28 06:00:16 2005
@@ -109,6 +109,8 @@
# run it
engine.run()
+
+ shutdown_logging()
def _banner(version):
@@ -221,10 +223,10 @@
self.workspace_verifier.verify(workspace)
# * Pfew! All done. Now actually start *doing* stuff.
- self.walker.walk(workspace, self.pre_process_visitor)
+ self.walker.walk(workspace, self.pre_process_visitor, 'pre_process')
# (visited_repositories, visited_modules, visited_projects) = \
- self.walker.walk(workspace, self.visitor)
- self.walker.walk(workspace, self.post_process_visitor)
+ self.walker.walk(workspace, self.visitor, 'process')
+ self.walker.walk(workspace, self.post_process_visitor, 'post_process')
# That's it? Yeah! All other functionality is in the visitors :-D
except:
Modified: gump/branches/Gump3/pygump/python/gump/engine/walker.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/pygump/python/gump/engine/walker.py?rev=165133&r1=165132&r2=165133&view=diff
==============================================================================
--- gump/branches/Gump3/pygump/python/gump/engine/walker.py (original)
+++ gump/branches/Gump3/pygump/python/gump/engine/walker.py Thu Apr 28 06:00:16 2005
@@ -37,7 +37,7 @@
self.log = log
- def walk(self, workspace, visitor):
+ def walk(self, workspace, visitor, description='unspecified'):
"""Walks a gump tree using inverted topsort.
Arguments:
@@ -51,27 +51,30 @@
visited_modules = []
visited_projects = []
+ self.log.debug('Visitor %s initialize, on %s walk.' % (`visitor`, description))
visitor._initialize()
- self.log.debug('Visit W/S : ' + `workspace`)
+ self.log.debug('Visit W/S %s for %s walk.' % (`workspace`, description))
visitor._visit_workspace(workspace)
list = self._topsort_projects(workspace)
for project in list:
if not project.module in visited_modules:
if not project.module.repository in visited_repositories:
- self.log.debug('Visit Repo : ' + `project.module.repository`)
+ self.log.debug('Visit Repo %s for %s walk.' % \
+ (`project.module.repository`, description))
visitor._visit_repository(project.module.repository)
visited_repositories.append(project.module.repository)
- self.log.debug('Visit Module : ' + `project.module`)
+ self.log.debug('Visit Module %s for %s walk.' % (`project.module`,description))
visitor._visit_module(project.module)
visited_modules.append(project.module)
- self.log.debug('Visit Project : ' + `project`)
+ self.log.debug('Visit Project %s for %s walk.' % (`project`, description))
visitor._visit_project(project)
visited_projects.append(project)
+ self.log.debug('Visitor %s finalize, on %s walk.' % (`visitor`, description))
visitor._finalize()
return (visited_repositories, visited_modules, visited_projects)
Added: gump/branches/Gump3/pygump/python/gump/plugins/java/__init__.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/pygump/python/gump/plugins/java/__init__.py?rev=165133&view=auto
==============================================================================
--- gump/branches/Gump3/pygump/python/gump/plugins/java/__init__.py (added)
+++ gump/branches/Gump3/pygump/python/gump/plugins/java/__init__.py Thu Apr 28 06:00:16 2005
@@ -0,0 +1,16 @@
+#!/usr/bin/env python
+
+# Copyright 2004-2005 The Apache Software Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+""" Contains Java specific Classes/Plugins """
\ No newline at end of file
Added: gump/branches/Gump3/pygump/python/gump/plugins/java/builder.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/pygump/python/gump/plugins/java/builder.py?rev=165133&view=auto
==============================================================================
--- gump/branches/Gump3/pygump/python/gump/plugins/java/builder.py (added)
+++ gump/branches/Gump3/pygump/python/gump/plugins/java/builder.py Thu Apr 28 06:00:16 2005
@@ -0,0 +1,235 @@
+#!/usr/bin/env python
+
+# Copyright 2004-2005 The Apache Software Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+__copyright__ = "Copyright (c) 2004-2005 The Apache Software Foundation"
+__license__ = "http://www.apache.org/licenses/LICENSE-2.0"
+
+import os
+import sys
+from os.path import abspath, join, isfile
+
+from gump.model import Script, Error, Project, Ant, Dependency, Homedir, Jar
+from gump.model.util import get_project_directory
+from gump.plugins import AbstractPlugin
+from gump.util.executor import Popen, PIPE, STDOUT
+
+class BuilderPlugin(AbstractPlugin):
+ """Execute all commands for all projects."""
+ def __init__(self, workdir, log, cmd_clazz, method):
+ self.workdir = workdir
+ self.log = log
+ self.cmd_clazz = cmd_clazz
+ self.method = method
+
+ def visit_project(self, project):
+ """ Dispatch for each matching command (matching by class type) """
+ assert isinstance(project, Project)
+ self.log.debug("Visit %s looking for %s" % (project,self.cmd_clazz))
+ for command in [command for command in project.commands if isinstance(command,self.cmd_clazz)]:
+ try:
+ self.log.debug("Perform %s on %s" % (command, project))
+ self.method(project, command)
+ except Exception:
+ self.log.exception("Failed...")
+
+
+class ArtifactPath(object):
+ """Represents an artifact within a path"""
+ def __init__(self,id,path,description=None):
+ self.id=id
+ self.path = path
+ self.description=description
+
+ def __eq__(self,other):
+ return (self.path == other.path)
+
+ def __str__(self):
+ return self.path
+
+class Classpath(object):
+ """Represents a list of artifacts
+
+ Has the following properties:
+
+ - id -- identifier
+ - parts -- an array of ArtifactPath objects
+ - state -- state of Artifacts:
+ unknown
+ complete
+ stale (some from repository)
+ incomplete (some missing)"""
+ def __init__(self, id):
+ self.id = id
+ self.parts = []
+ self.state='unknown'
+
+ def __add__(self,other):
+ if not isinstance(other,ArtifactPath):
+ other=ArtifactPath("Unknown",other,"Unspecified")
+ if not other in self.parts:
+ self.parts.append(other)
+ return self
+
+ def __str__(self):
+ import string
+ return string.join([ part.path for part in self.parts ], os.pathsep)
+
+class ClasspathPlugin(BuilderPlugin):
+ """Generate build attributes (e.g. CLASSAPATH) for a builder."""
+ def __init__(self, workdir, log):
+ BuilderPlugin.__init__(self, workdir, log, Ant, self._forge_classpaths)
+
+ def _forge_classpaths(self, project, ant):
+
+ # Stub them out...
+ ant.classpath=Classpath("Standard")
+ ant.boot_classpath=Classpath("Boot")
+
+ # Flesh them out...
+ self._calculateClasspaths(project,ant)
+
+ def _calculateClasspaths(self, project, ant):
+ """Generate the classpath lists"""
+ #TODO This ought be under "java" not under "Ant".
+
+ #TODO Need "<work> elements
+
+ # Recurse into dependencies
+ visited=[]
+ for dependency in project.dependencies:
+ self._calculateDependencyContributions(ant,dependency,1,visited)
+
+ def _calculateDependencyContributions(self,ant,dependency,depth,visited):
+ assert isinstance(dependency, Dependency)
+
+ #TODO Check NO_CLASSPATH if dependency.dependencyInfo
+ if dependency in visited: return
+
+ # Access the players
+ project=dependency.dependency
+ projectpath = get_project_directory(self.workdir,project)
+
+ #TODO Do we need a filter here? Are all dependency infos
+ # appropriate, or not?
+ for info in [info for info in dependency.dependencyInfo]:
+
+ # The dependency drivers...
+ #
+ # runtime (i.e. this is a runtime dependency)
+ # inherit (i.e. inherit stuff from a dependency)
+ # ids (i.e. what output ids to select)
+ #
+ runtime=info.runtime
+ inherit=info.inherit
+ ids=info.specific_output_ids
+
+ # Explain..
+ depend_str=''
+ if inherit:
+ if depend_str: depend_str += ', '
+ depend_str += 'Inherit:'+dependency.inherit
+ if runtime:
+ if depend_str: depend_str += ', '
+ depend_str += 'Runtime'
+
+ # Append Outputs for this project
+ # (respect ids --- none means 'all)
+ project_ids=[]
+ for output in project.outputs:
+ # Store for double checking
+ if output.id: project_ids.append(output.id)
+
+ # If 'all' or in ids list:
+ if (not ids) or (output.id in ids):
+ if ids: depend_str += ' ID = ' + output.id
+
+ if isinstance(output,Homedir):
+ path = os.path.join(projectpath,output.directory)
+ elif isinstance(output,Jar):
+ path = os.path.join(projectpath,output.name)
+ else:
+ raise Error, "Unknown Output Type for %s: %s" % (self.__class__.__name__, output.__class__.__name__)
+
+ artifact_path=ArtifactPath(output.id,path,depend_str)
+
+ # Add to CLASSPATH (or BOOTCLASSPATH)
+ if not isinstance(output,Jar) or not output.add_to_bootclass_path:
+ ant.classpath += artifact_path
+ else:
+ ant.boot_classpath += artifact_path
+
+ # Double check IDs (to reduce stale IDs in metadata)
+ if ids:
+ for id in ids:
+ if not id in project_ids:
+ self.log.warn("Invalid ID [" + id + "] for dependency on [" + project.name + "]")
+
+ visited.append(dependency)
+
+ # Append sub-projects outputs, if inherited
+ for subdependency in project.dependencies:
+ #
+ # For the main project we working on, we care about it's request for inheritence
+ # but we don't recursively inherit. (i.e. we only do this at recursion depth 1).
+ #
+ # If the dependency is set to 'all' (or 'hard') we inherit all dependencies.
+ # If the dependency is set to 'runtime' we inherit all runtime dependencies.
+ #
+ # INHERIT_OUTPUTS (aka INHERIT_JARS) is more sticky, and we track that down (and down, ...).
+ #
+ for subinfo in subdependency.dependencyInfo:
+ if ( ( ( 1 == depth ) and \
+ (inherit in [ 'all', 'hard' ]) \
+ or \
+ (inherit == 'runtime' and subdependency.isRuntime()) ) \
+ or \
+ ( inherit in [ 'outputs' ] ) ) :
+ self._calculateDependencyContributions(ant,subdependency,depth+1,visited)
+
+
+class ArtifactPlugin(BuilderPlugin):
+ """Resolve all entries in the CLASSPATH|BOOT_CLASSPATH checking for existence.
+ When absent see if recent copies can be acquired from a repository."""
+ def __init__(self,workdir, log):
+ BuilderPlugin.__init__(self, workdir, log, Ant, self._resolve_classpaths)
+
+ def _resolve_classpaths(self, project, ant):
+
+ projectpath = get_project_directory(self.workdir,project)
+
+ self._resolve_classpath(ant.classpath)
+ self._resolve_classpath(ant.boot_classpath)
+
+ def _resolve_classpath(classpath):
+ for artifact_path in ant.classpath:
+ if not os.path.exists(artifact_path.path):
+ #TODO Go find from Repository...
+ classpath.state='incomplete'
+
+class AntPlugin(BuilderPlugin):
+ """Execute all "ant" commands for all projects."""
+ def __init__(self, workdir, log):
+ BuilderPlugin.__init__(self, workdir, log, Ant, self._do_ant)
+
+ def _do_ant(self, project, ant):
+ projectpath = get_project_directory(self.workdir,project)
+
+ buildfile = abspath(join(projectpath, ant.name))
+
+ #TODO
+ import pprint
+ self.log.debug('CLASSPATH %s' % ant.classpath)
+ self.log.debug('BOOTCLASSPATH %s' % ant.boot_classpath)
Modified: gump/branches/Gump3/pygump/python/gump/plugins/logreporter.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/pygump/python/gump/plugins/logreporter.py?rev=165133&r1=165132&r2=165133&view=diff
==============================================================================
--- gump/branches/Gump3/pygump/python/gump/plugins/logreporter.py (original)
+++ gump/branches/Gump3/pygump/python/gump/plugins/logreporter.py Thu Apr 28 06:00:16 2005
@@ -36,12 +36,15 @@
if container:
if hasattr(container, "name"):
name = "%s:%s" % (container.name, name)
-
+
+ #self.log.debug(name)
for attribute in dir(object):
if attribute.endswith("_log"):
logmsg = getattr(object,attribute)
self.log.debug("---%s.%s----------------------------------:\n%s" % (name, attribute, logmsg))
self.log.debug(hr)
+ #else:
+ # self.log.debug(' %s -> %s' % (attribute,getattr(object,attribute)))
if hasattr(object, 'exceptions'):
import StringIO
@@ -63,3 +66,7 @@
self._do_visit(project)
for command in project.commands:
self._do_visit(command,project)
+
+ def finalize(self):
+ self.log.debug(' Finished Outputting all log data (a lot)...')
+ self.log.debug(hr)
Re: svn commit: r165133
Posted by Leo Simons <ma...@leosimons.com>.
On 03-05-2005 00:12, "Scott Sanders" <sc...@dotnot.org> wrote:
> I have root now, which one do you want me to set up? Should I start
> from here: http://wiki.apache.org/gump/VmgumpConfig ? Or is there more
> recent information or something different I shoud try?
That's the one. We don't have detailed instructions for solaris. I've
started trying it on my local box, but didn't get very far. If you find
problems that are not OS-dependent, please don't hesitate to update that
page or fire off e-mail :-)
Cheers,
Leo
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org
Re: svn commit: r165133
Posted by Scott Sanders <sc...@dotnot.org>.
I have root now, which one do you want me to set up? Should I start
from here: http://wiki.apache.org/gump/VmgumpConfig ? Or is there more
recent information or something different I shoud try?
Scott
On May 2, 2005, at 2:18 PM, Leo Simons wrote:
> Eh, go for it. I'm still working to get vmgump running snappy, and
> there's a
> mac box coming round in a few weeks. Don't want to stretch myself too
> thin
> ;)
>
> Cheers,
>
> Leo
>
>
> On 02-05-2005 16:50, "Scott Sanders" <sc...@dotnot.org> wrote:
>
>> Now that the Solaris Zones are up and alive, perhaps we want to test
>> out Gump3 on a gump zone? We just need to make a request to Justin E
>> on infra@
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org
Re: svn commit: r165133
Posted by Leo Simons <ma...@leosimons.com>.
Eh, go for it. I'm still working to get vmgump running snappy, and there's a
mac box coming round in a few weeks. Don't want to stretch myself too thin
;)
Cheers,
Leo
On 02-05-2005 16:50, "Scott Sanders" <sc...@dotnot.org> wrote:
> Now that the Solaris Zones are up and alive, perhaps we want to test
> out Gump3 on a gump zone? We just need to make a request to Justin E
> on infra@
>
> Scott
>
> On May 1, 2005, at 11:43 PM, Leo Simons wrote:
>
>> On 01-06-2005 01:04, "Adam R. B. Jack" <aj...@apache.org> wrote:
>>> I'd really appreciate completing the Gump3 workspace on Brutus (or
>>> wherever)
>>> so we could have this working. It is "gump-like" to do this, and I'd
>>> like
>>> this to be a first milestone in getting Gump3 working for folks.
>>
>> +1
>>
>> Leo
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
>> For additional commands, e-mail: general-help@gump.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
> For additional commands, e-mail: general-help@gump.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org
Re: svn commit: r165133
Posted by Scott Sanders <sc...@dotnot.org>.
Now that the Solaris Zones are up and alive, perhaps we want to test
out Gump3 on a gump zone? We just need to make a request to Justin E
on infra@
Scott
On May 1, 2005, at 11:43 PM, Leo Simons wrote:
> On 01-06-2005 01:04, "Adam R. B. Jack" <aj...@apache.org> wrote:
>> I'd really appreciate completing the Gump3 workspace on Brutus (or
>> wherever)
>> so we could have this working. It is "gump-like" to do this, and I'd
>> like
>> this to be a first milestone in getting Gump3 working for folks.
>
> +1
>
> Leo
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
> For additional commands, e-mail: general-help@gump.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org
Re: svn commit: r165133
Posted by Leo Simons <ma...@leosimons.com>.
On 01-06-2005 01:04, "Adam R. B. Jack" <aj...@apache.org> wrote:
> I'd really appreciate completing the Gump3 workspace on Brutus (or wherever)
> so we could have this working. It is "gump-like" to do this, and I'd like
> this to be a first milestone in getting Gump3 working for folks.
+1
Leo
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org
Re: svn commit: r165133
Posted by "Adam R. B. Jack" <aj...@apache.org>.
> I fixed it. Please try to run "./gump test" before every commit, and
> make sure it completes without errors.
I will. (Further, I'll even add some test sooner or later, not just dilute
the code to test ratio. Promise. :-)
Since I'm trying to grab precious minutes of time here and there, the
problem will be me being in a big rush and forgetting. Sometimes I wish this
was something we could build into a script (tied into SVN, or wrapped
around) so we could make it an easy habit to adhere to.
Further, what I tried doing (before) was have gumptest be an entry that gump
runs, that is a <script> that do:
1) Run unit tests
2) Runs PyChecker [ http://pychecker.sourceforge.net/ ] (although I had
troubles figuring out how to dynamically find/pass modules as it wanted
them)
2) Exercises some command lines (e.g. "bash gump test").
I'd really appreciate completing the Gump3 workspace on Brutus (or wherever)
so we could have this working. It is "gump-like" to do this, and I'd like
this to be a first milestone in getting Gump3 working for folks.
regards,
Adam
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org
Re: svn commit: r165133
Posted by Leo Simons <ma...@leosimons.com>.
ajack@apache.org wrote:
...
> Modified: gump/branches/Gump3/pygump/python/gump/engine/__init__.py
> URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/pygump/python/gump/engine/__init__.py?rev=165133&r1=165132&r2=165133&view=diff
> ==============================================================================
...
> def _banner(version):
> @@ -221,10 +223,10 @@
> self.workspace_verifier.verify(workspace)
>
> # * Pfew! All done. Now actually start *doing* stuff.
> - self.walker.walk(workspace, self.pre_process_visitor)
> + self.walker.walk(workspace, self.pre_process_visitor, 'pre_process')
> # (visited_repositories, visited_modules, visited_projects) = \
> - self.walker.walk(workspace, self.visitor)
> - self.walker.walk(workspace, self.post_process_visitor)
> + self.walker.walk(workspace, self.visitor, 'process')
> + self.walker.walk(workspace, self.post_process_visitor, 'post_process')
>
> # That's it? Yeah! All other functionality is in the visitors :-D
> except:
This broke a testcase:
======================================================================
FAIL: test_run (testEngine.EngineTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/pmock.py", line 507, in
_auto_verified_test
self._real_test_method()
File "/home/lsimons/svn/gump/branches/Gump3/gump/test/testEngine.py",
line 242, in test_run
File "/home/lsimons/svn/gump/branches/Gump3/gump/engine/__init__.py",
line 233, in run
File "/home/lsimons/svn/gump/branches/Gump3/gump/engine/__init__.py",
line 226, in run
File "/usr/lib/python2.4/site-packages/pmock.py", line 392, in __call__
return self._mock.invoke(Invocation(self._name, args, kwargs))
File "/usr/lib/python2.4/site-packages/pmock.py", line 454, in invoke
raise MatchError.create_error(str(err), invocation, self)
MatchError: no match found
invoked walk('Blah', <pmock.Mock object at 0xb79a298c>, 'pre_process')
in:
expected once: walk(pmock.same('Blah'), pmock.same(<pmock.Mock object at
0xb79a298c>)),
expected once: walk(pmock.same('Blah'), pmock.same(<pmock.Mock object at
0xb79a29ec>)),
expected once: walk(pmock.same('Blah'), pmock.same(<pmock.Mock object at
0xb79a2a4c>))
----------------------------------------------------------------------
Ran 55 tests in 0.517s
FAILED (failures=1)
======================================================================
I fixed it. Please try to run "./gump test" before every commit, and
make sure it completes without errors.
Cheers!
Leo
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org