-
Notifications
You must be signed in to change notification settings - Fork 75
Expand file tree
/
Copy pathMakefile
More file actions
69 lines (63 loc) · 2.87 KB
/
Copy pathMakefile
File metadata and controls
69 lines (63 loc) · 2.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#######################################################
# DO NOT EDIT THIS FILE! #
# #
# It's auto-generated by symfony-cmf/dev-kit package. #
#######################################################
############################################################################
# This file is part of the Symfony CMF package. #
# #
# (c) Symfony CMF #
# #
# For the full copyright and license information, please view the LICENSE #
# file that was distributed with this source code. #
############################################################################
TESTING_SCRIPTS_DIR=vendor/symfony-cmf/testing/bin
CONSOLE=${TESTING_SCRIPTS_DIR}/console
VERSION=dev-master
ifdef BRANCH
VERSION=dev-${BRANCH}
endif
PACKAGE=symfony-cmf/routing-bundle
export KERNEL_CLASS=Symfony\Cmf\Bundle\RoutingBundle\Tests\Fixtures\App\Kernel
list:
@echo 'test: will run all tests'
@echo 'unit_tests: will run unit tests only'
@echo 'functional_tests_phpcr: will run functional tests with PHPCR'
@echo 'functional_tests_orm: will run functional tests with ORM'
unit_tests:
@echo
@echo '+++ run unit tests +++'
ifeq ($(HAS_XDEBUG), 0)
@vendor/bin/phpunit --coverage-clover build/logs/clover.xml --testsuite "unit tests"
else
@vendor/bin/phpunit --testsuite "unit tests"
endif
functional_tests_orm:
@if [ "${CONSOLE}" = "" ]; then echo "Console executable missing"; exit 1; fi
@echo
@echo '+++ create ORM database +++'
@${CONSOLE} doctrine:schema:drop --env=orm --force
@${CONSOLE} doctrine:database:create --env=orm || echo "Failed to create database. If this is sqlite, this is normal. Otherwise there will be an error with schema creation"
@${CONSOLE} doctrine:schema:create --env=orm
@echo '+++ run ORM functional tests +++'
ifeq ($(HAS_XDEBUG), 0)
@vendor/bin/phpunit --coverage-clover build/logs/clover.xml --testsuite "functional tests with orm"
else
@vendor/bin/phpunit --testsuite "functional tests with orm"
endif
@${CONSOLE} doctrine:database:drop --force
functional_tests_phpcr:
@if [ "${CONSOLE}" = "" ]; then echo "Console executable missing"; exit 1; fi
@echo
@echo '+++ create PHPCR +++'
@${CONSOLE} doctrine:phpcr:init:dbal --drop --force
@${CONSOLE} doctrine:phpcr:repository:init
@echo '+++ run PHPCR functional tests +++'
ifeq ($(HAS_XDEBUG), 0)
@vendor/bin/phpunit --coverage-clover build/logs/clover.xml --testsuite "functional tests with phpcr"
else
@vendor/bin/phpunit --testsuite "functional tests with phpcr"
endif
@${CONSOLE} doctrine:database:drop --force
.PHONY: test
test: unit_tests functional_tests_phpcr functional_tests_orm