Revision 27e336af Makefile.am

b/Makefile.am
54 54
	doc/news.rst
55 55

  
56 56
maintainer-clean-local:
57
	rm -rf doc/api doc/html
57
	rm -rf doc/api doc/html doc/coverage
58 58

  
59 59
CLEANFILES = \
60 60
	autotools/replace_vars.sed \
......
245 245
	autotools/check-python-code \
246 246
	autotools/check-man \
247 247
	autotools/docbook-wrapper \
248
	autotools/gen-coverage \
248 249
	$(RUN_IN_TEMPDIR) \
249 250
	daemons/daemon-util.in \
250 251
	daemons/ganeti-cleaner.in \
......
340 341

  
341 342
TESTS = $(dist_TESTS) $(nodist_TESTS)
342 343

  
343
TESTS_ENVIRONMENT = \
344
	PYTHONPATH=. TOP_SRCDIR=$(abs_top_srcdir) \
345
	$(RUN_IN_TEMPDIR) $(PYTHON)
344
# Environment for all tests
345
PLAIN_TESTS_ENVIRONMENT = \
346
	PYTHONPATH=. TOP_SRCDIR=$(abs_top_srcdir) PYTHON=$(PYTHON) $(RUN_IN_TEMPDIR)
347

  
348
# Environment for tests run by automake
349
TESTS_ENVIRONMENT = $(PLAIN_TESTS_ENVIRONMENT) $(PYTHON)
346 350

  
347 351
all_python_code = \
348 352
	$(dist_sbin_SCRIPTS) \
......
535 539
	  -path 'daemons/ganeti-*' -o -path 'tools/*' | \
536 540
	  etags -
537 541

  
542
.PHONY: coverage
543
coverage: $(BUILT_SOURCES) $(TESTS)
544
	set -e; \
545
	mkdir -p doc/coverage; \
546
	COVERAGE_FILE=$(CURDIR)/doc/coverage/data \
547
	TEXT_COVERAGE=$(CURDIR)/doc/coverage/report.txt \
548
	HTML_COVERAGE=$(CURDIR)/doc/coverage \
549
	$(PLAIN_TESTS_ENVIRONMENT) $(abs_top_srcdir)/autotools/gen-coverage $(TESTS)
550

  
538 551
# vim: set noet :

Also available in: Unified diff