[Greater-commits] r252 - trunk/GREAT-ER-DB/impl/postgresql/test
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Jun 22 18:03:34 CEST 2011
Author: aheinecke
Date: 2011-06-22 18:03:34 +0200 (Wed, 22 Jun 2011)
New Revision: 252
Modified:
trunk/GREAT-ER-DB/impl/postgresql/test/postgressupport.py
Log:
Do not use absolute paths wich will not work on Windows,
the user has to put postgres into his PATH
Modified: trunk/GREAT-ER-DB/impl/postgresql/test/postgressupport.py
===================================================================
--- trunk/GREAT-ER-DB/impl/postgresql/test/postgressupport.py 2011-06-22 16:00:17 UTC (rev 251)
+++ trunk/GREAT-ER-DB/impl/postgresql/test/postgressupport.py 2011-06-22 16:03:34 UTC (rev 252)
@@ -143,13 +143,13 @@
shutil.rmtree(self.dbdir)
os.mkdir(self.dbdir)
- run_command(["/usr/local/pgsql/bin/initdb", "-D", self.dbdir, "-U", self.admin_name],
+ run_command(["initdb", "-D", self.dbdir, "-U", self.admin_name],
os.path.join(self.dbdir, "initdb.log"))
extra_opts = "-p %d -i" % self.port
if self.socket_dir is not None:
extra_opts += " -k %s" % self.socket_dir
- run_command(["/usr/local/pgsql/bin/pg_ctl", "-D", self.dbdir,
+ run_command(["pg_ctl", "-D", self.dbdir,
"-l", os.path.join(self.dbdir, "logfile"),
"-o", extra_opts, "start"],
os.path.join(self.dbdir, "pg_ctl-start.log"))
@@ -194,12 +194,12 @@
returns true if there's still a postmaster process running for
self.dbdir.
"""
- return run_boolean_command(["/usr/local/pgsql/bin/pg_ctl", "-D", self.dbdir, "status"])
+ return run_boolean_command(["pg_ctl", "-D", self.dbdir, "status"])
def shutdown(self):
"""Stop the postmaster running for self.dbdir"""
- run_command(["/usr/local/pgsql/bin/pg_ctl", "-m", "fast", "-D", self.dbdir, "stop"],
+ run_command(["pg_ctl", "-m", "fast", "-D", self.dbdir, "stop"],
os.path.join(self.dbdir, "pg_ctl-stop.log"))
def new_postgres_db(self, dbname):
@@ -312,7 +312,7 @@
f = open(os.path.join(self.dbdir, "pg_hba.conf"), "w")
f.write(contents)
f.close()
- run_command(["/usr/local/pgsql/bin/pg_ctl", "-D", self.dbdir, "reload"],
+ run_command(["pg_ctl", "-D", self.dbdir, "reload"],
os.path.join(self.dbdir, "pg_ctl-reload.log"))
@@ -339,11 +339,11 @@
def initdb(self):
"""Remove the old db directory and create and initialize a new database
"""
- run_command(["/usr/local/pgsql/bin/createdb", "-p", str(self.server.port),
+ run_command(["createdb", "-p", str(self.server.port),
"-h", self.server.host, "-U", self.server.admin_name,
self.dbname],
os.path.join(self.server.dbdir, "createdb.log"))
- run_command(["/usr/local/pgsql/bin/createlang", "-p", str(self.server.port),
+ run_command(["createlang", "-p", str(self.server.port),
"-h", self.server.host, "-U", self.server.admin_name,
"plpgsql", self.dbname],
os.path.join(self.server.dbdir, "createlang.log"))
More information about the Greater-commits
mailing list