【发布时间】:2017-08-05 16:25:44
【问题描述】:
Jenkins 版本 - 2.22
Phing 版本 - 0.13.3
PHPUnit 版本 - 5.7.19
phpunit.xml
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="bootstrap/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<testsuites>
<testsuite name="Application Test Suite">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./app/Managers</directory>
</whitelist>
</filter>
<php>
<env name="APP_ENV" value="testing"/>
<env name="CACHE_DRIVER" value="array"/>
<env name="SESSION_DRIVER" value="array"/>
<env name="QUEUE_DRIVER" value="sync"/>
</php>
</phpunit>
build.xml
...
<coverage-setup database="./report/coverage/database">
<fileset id="coverageFileSet" dir="./app/Managers">
<include name="**/*Manager*.php" />
</fileset>
</coverage-setup>
<phpunit pharlocation="./vendor/phpunit/phpunit/phpunit" configuration="./phpunit.xml" printsummary="true" haltonerror="true" haltonfailure="true" codecoverage="true">
<formatter type="clover" outfile="report/coverage/clover.xml"/>
</phpunit>
<coverage-report outfile="report/coverage/coverage.xml">
<report todir="report/coverage"/>
</coverage-report>
...
当我在Jenkins 中运行phing 目标时,出现以下错误。
unrecognized option -- b
我做错了什么?或任何帮助如何调试此问题?
注意 - 这是 laravel-5.4 应用程序,当我从应用程序的根文件夹运行 phpunit 时,它正在工作。
【问题讨论】:
-
消息
unrecognized option -- bobviously originates from PHPUnit。也许 Phing 任务以错误的方式使用它? -
@Joe 是的,但我想知道我做错了吗?无论如何我能找到那个选项
b,它可能有助于找到问题 -
听起来很像Issue。根据commit mentioned there,它可能适用于旧版本的 PHPUnit (
-
运行
phing -verbose甚至phing -debug可能会显示phing实际用于启动phpunit的选项。也许你会在那里找到你的b。