From 2cdb58e5a1b73cab1d97791cd6de3abadc179032 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Mon, 18 Oct 2010 21:36:58 +0000 Subject: [PATCH] Add parser tests to the 'Parser' group Makefile gets some additional targets --- maintenance/tests/phpunit/Makefile | 17 ++++++++++++++++- .../includes/parser/MediaWikiParserTest.php | 2 +- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/maintenance/tests/phpunit/Makefile b/maintenance/tests/phpunit/Makefile index 0784c4ac45..a2097e8411 100644 --- a/maintenance/tests/phpunit/Makefile +++ b/maintenance/tests/phpunit/Makefile @@ -1,4 +1,5 @@ -.PHONY: help test phpunit install coverage warning destructive +.PHONY: help test phpunit install coverage warning destructive parser noparser list-groups +.DEFAULT: warning SHELL = /bin/sh CONFIG_FILE = $(shell pwd)/suite.xml @@ -8,6 +9,7 @@ PU = php phpunit.php --configuration ${CONFIG_FILE} all test: warning warning: + # Use 'make help' to get usage @echo "WARNING -- these tests are DESTRUCTIVE and will alter your wiki." @echo "DO NOT RUN THESE TESTS on a production wiki." @echo "" @@ -32,6 +34,15 @@ tap: coverage: ${PU} --coverage-html ../../../docs/code-coverage +parser: + ${PU} --group Parser + +noparser: + ${PU} --exclude-group Parser + +list-groups: + ${PU} --list-groups + help: # Usage: # make [OPTION=value] @@ -43,6 +54,10 @@ help: # help You're looking at it! # coverage Run the tests and generates an HTML code coverage report # You will need the Xdebug PHP extension for the later. + # [no]parser Skip or only run Parser tests + # + # list-groups List availabe Tests groups. + # # Options: # CONFIG_FILE Path to a PHPUnit configuration file (default: suite.xml) # FLAGS Additional flags to pass to PHPUnit diff --git a/maintenance/tests/phpunit/includes/parser/MediaWikiParserTest.php b/maintenance/tests/phpunit/includes/parser/MediaWikiParserTest.php index f441b98731..07dfb32ac9 100644 --- a/maintenance/tests/phpunit/includes/parser/MediaWikiParserTest.php +++ b/maintenance/tests/phpunit/includes/parser/MediaWikiParserTest.php @@ -24,7 +24,7 @@ class MediaWikiParserTest extends MediaWikiTestSetup { $tester->count = 0; foreach ( $iter as $test ) { - $tester->suite->addTest( new ParserUnitTest( $tester, $test ) ); + $tester->suite->addTest( new ParserUnitTest( $tester, $test ), array( 'Parser' ) ); $tester->count++; } -- 2.20.1