summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2014-12-05 15:49:14 -0500
committerPatrick Uiterwijk <puiterwijk@redhat.com>2014-12-05 15:55:45 -0500
commit84170b65575599b710a38f19969af369622fdbaf (patch)
tree38129f477e8a456637557dd3aa97dc2cdc523d0d
parent49553b2d416566fabed0d80b31e7218c8abde7a0 (diff)
Change working directory for quickrun
Set the current working directory to the provided one, so if realtive paths are used by plugins they within the quickrun working area. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
-rwxr-xr-xquickrun.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/quickrun.py b/quickrun.py
index ac22f6b..c39e06a 100755
--- a/quickrun.py
+++ b/quickrun.py
@@ -92,8 +92,9 @@ if __name__ == '__main__':
penv = dict()
penv.update(os.environ)
- penv['PYTHONPATH'] = './'
+ penv['PYTHONPATH'] = os.getcwd()
+ exe = os.path.join(os.getcwd(), 'ipsilon/ipsilon')
if args['cleanup']:
shutil.rmtree(args['workdir'])
@@ -103,5 +104,7 @@ if __name__ == '__main__':
else:
conf = os.path.join(args['workdir'], 'ipsilon.conf')
- p = subprocess.Popen(['./ipsilon/ipsilon', conf], env=penv)
+ os.chdir(args['workdir'])
+
+ p = subprocess.Popen([exe, conf], env=penv)
p.wait()