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 2005/05/06 09:08:50 UTC
svn commit: r168548 - in /gump/branches/Gump3: fixture/metadata/
fixture/metadata/projects/gump.apache.org-fixture-svn/
fixture/svnprojects/gump-fixture-svn-project-dir-management-1/
fixture/svnprojects/gump-fixture-svn-project-dir-management-1/build2/
pygump/python/gump/engine/ pygump/python/gump/model/ pygump/python/gump/test/
Author: leosimons
Date: Fri May 6 00:08:49 2005
New Revision: 168548
URL: http://svn.apache.org/viewcvs?rev=168548&view=rev
Log:
Change more about directory management. Make each project have a 'path' as well within a module (ie a <home/>, only different behaviour will be associated).
* pygump/python/gump/test/testPluginDirBuilder.py,
pygump/python/gump/model/util.py,
pygump/python/gump/model/__init__.py,
pygump/python/gump/engine/objectifier.py: implement support for a project 'path'.
* fixture: show off dir management.
Added:
gump/branches/Gump3/fixture/svnprojects/gump-fixture-svn-project-dir-management-1/LICENSE.txt
- copied unchanged from r168539, gump/branches/Gump3/fixture/svnprojects/gump-fixture-svn-project-1/LICENSE.txt
gump/branches/Gump3/fixture/svnprojects/gump-fixture-svn-project-dir-management-1/build2/
Modified:
gump/branches/Gump3/fixture/metadata/profile.xml
gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-1.xml
gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-2.xml
gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-3.xml
gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-cyclic-1.xml
gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-cyclic-2.xml
gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-cyclic-3.xml
gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-dir-management-1.xml
gump/branches/Gump3/pygump/python/gump/engine/objectifier.py
gump/branches/Gump3/pygump/python/gump/model/__init__.py
gump/branches/Gump3/pygump/python/gump/model/util.py
gump/branches/Gump3/pygump/python/gump/test/testPluginDirBuilder.py
Modified: gump/branches/Gump3/fixture/metadata/profile.xml
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/fixture/metadata/profile.xml?rev=168548&r1=168547&r2=168548&view=diff
==============================================================================
--- gump/branches/Gump3/fixture/metadata/profile.xml (original)
+++ gump/branches/Gump3/fixture/metadata/profile.xml Fri May 6 00:08:49 2005
@@ -34,6 +34,7 @@
<project href="projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-cyclic-1.xml"/>
<project href="projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-cyclic-2.xml"/>
<project href="projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-cyclic-3.xml"/>
+ <project href="projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-dir-management-1.xml"/>
<project href="projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-does-not-exist.xml"/>
</projects>
Modified: gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-1.xml
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-1.xml?rev=168548&r1=168547&r2=168548&view=diff
==============================================================================
--- gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-1.xml (original)
+++ gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-1.xml Fri May 6 00:08:49 2005
@@ -13,8 +13,8 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<project name="gump-fixture-svn-project-1">
- <module name="gump-fixture-svn" subdir="gump-fixture-svn-project-1"/>
+<project name="gump-fixture-svn-project-1" path="gump-fixture-svn-project-1">
+ <module name="gump-fixture-svn"/>
<license name="LICENSE.txt"/>
</project>
Modified: gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-2.xml
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-2.xml?rev=168548&r1=168547&r2=168548&view=diff
==============================================================================
--- gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-2.xml (original)
+++ gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-2.xml Fri May 6 00:08:49 2005
@@ -13,8 +13,8 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<project name="gump-fixture-svn-project-2">
- <module name="gump-fixture-svn" subdir="gump-fixture-svn-project-2"/>
+<project name="gump-fixture-svn-project-2" path="gump-fixture-svn-project-2">
+ <module name="gump-fixture-svn"/>
<license name="LICENSE.txt"/>
Modified: gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-3.xml
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-3.xml?rev=168548&r1=168547&r2=168548&view=diff
==============================================================================
--- gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-3.xml (original)
+++ gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-3.xml Fri May 6 00:08:49 2005
@@ -13,8 +13,8 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<project name="gump-fixture-svn-project-3">
- <module name="gump-fixture-svn" subdir="gump-fixture-svn-project-3"/>
+<project name="gump-fixture-svn-project-3" path="gump-fixture-svn-project-3">
+ <module name="gump-fixture-svn"/>
<license name="LICENSE.txt"/>
Modified: gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-cyclic-1.xml
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-cyclic-1.xml?rev=168548&r1=168547&r2=168548&view=diff
==============================================================================
--- gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-cyclic-1.xml (original)
+++ gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-cyclic-1.xml Fri May 6 00:08:49 2005
@@ -13,8 +13,8 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<project name="gump-fixture-svn-project-cyclic-1">
- <module name="gump-fixture-svn" subdir="gump-fixture-svn-project-cyclic-1"/>
+<project name="gump-fixture-svn-project-cyclic-1" path="gump-fixture-svn-project-cyclic-1">
+ <module name="gump-fixture-svn"/>
<license name="LICENSE.txt"/>
<!-- <depend project="gump-fixture-svn-project-1"/>
Modified: gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-cyclic-2.xml
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-cyclic-2.xml?rev=168548&r1=168547&r2=168548&view=diff
==============================================================================
--- gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-cyclic-2.xml (original)
+++ gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-cyclic-2.xml Fri May 6 00:08:49 2005
@@ -13,8 +13,8 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<project name="gump-fixture-svn-project-cyclic-2">
- <module name="gump-fixture-svn" subdir="gump-fixture-svn-project-cyclic-2"/>
+<project name="gump-fixture-svn-project-cyclic-2" path="gump-fixture-svn-project-cyclic-2">
+ <module name="gump-fixture-svn"/>
<license name="LICENSE.txt"/>
<!-- <depend project="gump-fixture-svn-project-1"/>
Modified: gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-cyclic-3.xml
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-cyclic-3.xml?rev=168548&r1=168547&r2=168548&view=diff
==============================================================================
--- gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-cyclic-3.xml (original)
+++ gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-cyclic-3.xml Fri May 6 00:08:49 2005
@@ -13,8 +13,8 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<project name="gump-fixture-svn-project-cyclic-3">
- <module name="gump-fixture-svn" subdir="gump-fixture-svn-project-cyclic-3"/>
+<project name="gump-fixture-svn-project-cyclic-3" path="gump-fixture-svn-project-cyclic-3">
+ <module name="gump-fixture-svn"/>
<license name="LICENSE.txt"/>
<depend project="gump-fixture-svn-project-1"/>
Modified: gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-dir-management-1.xml
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-dir-management-1.xml?rev=168548&r1=168547&r2=168548&view=diff
==============================================================================
--- gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-dir-management-1.xml (original)
+++ gump/branches/Gump3/fixture/metadata/projects/gump.apache.org-fixture-svn/gump-fixture-svn-project-dir-management-1.xml Fri May 6 00:08:49 2005
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!--
+Copyright 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.
+-->
+<project name="gump-fixture-svn-project-dir-management-1"
+ path="gump-fixture-svn-project-dir-management-1">
+ <module name="gump-fixture-svn"/>
+
+ <license name="LICENSE.txt"/>
+ <rmdir dir="build1"/>
+ <mkdir dir="build1"/>
+ <mkdir dir="build2"/>
+ <mkdir dir="build3"/>
+
+ <depend project="gump-fixture-svn-project-2" runtime="true"/>
+</project>
Modified: gump/branches/Gump3/pygump/python/gump/engine/objectifier.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/pygump/python/gump/engine/objectifier.py?rev=168548&r1=168547&r2=168548&view=diff
==============================================================================
--- gump/branches/Gump3/pygump/python/gump/engine/objectifier.py (original)
+++ gump/branches/Gump3/pygump/python/gump/engine/objectifier.py Fri May 6 00:08:49 2005
@@ -164,8 +164,9 @@
def _create_project(module, project_definition):
name = project_definition.getAttribute("name")
+ path = project_definition.getAttribute("path")
- project = Project(module, name)
+ project = Project(module, name, path)
return project
Modified: gump/branches/Gump3/pygump/python/gump/model/__init__.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/pygump/python/gump/model/__init__.py?rev=168548&r1=168547&r2=168548&view=diff
==============================================================================
--- gump/branches/Gump3/pygump/python/gump/model/__init__.py (original)
+++ gump/branches/Gump3/pygump/python/gump/model/__init__.py Fri May 6 00:08:49 2005
@@ -263,6 +263,7 @@
- module -- the containing module
- name -- per-run unique identifier
+ - path -- directory path within the containing module
- dependencies -- list of Dependency instances describing what other
projects this project depends upon
- dependees -- list of Dependency instances describing what other
@@ -276,12 +277,13 @@
#def __str__(self):
# return "<Project: %s>" % self.name
- def __init__(self, module, name):
+ def __init__(self, module, name, path="."):
assert isinstance(module, Module)
assert isinstance(name, basestring)
self.module = module
self.name = name
+ self.path = path
self.dependencies=[]
self.dependees=[]
Modified: gump/branches/Gump3/pygump/python/gump/model/util.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/pygump/python/gump/model/util.py?rev=168548&r1=168547&r2=168548&view=diff
==============================================================================
--- gump/branches/Gump3/pygump/python/gump/model/util.py (original)
+++ gump/branches/Gump3/pygump/python/gump/model/util.py Fri May 6 00:08:49 2005
@@ -29,7 +29,7 @@
def get_project_directory(workdir, project):
"""Determine the base directory for a project."""
- return get_module_directory(workdir, project.module)
+ return join(get_module_directory(workdir, project.module),project.path)
def get_module_directory(workdir, module):
"""Determine the base directory for a module."""
Modified: gump/branches/Gump3/pygump/python/gump/test/testPluginDirBuilder.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/pygump/python/gump/test/testPluginDirBuilder.py?rev=168548&r1=168547&r2=168548&view=diff
==============================================================================
--- gump/branches/Gump3/pygump/python/gump/test/testPluginDirBuilder.py (original)
+++ gump/branches/Gump3/pygump/python/gump/test/testPluginDirBuilder.py Fri May 6 00:08:49 2005
@@ -45,16 +45,18 @@
m = Module(r,"m")
mpath = join(basedir,w.name,r.name,m.name)
mkdir(mpath)
- p = Project(m,"p")
+ p = Project(m,"p","p")
+ ppath = join(basedir,w.name,r.name,m.name,p.path)
+ mkdir(ppath)
cmd = Rmdir(p,"somedir")
plugin = RmdirBuilderPlugin(basedir)
- makedirs(join(mpath, cmd.directory, "nested", "stuff", "here"))
+ makedirs(join(ppath, cmd.directory, "nested", "stuff", "here"))
plugin._do_rmdir(cmd.project, cmd.directory)
- self.assertFalse(isdir(join(mpath,cmd.directory)))
- self.assert_(isdir(join(mpath)))
+ self.assertFalse(isdir(join(ppath,cmd.directory)))
+ self.assert_(isdir(join(ppath)))
finally:
rmtree(basedir)
@@ -68,19 +70,21 @@
m = Module(r,"m")
mpath = join(basedir,w.name,r.name,m.name)
mkdir(mpath)
- p = Project(m,"p")
+ p = Project(m,"p","p")
+ ppath = join(basedir,w.name,r.name,m.name,p.path)
+ mkdir(ppath)
cmd = Mkdir(p,"somedir")
plugin = MkdirBuilderPlugin(basedir)
plugin._do_mkdir(cmd.project, cmd.directory)
- self.assert_(isdir(join(mpath,cmd.directory)))
- rmtree(join(mpath,cmd.directory))
+ self.assert_(isdir(join(ppath,cmd.directory)))
+ rmtree(join(ppath,cmd.directory))
plugin._do_mkdir(cmd.project, "some/nested/directory")
- self.assert_(isdir(join(mpath,"some/nested/directory")))
- rmtree(join(mpath,"some/nested/directory"))
+ self.assert_(isdir(join(ppath,"some/nested/directory")))
+ rmtree(join(ppath,"some/nested/directory"))
p.add_command(cmd)
cmd2 = Mkdir(p,"somedir2")
@@ -89,10 +93,10 @@
p.add_command(cmd3)
plugin.visit_project(p)
- self.assert_(isdir(join(mpath,cmd.directory)))
- self.assert_(isdir(join(mpath,cmd2.directory)))
- self.assertFalse(isdir(join(mpath,cmd3.directory)))
- rmtree(join(mpath,cmd.directory))
+ self.assert_(isdir(join(ppath,cmd.directory)))
+ self.assert_(isdir(join(ppath,cmd2.directory)))
+ self.assertFalse(isdir(join(ppath,cmd3.directory)))
+ rmtree(join(ppath,cmd.directory))
# failure on bad path
cmd = Mkdir(p,join("..", "..", "..", "somedir"))
@@ -100,7 +104,7 @@
# failure on bad file
cmd = Mkdir(p,"somedir")
- file = open(join(mpath,cmd.directory),"w")
+ file = open(join(ppath,cmd.directory),"w")
file.write("blah")
file.close()
self.assertRaises(Error, plugin._do_mkdir, cmd.project, cmd.directory)