# Test Data File for Command Line tests. # # Each test is a one-line entry of the form: # # ||||| # # Where: # is an arbitrary name used to apply to a group of tests, allowing that group # of tests to be executed independently of other configured tests. By default, all # tests are executed; call run_cli_tests.sh with '-g ' to indicate that the # specified group of tests are to be run. This is intended to speed up interactive testing # for a focused group of tests. # # is the Perforce command to execute. If it starts with 'p4 ', the # 'p4 ' wll be substituted at runtime with 'p4 -p -u -c ', # where the port/user/client values are dependint test configuration data in # test_sdp.*.cfg files. # # Alternately, the 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. # # If the does not start with 'p4 ' or 'p4:user:client ', it is deemed # to be an arbitrary command and it is executed as is. # # The value can also be the special value 'no_cmd', meaning that no # test command is executed. This allows additional checks of logs to be done based # on the execution of the most recent executed test. # # is the expected exit code, which must be a whole number (integer 0 or # greater). If the actual test exist code is not match, the test is deemed to have # failed. A special value of 'U' meaning Undefined can be given rather than a # whole number to indicate that any exit code is accepted. (The test may still fail # depending on the ). A special value of 'N' can be given to indicate that # any non-zero exit code is accepted. # # Specify the absolute path to the log containing the expected string, # or the special value 'output' to scan the output of the command rather than # a log file. # # is a string of text expected of the executed command in # either the ouptutor a given logfile. The string can be a regular expression. # # are short comments for the human reviewer of the test, describing what # is expected in the output, what is being tested, etc. #------------------------------------------------------------------------------ # Some of the defined "tests" are test setup, such as the call to DANGER_CLEAN.sh # and install of the latest version of install_sdp.sh into /root/install_sdp. # Each test group is intended to be executable independently. Thus, there is # redundacy of test setup in each group. #------------------------------------------------------------------------------ # Setup and basic tests of usage massage and early abort. Usage|mkdir -p /root/install_sdp|0|output||Test Setup Step: Create /root/install_sdp directory. Usage|cp -p /opt/perforce/dev/sdp/Server/Unix/setup/install_sdp.sh /root/install_sdp/.|0|output||Test Setup: Copy install_sdp.sh script to /root/install_sdp. Usage|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -h|2|output||Usage synopsis for install_sdp.sh Usage|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -man|2|output|DESCRIPTION|Usage: Full man page for install_sdp.sh. Usage|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -empty -bogus_option|2|output|USAGE ERROR|Usage: Bogus usage test. Usage|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -empty -init|2|output|USAGE ERROR: Specify exactly one of|Usage: Using more than one data handling parameter; abort expected. Usage|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -init -sampledepot|2|output|USAGE ERROR: Specify exactly one of|Usage: Using more than one data handling parameter; abort expected. Usage|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -empty -ued -init|2|output|USAGE ERROR: Specify exactly one of|Usage: Using more than one data handling parameter; abort expected. #------------------------------------------------------------------------------ # Fast, no-install-required checks of '-V'/'-version'/'--version' output # (SDP-799). Exact version strings vary by changelist, so assertions match # the stable "