]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
fix incorrect use of ceph checkout location 283/head
authorAlfredo Deza <adeza@redhat.com>
Fri, 8 Jan 2016 14:34:31 +0000 (09:34 -0500)
committerAlfredo Deza <adeza@redhat.com>
Fri, 8 Jan 2016 14:35:32 +0000 (09:35 -0500)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
ceph-pr-commits/build/test_commits.py

index 75add2b2f2f0432f1a944c737297bddeb5e50c84..73286d93e1bfbd17e3dd8a982dea67ec65aee70b 100644 (file)
@@ -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