Phpunit在shell中运行,但在Jenkins中失败

Phpunit在shell中运行,但在Jenkins中失败,jenkins,phpunit,Jenkins,Phpunit,当我在shell中运行PhpUnit测试时,它们运行正常,但当从Jenkin的构建步骤Execute shell运行时,它会失败,原因是: [workspace] $ /bin/sh -xe /tmp/hudson3868615221631158667.sh + phpunit --log-junit trunk/tests/phpunit_results.xml --bootstrap trunk/tests/bootstrap.php trunk/tests/ E_WARNING: mkdi

当我在shell中运行PhpUnit测试时,它们运行正常,但当从Jenkin的构建步骤Execute shell运行时,它会失败,原因是:

[workspace] $ /bin/sh -xe /tmp/hudson3868615221631158667.sh
+ phpunit --log-junit trunk/tests/phpunit_results.xml --bootstrap trunk/tests/bootstrap.php trunk/tests/
E_WARNING: mkdir(): No such file or directory

in Nette/common/Configurator.php(255) 
in Nette/common/Configurator.php(255) mkdir()
in Nette/common/Configurator.php(141) Nette\Configurator->getCacheDirectory()
in trunk/tests/bootstrap.php(14) Nette\Configurator->createRobotLoader()
in phpunit/Util/Fileloader.php(93) include_once()
in phpunit/Util/Fileloader.php(77) PHPUnit_Util_Fileloader::load()
in phpunit/TextUI/Command.php(808) PHPUnit_Util_Fileloader::checkAndLoad()
in phpunit/TextUI/Command.php(586) PHPUnit_TextUI_Command->handleBootstrap()
in phpunit/TextUI/Command.php(141) PHPUnit_TextUI_Command->handleArguments()
in phpunit/TextUI/Command.php(132) PHPUnit_TextUI_Command->run()
in local/bin/phpunit(586) PHPUnit_TextUI_Command::main()
Build step 'Execute shell' marked build as failure
我发现了一些类似的问题,但没有一个能回答/解决我的问题

以下是从shell运行的结果:

user@server:~/$ phpunit --log-junit trunk/tests/phpunit_results.xml --bootstrap trunk/tests/bootstrap.php trunk/tests/
ccccPHPUnit 4.1.3 by Sebastian Bergmann.
.......
Time: 128 ms, Memory: 6.75Mb
OK (7 tests, 8 assertions)

我欢迎所有建议。

为什么在Jenkins和in-shell中使用不同的命令?抱歉,这是一个复制粘贴错误。当然,命令是相同的。Solvedbypassed,问题是,很明显,我的服务器上的php无法创建目录。别问我为什么。我只是修改了脚本来创建框架需要的所有目录,即空临时目录/