Revision e8c8cf1a

b/Makefile.am
247 247
	autotools/check-man \
248 248
	autotools/docbook-wrapper \
249 249
	autotools/gen-coverage \
250
	autotools/testrunner \
250 251
	$(RUN_IN_TEMPDIR) \
251 252
	daemons/daemon-util.in \
252 253
	daemons/ganeti-cleaner.in \
......
318 319
	test/data/proc_drbd80-emptyline.txt \
319 320
	test/data/proc_drbd83.txt
320 321

  
321
dist_TESTS = \
322
python_tests = \
322 323
	test/ganeti.bdev_unittest.py \
323 324
	test/ganeti.cli_unittest.py \
324 325
	test/ganeti.cmdlib_unittest.py \
......
340 341
	test/docs_unittest.py \
341 342
	test/tempfile_fork_unittest.py
342 343

  
344
dist_TESTS = \
345
	$(python_tests)
346

  
343 347
nodist_TESTS =
344 348

  
345 349
TESTS = $(dist_TESTS) $(nodist_TESTS)
......
349 353
	PYTHONPATH=. TOP_SRCDIR=$(abs_top_srcdir) PYTHON=$(PYTHON) $(RUN_IN_TEMPDIR)
350 354

  
351 355
# Environment for tests run by automake
352
TESTS_ENVIRONMENT = $(PLAIN_TESTS_ENVIRONMENT) $(PYTHON)
356
TESTS_ENVIRONMENT = \
357
	$(PLAIN_TESTS_ENVIRONMENT) $(abs_top_srcdir)/autotools/testrunner
353 358

  
354 359
all_python_code = \
355 360
	$(dist_sbin_SCRIPTS) \
356 361
	$(dist_tools_SCRIPTS) \
357
	$(dist_TESTS) \
362
	$(python_tests) \
358 363
	$(pkgpython_PYTHON) \
359 364
	$(hypervisor_PYTHON) \
360 365
	$(rapi_PYTHON) \
......
545 550
	  etags -
546 551

  
547 552
.PHONY: coverage
548
coverage: $(BUILT_SOURCES) $(TESTS)
553
coverage: $(BUILT_SOURCES) $(python_tests)
549 554
	set -e; \
550 555
	mkdir -p doc/coverage; \
551 556
	COVERAGE_FILE=$(CURDIR)/doc/coverage/data \
552 557
	TEXT_COVERAGE=$(CURDIR)/doc/coverage/report.txt \
553 558
	HTML_COVERAGE=$(CURDIR)/doc/coverage \
554
	$(PLAIN_TESTS_ENVIRONMENT) $(abs_top_srcdir)/autotools/gen-coverage $(TESTS)
559
	$(PLAIN_TESTS_ENVIRONMENT) $(abs_top_srcdir)/autotools/gen-coverage \
560
	$(python_tests)
555 561

  
556 562
# vim: set noet :
b/autotools/testrunner
1
#!/bin/bash
2
#
3

  
4
# Copyright (C) 2010 Google Inc.
5
#
6
# This program is free software; you can redistribute it and/or modify
7
# it under the terms of the GNU General Public License as published by
8
# the Free Software Foundation; either version 2 of the License, or
9
# (at your option) any later version.
10
#
11
# This program is distributed in the hope that it will be useful, but
12
# WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
# General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License
17
# along with this program; if not, write to the Free Software
18
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19
# 02110-1301, USA.
20

  
21
set -e
22

  
23
filename=$1
24

  
25
case "$filename" in
26
  *.py) exec $PYTHON "$@" ;;
27
  *) exec "$@" ;;
28
esac

Also available in: Unified diff