配置Jenkins和Perforce以自动运行我的junit测试

时间:2014-04-17 15:53:08

标签: jenkins perforce jenkins-plugins

我正在尝试使用Perforce配置Jenkins,以便我可以自动执行junit测试构建。

请参阅我的配置的屏幕截图。 enter image description here

这是Perforce安装配置: enter image description here

但我得到一个例外:

Building in workspace <http://host:8080/job/Critical%20Events%20Tool/ws/>
Using master perforce client: FRA_Jenkins_CriticalTool [workspace] $ "C:\Program     Files\Perforce\p4.exe" workspace -o FRA_Jenkins_CriticalTool [workspace] $ "C:\Program Files\Perforce\p4.exe" login -a -p [workspace] $ "C:\Program Files\Perforce\p4.exe" -P AEA1F4274926EC4525326163DF42D5A4 workspace -o FRA_Jenkins_CriticalTool Changing P4 Client Root to: <http://localhost:8080/job/Critical%20Events%20Tool/ws/>
Changing P4 Client View from:
-//something/... //FRA_Jenkins_CriticalTool/...
//something/PPS/... //FRA_Jenkins_CriticalTool/PPS/...
-//something/* //FRA_Jenkins_CriticalTool/*

Changing P4 Client View to: 
  //something/PPS/CriticalEventTool/ //FRA_Jenkins_CriticalTool/PPS/CriticalEventTool/
Saving modified client FRA_Jenkins_CriticalTool [workspace] $ "C:\Program Files\Perforce\p4.exe" -P AEA1F4274926EC4525326163DF42D5A4 -s client -i Caught exception communicating with perforce.  Error in client specification. Error detected at line 9. Null directory (//) not allowed in '//something/PPS/CriticalEventTool/'. Null directory (//) not allowed in '//something/PPS/CriticalEventTool/'

For Command:C:\ Program Files \ Perforce \ p4.exe -P AEA1F4274926EC4525326163DF42D5A4 -s client -i With Data:

Client: FRA_Jenkins_CriticalTool
Owner: user1
Description: Created by user1.
Root: <http://localhost:8080/job/Critical%20Events%20Tool/ws/>
Options: noallwrite clobber nocompress unlocked nomodtime rmdir
SubmitOptions: submitunchanged
LineEnd: local
View:
  //something/PPS/CriticalEventTool/ //FRA_Jenkins_CriticalTool/PPS/CriticalEventTool/


===================
com.tek42.perforce.PerforceException:  Error in client specification. Error detected at line 9. Null directory (//) not allowed in '//something/PPS/CriticalEventTool/'. Null directory (//) not allowed in '//something/PPS/CriticalEventTool/'.
For Command: C:\Program Files\Perforce\p4.exe -P AEA1F4274926EC4525326163DF42D5A4 -s client -i 
With Data:
===================
Client: FRA_Jenkins_CriticalTool
Owner: user1
Description: Created by user1.
Root: <http://localhost:8080/job/Critical%20Events%20Tool/ws/>
Options: noallwrite clobber nocompress unlocked nomodtime rmdir
SubmitOptions: submitunchanged
LineEnd: local
View:
  //something/PPS/CriticalEventTool/ //FRA_Jenkins_CriticalTool/PPS/CriticalEventTool/


===================

at com.tek42.perforce.parse.AbstractPerforceTemplate.saveToPerforce(AbstractPerforceTemplate.java:270)
at com.tek42.perforce.parse.Workspaces.saveWorkspace(Workspaces.java:77)
at hudson.plugins.perforce.PerforceSCM.saveWorkspaceIfDirty(PerforceSCM.java:1790)
at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:895)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1320)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:609)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:518)
at hudson.model.Run.execute(Run.java:1700)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:231)
ERROR: Unable to communicate with perforce.  Error in client specification. Error detected at line 9. Null directory (//) not allowed in '//something/PPS/CriticalEventTool/'. Null directory (//) not allowed in '//something/PPS/CriticalEventTool/'.
For Command: C:\Program Files\Perforce\p4.exe -P AEA1F4274926EC4525326163DF42D5A4 -s client -i 
With Data
===================
Client: FRA_Jenkins_CriticalTool
Owner: user1
Description: Created by user1.
Root: <http://localhost:8080/job/Critical%20Events%20Tool/ws/>
Options: noallwrite clobber nocompress unlocked nomodtime rmdir
SubmitOptions: submitunchanged
LineEnd: local
View:
  //something/PPS/CriticalEventTool/ //FRA_Jenkins_CriticalTool/PPS/CriticalEventTool/

什么是错的,如何自动自动化我的junit测试?

1 个答案:

答案 0 :(得分:2)

我相信你只需要在ViewMap的末尾添加“...”,这样它就会显示//某事/ PPS / CriticalEventTool / ...