[MANUAL] German:
[zend.git] / tests / runtests.sh
blobe241d0b0c16108030a0b112a8cbfaf5f23996c04
2 # Zend Framework
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
11 # subsets of tests.
13 # To get a list of all @group tags:
14 # phpunit --list-groups AllTests.php
16 # LICENSE
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.
26 # @category Zend
27 # @package UnitTests
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"}
34 : ${PHPUNIT_GROUPS:=}
36 while [ -n "$1" ] ; do
37 case "$1" in
38 -h|--html)
39 PHPUNIT_COVERAGE="--coverage-html $2"
40 shift 2 ;;
42 -c|--clover)
43 PHPUNIT_COVERAGE="--coverage-clover $2"
44 shift 2 ;;
46 ALL|all|MAX|max)
47 PHPUNIT_GROUPS=""
48 break ;;
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"
52 shift ;;
53 Ec2|S3)
54 PHPUNIT_GROUPS="${PHPUNIT_GROUPS:+"$PHPUNIT_GROUPS,"}Zend_Service_Amazon_$1"
55 shift ;;
57 Search)
58 PHPUNIT_GROUPS="${PHPUNIT_GROUPS:+"$PHPUNIT_GROUPS,"}Zend_Search_Lucene"
59 shift ;;
61 Zend*)
62 PHPUNIT_GROUPS="${PHPUNIT_GROUPS:+"$PHPUNIT_GROUPS,"}$1"
63 shift ;;
66 PHPUNIT_GROUPS="${PHPUNIT_GROUPS:+"$PHPUNIT_GROUPS,"}Zend_$1"
67 shift ;;
68 esac
69 done
71 set -x
72 ${PHPUNIT} ${PHPUNIT_OPTS} ${PHPUNIT_COVERAGE} ${PHPUNIT_DB} \
73 ${PHPUNIT_GROUPS:+--group $PHPUNIT_GROUPS} AllTests