| |
@@ -13,6 +13,7 @@
|
| |
import subprocess
|
| |
|
| |
from control import TC # pylint: disable=relative-import
|
| |
+ import ipsilon.distro_profile as distro
|
| |
|
| |
|
| |
WRAP_HOSTNAME = 'idp.ipsilon.dev'
|
| |
@@ -188,7 +189,7 @@
|
| |
os.mkdir(os.path.join(httpdir, 'conf.d'))
|
| |
os.mkdir(os.path.join(httpdir, 'html'))
|
| |
os.mkdir(os.path.join(httpdir, 'logs'))
|
| |
- os.symlink('/etc/httpd/modules', os.path.join(httpdir, 'modules'))
|
| |
+ os.symlink(distro.HTTPD_MODULESDIR, os.path.join(httpdir, 'modules'))
|
| |
|
| |
with open(os.path.join(self.rootdir, 'tests/httpd.conf')) as f:
|
| |
t = Template(f.read())
|
| |
@@ -264,7 +265,8 @@
|
| |
return http_conf_file
|
| |
|
| |
def setup_pgdb(self, datadir, env):
|
| |
- cmd = ['/usr/bin/pg_ctl', 'initdb', '-D', datadir, '-o', '-E UNICODE']
|
| |
+ cmd = [distro.POSTGRES_PGCTL, 'initdb', '-D', datadir, '-o',
|
| |
+ '-E UNICODE']
|
| |
subprocess.check_call(cmd, env=env,
|
| |
stdout=self.stdout, stderr=self.stderr)
|
| |
auth = 'host all all 127.0.0.1/24 trust\n'
|
| |
@@ -293,15 +295,15 @@
|
| |
env['MALLOC_PERTURB_'] = str(random.randint(0, 32767) % 255 + 1)
|
| |
env['REQUESTS_CA_BUNDLE'] = os.path.join(self.testdir, 'certs',
|
| |
'root.cert.pem')
|
| |
- p = subprocess.Popen(['/usr/sbin/httpd', '-DFOREGROUND', '-f', conf],
|
| |
+ p = subprocess.Popen([distro.HTTPD_BIN, '-DFOREGROUND', '-f', conf],
|
| |
env=env, preexec_fn=os.setsid,
|
| |
stdout=self.stdout, stderr=self.stderr)
|
| |
self.processes.append(p)
|
| |
return p
|
| |
|
| |
def start_pgdb_server(self, datadir, rundir, log, addr, port, env):
|
| |
- p = subprocess.Popen(['/usr/bin/pg_ctl', 'start', '-D', datadir, '-o',
|
| |
- '-k %s -c port=%s -c \
|
| |
+ p = subprocess.Popen([distro.POSTGRES_PGCTL, 'start', '-D', datadir,
|
| |
+ '-o', '-k %s -c port=%s -c \
|
| |
listen_addresses=%s' % (rundir, port, addr),
|
| |
'-l', log, '-w'],
|
| |
env=env, preexec_fn=os.setsid,
|
| |
@@ -319,7 +321,8 @@
|
| |
os.mkdir(ldapdir)
|
| |
with open(os.path.join(self.rootdir, 'tests/slapd.conf')) as f:
|
| |
t = Template(f.read())
|
| |
- text = t.substitute({'ldapdir': ldapdir})
|
| |
+ text = t.substitute({'ldapdir': ldapdir,
|
| |
+ 'schemadir': distro.LDAP_SCHEMADIR})
|
| |
filename = os.path.join(ldapdir, 'slapd.conf')
|
| |
with open(filename, 'w+') as f:
|
| |
f.write(text)
|
| |
What about Gentoo‽ ☺