4 # testgroup.sh - Launch PHPUnit for specific test group(s).
6 # Usage: testgroup.sh [ -h <html-dir> ] [ -c <clover-xml-file> ]
7 # [ ALL | <test-group> [ <test-group> ... ] ]
9 # This script makes it easier to execute PHPUnit test runs from the
10 # shell, using @group tags defined in the test suite files to run
13 # To get a list of all @group tags:
14 # phpunit --list-groups AllTests.php
18 # This source file is subject to the new BSD license that is bundled
19 # with this package in the file LICENSE.txt.
20 # It is also available through the world-wide-web at this URL:
21 # http://framework.zend.com/license/new-bsd
22 # If you did not receive a copy of the license and are unable to
23 # obtain it through the world-wide-web, please send an email
24 # to license@zend.com so we can send you a copy immediately.
28 # @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
29 # @license http://framework.zend.com/license/new-bsd New BSD License
30 # @version $Id: AllTests.php 16225 2009-06-21 20:34:55Z thomas $
32 : ${PHPUNIT:="phpunit"}
33 : ${PHPUNIT_OPTS:="--verbose"}
36 while [ -n "$1" ] ; do
39 PHPUNIT_COVERAGE
="--coverage-html $2"
43 PHPUNIT_COVERAGE
="--coverage-clover $2"
50 Akismet|Amazon|Amazon_Ec2|Amazon_S3|Amazon_Sqs|Audioscrobbler|Delicious|Flickr|LiveDocx|Nirvanix|ReCaptcha|Simpy|SlideShare|StrikeIron|Technorati|Twitter|WindowsAzure|Yahoo
)
51 PHPUNIT_GROUPS
="${PHPUNIT_GROUPS:+"$PHPUNIT_GROUPS,"}Zend_Service_$1"
54 PHPUNIT_GROUPS
="${PHPUNIT_GROUPS:+"$PHPUNIT_GROUPS,"}Zend_Service_Amazon_$1"
58 PHPUNIT_GROUPS
="${PHPUNIT_GROUPS:+"$PHPUNIT_GROUPS,"}Zend_Search_Lucene"
62 PHPUNIT_GROUPS
="${PHPUNIT_GROUPS:+"$PHPUNIT_GROUPS,"}$1"
66 PHPUNIT_GROUPS
="${PHPUNIT_GROUPS:+"$PHPUNIT_GROUPS,"}Zend_$1"
72 ${PHPUNIT} ${PHPUNIT_OPTS} ${PHPUNIT_COVERAGE} ${PHPUNIT_DB} \
73 ${PHPUNIT_GROUPS:+--group $PHPUNIT_GROUPS} AllTests