Merge branch 'stable-2.8' into master
[ganeti-local] / Makefile.am
index 6621a58..abf8f17 100644 (file)
@@ -1277,8 +1277,11 @@ dist_TESTS = \
        test/py/ganeti-cleaner_unittest.bash \
        test/py/import-export_unittest.bash \
        test/py/cli-test.bash \
-       test/py/bash_completion.bash \
-       $(python_tests)
+       test/py/bash_completion.bash
+
+if !PY_NODEV
+       dist_TESTS += $(python_tests)
+endif
 
 nodist_TESTS =
 check_SCRIPTS =
@@ -1311,7 +1314,6 @@ all_python_code = \
        $(pkglib_python_scripts) \
        $(nodist_pkglib_python_scripts) \
        $(nodist_tools_python_scripts) \
-       $(python_tests) \
        $(pkgpython_PYTHON) \
        $(client_PYTHON) \
        $(cmdlib_PYTHON) \
@@ -1329,6 +1331,10 @@ all_python_code = \
        $(noinst_PYTHON) \
        $(qa_scripts)
 
+if !PY_NODEV
+       all_python_code += $(python_tests)
+endif
+
 srclink_files = \
        man/footer.rst \
        test/py/check-cert-expired_unittest.bash \
@@ -1999,11 +2005,16 @@ TAGS: $(GENERATED_FILES)
          etags -l python -a -
 
 .PHONY: coverage
+
+COVERAGE_TESTS=
 if WANT_HTOOLS
-coverage: py-coverage hs-coverage
-else
-coverage: py-coverage
+COVERAGE_TESTS += hs-coverage
 endif
+if !PY_NODEV
+COVERAGE_TESTS += py-coverage
+endif
+
+coverage: $(COVERAGE_TESTS)
 
 .PHONY: py-coverage
 py-coverage: $(GENERATED_FILES) $(python_tests)