Antoni Segura Puimedon has uploaded a new change for review.

Change subject: autotools: fix make distcheck
......................................................................

autotools: fix make distcheck

Change-Id: Iba50c8540f35dbe64c67addf3ae522dc4957718a
Signed-off-by: Antoni S. Puimedon <asegu...@redhat.com>
---
M lib/zombiereaper/Makefile.am
M tests/Makefile.am
M vdsm/storage/Makefile.am
M vdsm_api/Makefile.am
M vdsm_api/vdsmapi.py
5 files changed, 15 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/41/21341/1

diff --git a/lib/zombiereaper/Makefile.am b/lib/zombiereaper/Makefile.am
index ec01a0d..fe99720 100644
--- a/lib/zombiereaper/Makefile.am
+++ b/lib/zombiereaper/Makefile.am
@@ -29,4 +29,4 @@
        $(NULL)
 
 check-local:
-       nosetests tests.py
+       nosetests $(srcdir)/tests.py
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 439aee4..ef44acf 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -124,5 +124,5 @@
 check-local:
        @echo '*** Running tests.  To skip this step place NOSE_EXCLUDE=.* ***'
        @echo '*** into your environment.  Do not submit untested code!    ***'
-       $(top_srcdir)/tests/run_tests_local.sh crossImportsTests.py
-       $(top_srcdir)/tests/run_tests_local.sh $(test_modules)
+       $(builddir)/run_tests_local.sh crossImportsTests.py
+       $(builddir)/run_tests_local.sh $(test_modules)
diff --git a/vdsm/storage/Makefile.am b/vdsm/storage/Makefile.am
index 2d3e9a6..f9cf9b3 100644
--- a/vdsm/storage/Makefile.am
+++ b/vdsm/storage/Makefile.am
@@ -70,6 +70,3 @@
 
 dist_vdsmexec_SCRIPTS = \
        curl-img-wrap
-
-check-local:
-       PYTHONPATH="$(top_srcdir)/lib:$$PYTHONPATH" PYTHONDONTWRITEBYTECODE=1 
$(PYTHON) $(srcdir)/storage_exception.py
diff --git a/vdsm_api/Makefile.am b/vdsm_api/Makefile.am
index 8331dea..a0e36a0 100644
--- a/vdsm_api/Makefile.am
+++ b/vdsm_api/Makefile.am
@@ -28,7 +28,7 @@
        @echo "  Generate $@"
        PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=$(srcdir)/../lib \
            $(PYTHON) $(srcdir)/process-schema.py \
-                     $(srcdir)/vdsmapi-schema.json $(srcdir)/$@
+                     $(srcdir)/vdsmapi-schema.json $(builddir)/$@
 
 all-local: \
        $(nodist_noinst_DATA)
diff --git a/vdsm_api/vdsmapi.py b/vdsm_api/vdsmapi.py
index db29c13..e8daa04 100644
--- a/vdsm_api/vdsmapi.py
+++ b/vdsm_api/vdsmapi.py
@@ -25,7 +25,6 @@
 #
 
 import os
-from vdsm import constants
 
 try:
     from collections import OrderedDict
@@ -119,12 +118,17 @@
     Find the API schema file whether we are running from within the source dir
     or from an installed location
     """
-    localpath = os.path.dirname(__file__)
-    installedpath = constants.P_VDSM
-    for directory in localpath, installedpath:
-        path = os.path.join(directory, schema_name + '-schema.json')
-        if os.access(path, os.R_OK):
-            return path
+    # Try first local path
+    path = os.path.join(os.path.dirname(__file__),
+                        schema_name + '-schema.json')
+    if os.access(path, os.R_OK):
+        return path
+
+    # Try installed path
+    from vdsm import constants
+    path = os.path.join(constants.P_VDSM, schema_name + '-schema.json')
+    if os.access(path, os.R_OK):
+        return path
 
     if not raiseOnError:
         return None


-- 
To view, visit http://gerrit.ovirt.org/21341
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iba50c8540f35dbe64c67addf3ae522dc4957718a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegu...@redhat.com>
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to