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