* Fixed the makefile to only run enabled tests, instead of every file in the director...
[lhc/web/wiklou.git] / maintenance / tests / Makefile
1 # If you have problems with excessive memory usage, use the "tap" or "separate" targets.
2
3 TEST_FILES=$(shell php -r 'include( "./TestFileList.php" ); echo implode( " ", $$testFiles );')
4 TEST_FILE_TARGETS=$(subst .php,.target,$(TEST_FILES))
5
6 .PHONY: help test phpunit tap separate install $(TEST_FILE_TARGETS)
7
8 all test: phpunit
9
10 phpunit:
11 php phpunit
12
13 tap:
14 prove -e 'php phpunit --tap' *Test*.php
15
16 separate: $(TEST_FILE_TARGETS)
17
18 # Need --tap because without it, the target specification doesn't work
19 $(TEST_FILE_TARGETS) : %.target : %.php
20 php phpunit --tap $<
21
22 install:
23 pear channel-discover pear.phpunit.de
24 pear install phpunit/PHPUnit
25
26 help:
27 # Targets:
28 # phpunit (default) Run all the tests with phpunit
29 # separate Run each test file in a separate process
30 # tap Run the tests individually through Test::Harness's prove(1)
31 # install Install PHPUnit from phpunit.de
32 # help You're looking at it!