Makefile 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. .PHONY: help test phpunit coverage warning destructive parser noparser safe databaseless list-groups
  2. .DEFAULT: warning
  3. SHELL = /bin/sh
  4. CONFIG_FILE = ${PWD}/suite.xml
  5. PHP = php
  6. PU = ${PHP} phpunit.php --configuration ${CONFIG_FILE} ${FLAGS}
  7. all test: warning
  8. warning:
  9. @echo "Run 'make help' to get usage"
  10. @echo ""
  11. @echo "WARNING -- some 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 tests are made non-destructive, you can run"
  15. @echo "the destructive tests like so:"
  16. @echo ""
  17. @echo " make destructive"
  18. @echo ""
  19. @echo "Some tests are expected to be safe, you can run them with"
  20. @echo ""
  21. @echo " make safe"
  22. @echo ""
  23. @echo "You are recommended to run the tests with read-only credentials."
  24. @echo ""
  25. @echo "If you don't have a database running, you can still run"
  26. @echo ""
  27. @echo " make databaseless"
  28. @echo ""
  29. destructive: phpunit
  30. phpunit:
  31. ${PU}
  32. tap:
  33. ${PU} --tap
  34. coverage:
  35. ${PU} --coverage-html ../../docs/code-coverage
  36. parser:
  37. ${PU} --group Parser
  38. noparser:
  39. ${PU} --exclude-group Parser,Broken,Stub
  40. safe:
  41. ${PU} --exclude-group Broken,Destructive,Stub
  42. databaseless:
  43. ${PU} --exclude-group Broken,Destructive,Database,Stub
  44. database:
  45. ${PU} --exclude-group Broken,Destructive,Stub --group Database
  46. list-groups:
  47. ${PU} --list-groups
  48. help:
  49. # Usage:
  50. # make <target> [OPTION=value]
  51. #
  52. # Targets:
  53. # phpunit (default) Run all the tests with phpunit
  54. # tap Run the tests individually through Test::Harness's prove(1)
  55. # help You're looking at it!
  56. # coverage Run the tests and generates an HTML code coverage report
  57. # You will need the Xdebug PHP extension for the latter.
  58. # [no]parser Skip or only run Parser tests
  59. #
  60. # list-groups List available Tests groups.
  61. #
  62. # Options:
  63. # CONFIG_FILE Path to a PHPUnit configuration file (default: suite.xml)
  64. # FLAGS Additional flags to pass to PHPUnit
  65. # PHP Path to php