File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 2
2
3
3
. gitlab/ci_settings.sh
4
4
5
+ DIR=" $PWD "
6
+
5
7
export version=$1
6
8
unittest=$2
7
9
[ " $version " = " 8.1" ] && CODECOVERAGE=1 || CODECOVERAGE=0
@@ -29,17 +31,17 @@ pcov=""
29
31
phpcov=" "
30
32
if [ " $CODECOVERAGE " -eq 1 ]; then
31
33
phpcov=" -dpcov.enabled=1 -dpcov.directory=webapp/src"
32
- pcov=" --coverage-html=${CI_PROJECT_DIR } /coverage-html --coverage-clover coverage.xml"
34
+ pcov=" --coverage-html=${DIR } /coverage-html --coverage-clover coverage.xml"
33
35
fi
34
36
set +e
35
- php $phpcov webapp/bin/phpunit -c webapp/phpunit.xml.dist webapp/tests/$unittest --log-junit ${CI_PROJECT_DIR } /unit-tests.xml --colors=never $pcov > " $GITLABARTIFACTS " /phpunit.out
37
+ php $phpcov webapp/bin/phpunit -c webapp/phpunit.xml.dist webapp/tests/$unittest --log-junit ${DIR } /unit-tests.xml --colors=never $pcov > " $GITLABARTIFACTS " /phpunit.out
36
38
UNITSUCCESS=$?
37
39
set -e
38
40
CNT=0
39
41
if [ $CODECOVERAGE -eq 1 ]; then
40
42
CNT=$( sed -n ' /Generating code coverage report/,$p' " $GITLABARTIFACTS " /phpunit.out | grep -v DoctrineTestBundle | grep -cv ^$)
41
43
FILE=deprecation.txt
42
- sed -n ' /Generating code coverage report/,$p' " $GITLABARTIFACTS " /phpunit.out > ${CI_PROJECT_DIR } /$FILE
44
+ sed -n ' /Generating code coverage report/,$p' " $GITLABARTIFACTS " /phpunit.out > ${DIR } /$FILE
43
45
if [ $CNT -le 32 ]; then
44
46
STATE=success
45
47
else
You can’t perform that action at this time.
0 commit comments