[testlib] put postgres test database in test/data/database directory
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 17 Dec 2015 15:17:45 +0100
changeset 11029 c9d12d1d3081
parent 11028 66f94d7f9ca7
child 11030 c1fdd22232d1
[testlib] put postgres test database in test/data/database directory with other (sqlite) test databases. Closes #9240765 Simplify .hgignore in passing.
.hgignore
devtools/__init__.py
--- 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: