# Test Data File. # # Each test is a one-line entry of the form: # # <P4Cmd>|<ExitCode>|[CBDLOG:]<Output>|<Comments> # # Where: # <P4Cmd> is the Perforce command to execute. Must start with 'p4 ', which will be # substituted at runtime with 'p4 -p <port> -u <user> -c <client>', where the # port/user/client values are dependint test configuration data in # test_cbd.*.cfg files. # # Alternately, the <P4Cmd> can start with 'p4:user:client ', to execute # commands as a user or in a workspace defined in the test entry. The user # is typically 'bruno' or some other user from the Perforce Sample Depot data set. # The <port> value cannot be overriden. # # <ExitCode> is the expected exit code, which must be a positive integer or the # special value of 'U' meaning Undefined -- any exit code is accepted. # # <Output> is a string of text expected in the output of running the command. # Alternately, if prefixed with 'CBDLOG:', the cbd.log file is checked instead # for the expected tring. # # Comments are short comments for the human reviewer of the test, describing what is expected # in the output, what is being tested, etc. # Sample: Run 'p4 -s info -s' command. Expect a zero exit code with "Server address" # in the output. #p4 -s info -s|0|Server address|p4 info command. # Sample: Run 'p4 -s infox -s' (which does not exist). Expect a 1 exit code with "Unknown command" # in the output. #p4 -s infox -s|1|error: Unknown command.|Broken p4 info command. # These next two entries are sample bogus test entries. These will abort the # test_cbd.sh test run unless '-f' is used, in which case they'll just be # ignored. #p4 -s info -s|BogusExitCode|blah|Sample bad test data entry. #p4x -s info -s|U|Blah|Sample bad test data entry. # This is a real test: p4 sbi|1|clientVersion|Showing broker input values. p4 keys|0|cbd_stream_jam_rel2.1_path0|Showing key values. p4 sync|0|//pb/1.5.1-p/...@8906|Expect rewrite with all import paths using keys. p4 print -q //jam/rel2.1/jam.cbdsst@12106|0|//gwt-streams/release1.5/...@12047|Showing contents of jam.cbdsst@12106 p4 sync @12106|0|//gwt-streams/release1.5/...@12047|Expect rewrite with all import paths using file, *.cbdsst file rev 1. p4 print -q //jam/rel2.1/jam.cbdsst@12107|0|//gwt-streams/release1.5/...@12048|Showing contents of jam.cbdsst@12107 p4 sync @12107|0|//gwt-streams/release1.5/...@12048|Expect rewrite with all import paths using file, *.cbdsst file rev 2. p4 print -q //jam/rel2.1/jam.cbdsst@12108|0|//gwt-streams/release1.5/...@12050|Showing contents of jam.cbdsst@12108 p4 sync @12108|0|//gwt-streams/release1.5/...@12050|Expect rewrite with all import paths using file, *.cbdsst file rev 3. p4 sync //...|0|//gwt-streams/release1.5/...@12050|Expect rewrite with all import paths using keys. p4 sync //jam/...|0|//gwt-streams/release1.5/...@12050|Expect rewrite with all import paths using keys. p4 sync -f //jam/rel2.1/src/Build.com#head|0|CBDLOG:Rewrite: arg: //jam/rel2.1/src/Build.com#head|Force sync of an individual file. p4 sync //jam/...@12106|0|//gwt-streams/release1.5/...@12047|Expect rewrite with all import paths using file, *.cbdsst file rev 1. p4 sync //pb/...@12106|0|//pb/1.5.1-p/src/option.h#2|Expect rewrite of import paths using file specified revision, ignoring keys. p4 sync //jam/rel2.1/...|0|//pb/1.5.1-p/...@8906|Expect rewrite with all import paths using keys. p4 sync //jam/rel2.1/...@12106|0|//gwt-streams/release1.5/...@12047|Expect rewrite with all import paths using file, *.cbdsst file rev 1. p4 sync //jam/rel2.1/src/...|0|CBDLOG:Seeking CBD rule for pathArg|Illustrate a narrow sync. CBD rule applies, but just the one for this path. p4 sync //jam/rel2.1/src/...@12106|0|CBDLOG:Ignoring CBD rules in favor of explicit revision specifier for path|User-provided revision specifer overrides CBD value. p4 sync -n -k //jam/rel2.1/src/...@12106|0|CBDLOG:Read args -n,-k,//jam/rel2.1/src/...@12106|Confirming that flags are passed along, and don't otherwise affect processing. p4 flush //jam/rel2.1/src/...@12106|0|CBDLOG:Ignoring CBD rules in favor of explicit revision specifier for path|Flush should be handled same as sync. p4:earl:bruno_ws flush //depot/Jam/MAIN/src/Build.com|0|CBDLOG:Ignoring classic workspace bruno_ws|Test pass-thru of sync in a classic workspace. # This example with 'U' and an empty value for the expected string would be # for informational purposes only, since the test would never fail. #p4 sync -n -k //jam/rel2.1/src/...@12106|U||3+Levels, No rewrite expected. Pass thru verbatim.
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 19870 | stephan_herter | "Forking branch main of perforce-software-cbd to stephan_herter-cbd." | ||
//guest/perforce_software/cbd/main/test/shared/cli_tests.cfg | |||||
#2 | 15282 | C. Thomas Tyler | Copy Up using 'p4 copy -r -b perforce_software-cbd-dev'. | ||
#1 | 15169 | C. Thomas Tyler |
Copy Up using 'p4 copy -r -b perforce_software-cbd-ntx64'. Holding off promote of SSTemplateUpdate.ply for now. |
||
//guest/perforce_software/cbd/main/test/shared/cli_tests.txt | |||||
#1 | 15009 | C. Thomas Tyler | Promoted CBD development work to main from dev. | ||
//guest/perforce_software/cbd/dev/test/shared/cli_tests.txt | |||||
#1 | 14907 | C. Thomas Tyler |
Moved test data files into 'shared' folder to make them available on the 'helix-01' text VM, and tweaked test_cbd.sh to reference them there. |
||
//guest/perforce_software/cbd/dev/test/cli_tests.txt | |||||
#2 | 14844 | C. Thomas Tyler |
Overhauled regression test suite. Added various command line tests. Enhanced test suite to allow entries in the test data file to specify alternate user and workspaces (differing from defaults defined in the test test configuration files, test_cbd.*.cfg) for certain tests. Added new testing method, broker input testing, to augment existing command line testing. This test method simulates having 'p4d' call the CBD broker sync script by feeding handcrafted/simulated broker input files to the CBD engine, simulating the way p4d uses stdin to feed the broker parameters when a user makes a request. This enables more diverse testing and better simulation of Window and P4V-side testing. |
||
#1 | 14199 | C. Thomas Tyler | Added test suite. |