a2097e8411af5ca637077b832d8675a21b0f82df
[lhc/web/wiklou.git] / maintenance / tests / phpunit / Makefile
1 .PHONY: help test phpunit install coverage warning destructive parser noparser list-groups
2 .DEFAULT: warning
3
4 SHELL = /bin/sh
5 CONFIG_FILE = $(shell pwd)/suite.xml
6 FLAGS =
7 PU = php phpunit.php --configuration ${CONFIG_FILE}
8
9 all test: warning
10
11 warning:
12 # Use 'make help' to get usage
13 @echo "WARNING -- these tests are DESTRUCTIVE and will alter your wiki."
14 @echo "DO NOT RUN THESE TESTS on a production wiki."
15 @echo ""
16 @echo "Until the default suites are made non-destructive, you can run"
17 @echo "the destructive tests like so:"
18 @echo ""
19 @echo " make destructive"
20 @echo ""
21
22 destructive: phpunit
23
24 phpunit:
25 ${PU}
26
27 install:
28 pear channel-discover pear.phpunit.de
29 pear install phpunit/PHPUnit
30
31 tap:
32 ${PU} --tap
33
34 coverage:
35 ${PU} --coverage-html ../../../docs/code-coverage
36
37 parser:
38 ${PU} --group Parser
39
40 noparser:
41 ${PU} --exclude-group Parser
42
43 list-groups:
44 ${PU} --list-groups
45
46 help:
47 # Usage:
48 # make <target> [OPTION=value]
49 #
50 # Targets:
51 # phpunit (default) Run all the tests with phpunit
52 # install Install PHPUnit from phpunit.de
53 # tap Run the tests individually through Test::Harness's prove(1)
54 # help You're looking at it!
55 # coverage Run the tests and generates an HTML code coverage report
56 # You will need the Xdebug PHP extension for the later.
57 # [no]parser Skip or only run Parser tests
58 #
59 # list-groups List availabe Tests groups.
60 #
61 # Options:
62 # CONFIG_FILE Path to a PHPUnit configuration file (default: suite.xml)
63 # FLAGS Additional flags to pass to PHPUnit