Merge "Update the Chinese conversion table for Chinese WikiProjects"
[lhc/web/wiklou.git] / tests / phpunit / Makefile
1 .PHONY: help test phpunit install coverage warning destructive parser noparser safe databaseless list-groups
2 .DEFAULT: warning
3
4 SHELL = /bin/sh
5 CONFIG_FILE = ${PWD}/suite.xml
6 PHP = php
7 PU = ${PHP} phpunit.php --configuration ${CONFIG_FILE} ${FLAGS}
8
9 all test: warning
10
11 warning:
12 @echo "Run 'make help' to get usage"
13 @echo ""
14 @echo "WARNING -- some tests are DESTRUCTIVE and will alter your wiki."
15 @echo "DO NOT RUN THESE TESTS on a production wiki."
16 @echo ""
17 @echo "Until the default tests are made non-destructive, you can run"
18 @echo "the destructive tests like so:"
19 @echo ""
20 @echo " make destructive"
21 @echo ""
22 @echo "Some tests are expected to be safe, you can run them with"
23 @echo ""
24 @echo " make safe"
25 @echo ""
26 @echo "You are recommended to run the tests with read-only credentials."
27 @echo ""
28 @echo "If you don't have a database running, you can still run"
29 @echo ""
30 @echo " make databaseless"
31 @echo ""
32
33 destructive: phpunit
34
35 phpunit:
36 ${PU}
37
38 install:
39 ./install-phpunit.sh
40
41 tap:
42 ${PU} --tap
43
44 coverage:
45 ${PU} --coverage-html ../../docs/code-coverage
46
47 parser:
48 ${PU} --group Parser
49 parserfuzz:
50 @echo "******************************************************************"
51 @echo "* This WILL kill your computer by eating all memory AND all swap *"
52 @echo "* *"
53 @echo "* If you are on a production machine. ABORT NOW!! *"
54 @echo "* Press control+C to stop *"
55 @echo "* *"
56 @echo "******************************************************************"
57 ${PU} --group Parser,ParserFuzz
58 noparser:
59 ${PU} --exclude-group Parser,Broken,ParserFuzz,Stub
60
61 safe:
62 ${PU} --exclude-group Broken,ParserFuzz,Destructive,Stub
63
64 databaseless:
65 ${PU} --exclude-group Broken,ParserFuzz,Destructive,Database,Stub
66
67 database:
68 ${PU} --exclude-group Broken,ParserFuzz,Destructive,Stub --group Database
69
70 list-groups:
71 ${PU} --list-groups
72
73 help:
74 # Usage:
75 # make <target> [OPTION=value]
76 #
77 # Targets:
78 # phpunit (default) Run all the tests with phpunit
79 # install Install PHPUnit from phpunit.de
80 # tap Run the tests individually through Test::Harness's prove(1)
81 # help You're looking at it!
82 # coverage Run the tests and generates an HTML code coverage report
83 # You will need the Xdebug PHP extension for the later.
84 # [no]parser Skip or only run Parser tests
85 #
86 # list-groups List available Tests groups.
87 #
88 # Options:
89 # CONFIG_FILE Path to a PHPUnit configuration file (default: suite.xml)
90 # FLAGS Additional flags to pass to PHPUnit
91 # PHP Path to php