From 170955bbfacbf3e3aa81605cc09f8b0307a3d134 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Fri, 8 Jan 2016 09:34:31 -0500 Subject: [PATCH] fix incorrect use of ceph checkout location Signed-off-by: Alfredo Deza --- ceph-pr-commits/build/test_commits.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) 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 -- 2.47.3