scripted_tests.cfg #1

  • //
  • p4-sdp/
  • dev_rebrand/
  • test/
  • bsw/
  • scripted_tests.cfg
  • View
  • Commits
  • Open Download .zip Download (10 KB)
# Test Data File for Scripted Tests.
#
# Each test is a one-line entry of the form:
#
# <TestGroup>|<TestScript>|<ExitCode>|[<Host>:]<TestLog>|<ExpectedStringRegex>|<Comments>
# 
# Where:
# <TestGroup> 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_scripted_tests.sh with '-g <TestGroup>' 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.
#
# <TestScript> is a script to call. It can setup arbitrarily sophisticated
# tests. The script should accept no parameters. It should display some
# indication of the scenario being setup to test.
# The value of TestScript should be of the form:
#
# test_script-<TestDesc>.sh
#
# where <TestDesc> should contain letters, numbers, and underscores, but not
# dash or other special characters. For example, it could be:
# test_script-recover_correct_ckp_1.sh.  The _1 numeric suffix can be used
# to group together a family of related tests with TestDesc values that
# vary only by the suffix.  Scripts must exist in the test directory in a
# Battle School Lab Environment, i.e. /p4/sdp/test/bsw.
#
# The <TestScript> value can also be the special value 'no_script', meaning that no
# test script is executed. This allows additional checks of logs to be done based
# on the execution of the most recent executed test.
#
# <ExitCode> 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 <Output>). A special value of 'N' can be given to indicate that
# any non-zero exit code is accepted.
#
# If <TestScript> is set to 'no_script', the exit code is ignored, so fill a '-'
# in for the <ExitCode> field.
#
# <TestLog> 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. The <TestLost> can also be of the form <Host>:<Log> to indicate
# the expected string should be checked on the specified host. For example,
# a value of syd-helix-04:/p4/1/logs/recreate_offline_db.og will check that
# log on the syd-helix-04 host.
#
# The special value 'output' cannot be used if TestScript is set to 'no_script'.
#
# <ExpectedStringRegex> is a string of text expected of the executed command in
# either the output or a given logfile. The string can be a regular expression.
#
# <Comments> are short comments for the human reviewer of the test, describing what
# is expected in the output, what is being tested, etc.

# <TestGroup>|<TestScript>|<ExitCode>|[<Host>:]<TestLog>|<ExpectedStringRegex>|<Comments>

#==============================================================================
# Tests for recovering correct checkpoint for functions in backup_functions.sh.

#------------------------------------------------------------------------------
RecoverCorrectCKP|test_script-recover_correct_ckp_1.sh|0|/p4/1/logs/checkpoint.log|^Recovering from /p4/1/checkpoints/p4_1.ckp.*.gz|Serial checkpoint on commit.
RecoverCorrectCKP|no_script|-|/p4/1/logs/checkpoint.log|End p4_1 Checkpoint$|Checkpoint OK

#------------------------------------------------------------------------------
RecoverCorrectCKP|test_script-recover_correct_ckp_2.sh|0|/p4/1/logs/checkpoint.log|/p4/1/bin/p4d_1 -r /p4/1/offline_db -v track=-1 -z -N 4 -jrp /p4/1/checkpoints/p4_1.ckp.|Checkpoint replay with -jrp on commit.
RecoverCorrectCKP|no_script|-|/p4/1/logs/checkpoint.log|^Recovering from /p4/1/checkpoints/p4_1.ckp.*\.\.\.|Replay of parallel checkpoint.
RecoverCorrectCKP|no_script|-|/p4/1/logs/checkpoint.log|End p4_1 Checkpoint$|Checkpoint OK

#------------------------------------------------------------------------------
RecoverCorrectCKP|test_script-recover_correct_ckp_3.sh|0|syd-helix-04:/p4/1/logs/request_checkpoint.log|Running: /p4/1/bin/p4_1 admin checkpoint -Z$|Serial checkpoint requested on edge.
RecoverCorrectCKP|no_script|-|syd-helix-04:/p4/1/logs/recreate_offline_db.log|Running: /p4/1/bin/p4d_1 -r /p4/1/offline_db -v track=-1 -jr /p4/1/checkpoints.edge_syd/p4_1.edge_syd.ckp.*.gz|Load correct serial checkpoint on edge.
RecoverCorrectCKP|no_script|-|syd-helix-04:/p4/1/logs/recreate_offline_db.log|End p4_1 recreate offline db|Verify edge offline_db rebuild OK.

#------------------------------------------------------------------------------
RecoverCorrectCKP|test_script-recover_correct_ckp_4.sh|0|syd-helix-04:/p4/1/logs/request_checkpoint.log|Running: /p4/1/bin/p4_1 admin checkpoint -Z -p -m -N 4|Parallel checkpoint requested on edge.
RecoverCorrectCKP|no_script|-|syd-helix-04:/p4/1/logs/recreate_offline_db.log|Running: /p4/1/bin/p4d_1 -r /p4/1/offline_db -v track=-1 -z -N 4 -jrp /p4/1/checkpoints.edge_syd/p4_1.edge_syd.ckp.[0-9]+$|Load correct parallel checkpoint on edge.
RecoverCorrectCKP|no_script|-|syd-helix-04:/p4/1/logs/recreate_offline_db.log|End p4_1 recreate offline db|Verify edge offline_db rebuild OK.

#==============================================================================
# Tests for recovering checkpoints on edge servers.
#------------------------------------------------------------------------------
RecoverEdge|test_script-recover_edge_1.sh|0|syd-helix-04:/p4/1/logs/recover_edge.log|Phase 1: Recover edge seed from commit server into offline_db|Recover edge complete with recent workspaces.
RecoverEdge|no_script|-|syd-helix-04:/p4/1/logs/recover_edge.log|Recover checkpoint file from commit server|Verify edge received serial seed.
RecoverEdge|no_script|-|/p4/1/logs/edge_dump.log|Dumping to /p4/1/checkpoints/p4_1.edge_syd.seed.*.gz|Verify serial edge seed created.
RecoverEdge|no_script|-|/p4/1/logs/edge_dump.log|Edge seed checkpoint complete|Verify edge dump completed.
RecoverEdge|no_script|-|syd-helix-04:/p4/1/logs/recover_edge.log|Phase 4: Blend edge dump into offline_db|Check table blending on edge.
RecoverEdge|no_script|-|syd-helix-04:/p4/1/logs/recover_edge.log|Phase 7: Create a new edge checkpoint from offline_db|Check new edge checkpoint created.
RecoverEdge|no_script|-|syd-helix-04:/p4/1/logs/recover_edge.log|End p4_1 Recover Edge|Verify edge recovery completed.

#------------------------------------------------------------------------------
RecoverEdge|test_script-recover_edge_2.sh|0|syd-helix-04:/p4/1/logs/recover_edge.log|Phase 1: Recover edge seed from commit server into offline_db|Recover edge complete with recent workspaces.
RecoverEdge|no_script|-|syd-helix-04:/p4/1/logs/recover_edge.log|Recover checkpoint directory from commit server|Verify edge received parallel seed.
RecoverEdge|no_script|-|/p4/1/logs/edge_dump.log|Dumping to directory /p4/1/checkpoints/p4_1.edge_syd.seed.[0-9]+\.\.\.|Verify parallel edge seed created.
RecoverEdge|no_script|-|/p4/1/logs/edge_dump.log|Edge seed checkpoint complete|Verify edge dump completed.
RecoverEdge|no_script|-|syd-helix-04:/p4/1/logs/recover_edge.log|Phase 4: Blend edge dump into offline_db|Check table blending on edge.
RecoverEdge|no_script|-|syd-helix-04:/p4/1/logs/recover_edge.log|Phase 7: Create a new edge checkpoint from offline_db|Check new edge checkpoint created.
RecoverEdge|no_script|-|syd-helix-04:/p4/1/logs/recover_edge.log|End p4_1 Recover Edge|Verify edge recovery completed.

#==============================================================================
# Test for load_checkpoint.sh.

#------------------------------------------------------------------------------
LoadCheckpoint|test_script-load_checkpoint_1.sh|2|output|EXAMPLE|Man page check.

#------------------------------------------------------------------------------
LoadCheckpoint|test_script-load_checkpoint_2.sh|0|bos-helix-02:/p4/1/logs/load.log|Checkpoint to replay is: /p4/1/checkpoints/p4_1.ckp.*.gz .Seriel Checkpoint Replay.|Load serial checkpoint on standby.
LoadCheckpoint|no_script|0|bos-helix-02:/p4/1/logs/load.log|Current master journal state is|P4D alive after loading serial checkpoint on standby.
LoadCheckpoint|no_script|0|bos-helix-02:/p4/1/logs/load.log|All processing completed successfully.|Serial checkpoint on standby OK.
LoadCheckpoint|no_script|0|syd-helix-04:/p4/1/logs/load.log|Checkpoint to replay is: /p4/1/checkpoints.edge_syd/p4_1.edge_syd.ckp.*.gz|Load serial checkpoint on edge.
LoadCheckpoint|no_script|0|syd-helix-04:/p4/1/logs/load.log|Current master journal state is|P4D alive after loading serial checkpoint on edge.
LoadCheckpoint|no_script|0|syd-helix-04:/p4/1/logs/load.log|All processing completed successfully.|Serial checkpoint on edge OK.

#------------------------------------------------------------------------------
LoadCheckpoint|test_script-load_checkpoint_3.sh|0|bos-helix-02:/p4/1/logs/load.log|Checkpoint to replay is: /p4/1/checkpoints/p4_1.ckp.* .Parallel Checkpoint Replay|Load parallel checkpoint on standby.
LoadCheckpoint|no_script|0|bos-helix-02:/p4/1/logs/load.log|Current master journal state is|P4D alive after loading parallel checkpoint on standby.
LoadCheckpoint|no_script|0|bos-helix-02:/p4/1/logs/load.log|All processing completed successfully.|Parallel checkpoint on standby OK.
LoadCheckpoint|no_script|0|syd-helix-04:/p4/1/logs/load.log|Checkpoint to replay is: /p4/1/checkpoints.edge_syd/p4_1.edge_syd.ckp.* .Parallel Checkpoint Replay|Load parallel checkpoint on edge.
LoadCheckpoint|no_script|0|syd-helix-04:/p4/1/logs/load.log|Current master journal state is|P4D alive after loading parallel checkpoint on edge.
LoadCheckpoint|no_script|0|syd-helix-04:/p4/1/logs/load.log|All processing completed successfully.|Parallel checkpoint on edge OK.

LiveCheckpointOffCommit|test_script-live-checkpoint-off-commit.sh|0|syd-helix-04:/p4/1/logs/checkpoint.log|End p4_1 Checkpoint|Checkpoint on edge server.
LiveCheckpointOffCommit|no_script|0|bos-helix-02:/p4/1/logs/checkpoint.log|End p4_1 Checkpoint|Checkpoint on edge server.
# Change User Description Committed
#1 31751 C. Thomas Tyler p4 stream convertsparse
//p4-sdp/dev/test/bsw/scripted_tests.cfg
#2 31574 C. Thomas Tyler Merged SDP 2024.2 Patch 4 from Classic to Streams.
p4 merge -b SDP_Classic_to_Streams
#1 31397 C. Thomas Tyler Populate -b SDP_Classic_to_Streams -s //guest/perforce_software/sdp/...@31368.
//guest/perforce_software/sdp/dev/test/bsw/scripted_tests.cfg
#11 31075 C. Thomas Tyler Corrected host name in test data.
#10 31043 C. Thomas Tyler Add scripted test for live checkpoint off commit (i.e.
on edge, standby).
#9 30747 C. Thomas Tyler Added Test Group concept to run_cli_tests.sh, with same meaning and
usage as in run_scripted_tests.sh. The goal is to allow running
a defined subset of tests.
#8 30742 C. Thomas Tyler Added support for specifying exit code as 'N' for non-zero.
#7 30677 C. Thomas Tyler Added 13 tests for load_checkpoint.sh.
Added 'TestGroup' field to scripted_testse.cfg.
#6 30650 C. Thomas Tyler Adapted scripted tests to tweaks in expected script output.
#5 30649 C. Thomas Tyler Added more tests for recover_edge.sh and related scripts, and improved
auditability the first test script for recover_edge.sh.
#4 30643 C. Thomas Tyler Added tests for recover_edge.sh.
#3 30626 C. Thomas Tyler Refined test harness logic and added more tests.
#2 30623 C. Thomas Tyler Added feature for scripted test to run addtional checks from an earlier
execution of a script.

Added more tests.
#1 30622 C. Thomas Tyler Added files for initial SDP BSW test suite.