]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blob - tests/phpunit/Makefile
MediaWiki 1.30.2
[autoinstallsdev/mediawiki.git] / tests / phpunit / Makefile
1 .PHONY: help test phpunit 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 tap:
39         ${PU} --tap
40
41 coverage:
42         ${PU} --coverage-html ../../docs/code-coverage
43
44 parser:
45         ${PU} --group Parser
46 noparser:
47         ${PU} --exclude-group Parser,Broken,Stub
48
49 safe:
50         ${PU} --exclude-group Broken,Destructive,Stub
51
52 databaseless:
53         ${PU} --exclude-group Broken,Destructive,Database,Stub
54
55 database:
56         ${PU} --exclude-group Broken,Destructive,Stub --group Database
57
58 list-groups:
59         ${PU} --list-groups
60
61 help:
62         # Usage:
63         #   make <target> [OPTION=value]
64         #
65         # Targets:
66         #   phpunit (default)   Run all the tests with phpunit
67         #   tap                 Run the tests individually through Test::Harness's prove(1)
68         #   help                You're looking at it!
69         #   coverage            Run the tests and generates an HTML code coverage report
70         #                       You will need the Xdebug PHP extension for the latter.
71         #   [no]parser          Skip or only run Parser tests
72         #
73         #   list-groups         List available Tests groups.
74         #
75         #  Options:
76         #   CONFIG_FILE         Path to a PHPUnit configuration file (default: suite.xml)
77         #   FLAGS               Additional flags to pass to PHPUnit
78         #   PHP                 Path to php