From: Alfredo Deza Date: Fri, 8 Jan 2016 14:34:31 +0000 (-0500) Subject: fix incorrect use of ceph checkout location X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=170955bbfacbf3e3aa81605cc09f8b0307a3d134;p=ceph-build.git fix incorrect use of ceph checkout location Signed-off-by: Alfredo Deza --- diff --git a/ceph-pr-commits/build/test_commits.py b/ceph-pr-commits/build/test_commits.py index 75add2b2..73286d93 100644 --- a/ceph-pr-commits/build/test_commits.py +++ b/ceph-pr-commits/build/test_commits.py @@ -1,15 +1,22 @@ from subprocess import Popen, PIPE import os +from os.path import dirname import pytest +# ceph-pr-commits/build +current_directory = dirname(os.path.abspath(__file__)) + +# workspace directory +workspace = os.getenv('WORKSPACE', None) or dirname(dirname(dirname(current_directory))) + +# ceph checkout path +ceph_checkout = os.path.join(workspace, 'ceph') + def run(command): - path = os.getenv('WORKSPACE', '../../../ceph') - print "running %s" % ' '.join(command) - print "at path: %s" % os.path.abspath(path) process = Popen( command, - cwd=path, + cwd=ceph_checkout, stdout=PIPE, stderr=PIPE, close_fds=True