Permalink
Browse files

Fix issues deploying couchapps. Fixes #3507.

From: Stuart Wakefield <stuart.wakefield@imperial.ac.uk>
Signed-off-by: Steve Foulkes <sfoulkes@fnal.gov>


git-svn-id: svn+ssh://svn.cern.ch/reps/CMSDMWM/WMCore/trunk@15616 4525493e-7705-40b1-a816-d608a930855b
  • Loading branch information...
1 parent 61416f8 commit 88862e9bde29b85f0bd354091c00f1e534c4a114 Stuart Wakefield committed with sfoulkes Apr 6, 2012
Showing with 13 additions and 13 deletions.
  1. +6 −6 bin/wmagent-couchapp-init
  2. +7 −7 src/python/WMQuality/TestInitCouchApp.py
View
@@ -21,14 +21,14 @@ from WMCore.WMBase import getWMBASE
def couchAppRoot(couchapp):
"""Return parent path containing couchapp"""
- wmBase = getWMBASE()
- develPath = os.path.join(wmBase, "src", "couchapps")
+ wmcoreroot = os.path.normpath(os.path.join(getWMBASE(), '..', '..', '..'))
+ develPath = os.path.join(getWMBASE(), "src", "couchapps")
if os.path.exists(os.path.join(develPath, couchapp)):
return develPath
- elif os.path.exists(os.path.join(wmBase, 'xdata', 'couchapps', couchapp)):
- return os.path.join(wmBase, 'xdata', 'couchapps')
- elif os.path.exists(os.path.join(wmBase, 'data', 'couchapps', couchapp)):
- return os.path.join(wmBase, 'data', 'couchapps')
+ elif os.path.exists(os.path.join(wmcoreroot, 'xdata', 'couchapps', couchapp)):
+ return os.path.join(wmcoreroot, 'xdata', 'couchapps')
+ elif os.path.exists(os.path.join(wmcoreroot, 'data', 'couchapps', couchapp)):
+ return os.path.join(wmcoreroot, 'data', 'couchapps')
raise OSError, 'Cannot find couchapp: %s' % couchapp
def installCouchApp(couchUrl, couchDBName, couchAppName, basePath = None):
@@ -74,16 +74,16 @@ def __init__(self, testClassName, dropExistingDb=True):
def couchAppRoot(self, couchapp):
"""Return parent path containing couchapp"""
- wmBase = self.init.getWMBASE()
- develPath = os.path.join(wmBase, "src", "couchapps")
+ wmcoreroot = os.path.normpath(os.path.join(self.init.getWMBASE(), '..', '..', '..'))
+ develPath = os.path.join(self.init.getWMBASE(), "src", "couchapps")
if os.path.exists(os.path.join(develPath, couchapp)):
return develPath
- elif os.path.exists(os.path.join(wmBase, 'xdata', 'couchapps', couchapp)):
- return os.path.join(wmBase, 'xdata', 'couchapps')
- elif os.path.exists(os.path.join(wmBase, 'data', 'couchapps', couchapp)):
- return os.path.join(wmBase, 'data', 'couchapps')
+ elif os.path.exists(os.path.join(wmcoreroot, 'xdata', 'couchapps', couchapp)):
+ return os.path.join(wmcoreroot, 'xdata', 'couchapps')
+ elif os.path.exists(os.path.join(wmcoreroot, 'data', 'couchapps', couchapp)):
+ return os.path.join(wmcoreroot, 'data', 'couchapps')
raise OSError, 'Cannot find couchapp: %s' % couchapp
-
+
def setupCouch(self, dbName, *couchapps):
"""
_setupCouch_

0 comments on commit 88862e9

Please sign in to comment.