Simple Tests for P4Java Methods Download dist/JenkinsOps.zip and unzip. This will give you these files: JenkinsOps.jar lib/p4java-20NN.N.xxxxx-bundle.jar lib/commons-lang3-3.9.jar For help, run java -jar JenkinsOps.jar This package runs various p4java and other tests to isolate problems with Jenkins P4 Plugin operations. The goal is to determine if the problem is with Jenkins or the P4 Plugin, P4Java, or Java. You should run these tests as the jenkins OS user. General Syntax: java <optional java system props> -cp JenkinsOps.jar <command> <args> Add Java system properties before the -cp. For example: java -DsecureSocketEnabledProtocols=TLSv1.2 -cp JenkinsOps.jar <command> <args> A P4Java uri looks like 'p4java://host:port' or 'p4javassl://host:port' The command and args are: test.Reconcile <p4java uri> <client> <user> <password> <filespec> The user must already be logged in if password is zero-length string. test.Sync <p4java uri> <client> <user> <password> <filespec ...> The user must already be logged in if password is zero-length string. Use java system prop -Dhave=false to not populate the have table. test.StreamingSync <p4java uri> <user> <password> <client> <filespec ...> The user must already be logged in if password is zero-length string. Use java system prop -Dhave=false to not populate the have table. For Sync and Streaming sync you can use these optional java system properties: -Dhave=false to not populate the have table -Dcharset=<charset> to set the connections P4CHARSET for encoding and decoding perforce type 'unicode' files. -Dlog=<anyvalue> to log internal exceptions test.Link src-file link-name ---------- Other common P4Java system properties: -DsecureSocketEnabledProtocols=TLSv1.2 -DwriteInPlace=true -DticketPath=c:\some\path\p4tickets.txt ---------- If you need a different p4java version, send email to support@perforce.com. Faster is to replace the p4java-*-bundle.jar in the lib dir but you MUST use the same filename.
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#5 | 28709 | Joel Brown |
Allow setting character encoding (charset) with syncs with the Java System Property -Dcharset=<value> |
||
#4 | 28442 | Joel Brown | Additional clarifications for running the tests. | ||
#3 | 27670 | Joel Brown |
Add to Sync and Streaming Sync the ability to not populate the have table java -Dhave=false -cp JenkinsOps.jar .... |
||
#2 | 26533 | Joel Brown |
Add Streaming Sync test. This will use a streaming sync call similar to what P4 Plugin for Jenkins uses. |
||
#1 | 25636 | Joel Brown | Simple P4Java methods to sync and reconcile. |