[testlib] put postgres test database in test/data/database directory
with other (sqlite) test databases. Closes #9240765
Simplify .hgignore in passing.
--- a/.hgignore Wed Dec 02 15:24:03 2015 +0100
+++ b/.hgignore Thu Dec 17 15:17:45 2015 +0100
@@ -13,9 +13,7 @@
^doc/book/en/apidoc$
\.old$
syntax: regexp
-.*/data.*/database/.*\.sqlite
-.*/data.*/database/.*\.config
-.*/data/database/tmpdb.*
+.*/data.*/database/.*
.*/data/ldapdb/.*
.*/data/uicache/
.*/data/cubes/.*/i18n/.*\.po
@@ -24,5 +22,3 @@
^doc/book/en/devweb/js_api/
^doc/_build
^doc/js_api/
-data/pgdb/
-data.*/pgdb.*
--- a/devtools/__init__.py Wed Dec 02 15:24:03 2015 +0100
+++ b/devtools/__init__.py Thu Dec 17 15:17:45 2015 +0100
@@ -540,7 +540,7 @@
def startpgcluster(pyfile):
"""Start a postgresql cluster next to pyfile"""
- datadir = join(os.path.dirname(pyfile), 'data',
+ datadir = join(os.path.dirname(pyfile), 'data', 'database',
'pgdb-%s' % os.path.splitext(os.path.basename(pyfile))[0])
if not exists(datadir):
try:
@@ -579,7 +579,7 @@
def stoppgcluster(pyfile):
"""Kill the postgresql cluster running next to pyfile"""
- datadir = join(os.path.dirname(pyfile), 'data',
+ datadir = join(os.path.dirname(pyfile), 'data', 'database',
'pgdb-%s' % os.path.splitext(os.path.basename(pyfile))[0])
subprocess.call(['pg_ctl', 'stop', '-D', datadir, '-m', 'fast'])
try: