From e03e445c791e638ba23768f0088ce5ba3411d4bb Mon Sep 17 00:00:00 2001 From: Michele Tartara Date: Fri, 21 Jun 2013 16:15:35 +0000 Subject: [PATCH] Fix issue with python coverage tests The recently introduced check for python libraries required only for testing (commit 27df5b736ef72b3b12c07f32d64dbac95fe7a5ba) was not correct. This patch fixes the issue. Signed-off-by: Michele Tartara Reviewed-by: Guido Trotter --- Makefile.am | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/Makefile.am b/Makefile.am index 53c37ad..a99c84a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1148,9 +1148,6 @@ TEST_FILES = \ test/py/import-export_unittest-helper -if PY_NODEV -python_tests= -else python_tests = \ doc/examples/rapi_testutils.py \ test/py/cfgupgrade_unittest.py \ @@ -1231,7 +1228,6 @@ python_tests = \ test/py/pycurl_reset_unittest.py \ test/py/qa.qa_config_unittest.py \ test/py/tempfile_fork_unittest.py -endif haskell_tests = test/hs/htest @@ -1241,8 +1237,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 = @@ -1275,7 +1274,6 @@ all_python_code = \ $(pkglib_python_scripts) \ $(nodist_pkglib_python_scripts) \ $(nodist_tools_python_scripts) \ - $(python_tests) \ $(pkgpython_PYTHON) \ $(client_PYTHON) \ $(cmdlib_PYTHON) \ @@ -1292,6 +1290,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 \ @@ -1962,12 +1964,17 @@ 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) @test -n "$(PYCOVERAGE)" || \ -- 1.7.10.4