2010-04-23 32 views
1

我收到下面提到的錯誤。幫助是非常需要的... 好心經歷錯誤。如何用PHPunit配置CI哈德森,以及如何使用哈德森運行phpunit?

通過SCM變革

Updating https://suppliesguys.unfuddle.com/svn/suppliesguys_frontend2/Frontend-Texity/src 
U   sites\all\modules\print\print_pdf\print_pdf.pages.inc 
At revision 1134 
[workspace] $ sh -xe C:\WINDOWS\TEMP\hudson6292587174545072503.sh 
The system cannot find the file specified 
FATAL: command execution failed 
java.io.IOException: Cannot run program "sh" (in directory "E:\Projects\Hudson\.hudson\jobs\TSG\workspace"): CreateProcess error=2, The system cannot find the file specified 
at java.lang.ProcessBuilder.start(Unknown Source) 
at hudson.Proc$LocalProc.<init>(Proc.java:149) 
at hudson.Proc$LocalProc.<init>(Proc.java:121) 
at hudson.Launcher$LocalLauncher.launch(Launcher.java:636) 
at hudson.Launcher$ProcStarter.start(Launcher.java:271) 
at hudson.Launcher$ProcStarter.join(Launcher.java:278) 
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:83) 
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:58) 
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) 
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:584) 
at hudson.model.Build$RunnerImpl.build(Build.java:174) 
at hudson.model.Build$RunnerImpl.doRun(Build.java:138) 
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416) 
at hudson.model.Run.run(Run.java:1244) 
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) 
at hudson.model.ResourceController.execute(ResourceController.java:88) 
at hudson.model.Executor.run(Executor.java:122) 
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified 
at java.lang.ProcessImpl.create(Native Method) 
at java.lang.ProcessImpl.<init>(Unknown Source) 
at java.lang.ProcessImpl.start(Unknown Source) 
... 17 more 
Publishing Javadoc 
Publishing Clover coverage report... 
No Clover report will be published due to a Build Failure 
[xUnit] Starting to record. 
[xUnit] [PHPUnit] - Use the embedded style sheet. 
[xUnit] [ERROR] - No test report file(s) were found with the pattern 'build/logs/phpunit.xml' relative to 'E:\Projects\Hudson\.hudson\jobs\TSG\workspace' for the testing framework 'PHPUnit'. Did you enter a pattern relative to the correct directory? Did you generate the result report(s) for 'PHPUnit'? 
[xUnit] Stopping recording. 
Finished: FAILURE 

回答

1

開始看起來你有幾個問題:

FATAL: command execution failed java.io.IOException: Cannot run program "sh" (in directory "E:\Projects\Hudson.hudson\jobs\TSG\workspace"): 

是正在運行的哈德遜工作中沒有「sh」的命令的用戶其路徑,所以它不能運行shell腳本。將/ bin添加到Hudson用戶的$ PATH應該可以解決這個問題。

[xUnit] [ERROR] - No test report file(s) were found with the pattern 'build/logs/phpunit.xml' relative to 'E:\Projects\Hudson.hudson\jobs\TSG\workspace' for the testing framework 'PHPUnit'. 

這可能是前面錯誤的結果;該構建只是沒有足夠的運行PHPUnit測試。

1

看起來您正在Windows系統上使用「Execute shell」構建步驟而不是「執行Windows批處理命令」構建步驟。 Windows通常不會有'sh',所以前者將無法工作。

0

'sh'用於Linux實現。在Windows中使用'.exe'和'bat'文件。你想在Windows或Linux上安裝並運行Hudson嗎?