Added explanations to the flags to the help message.

Also fixed indentation.
This commit is contained in:
Tom Hacohen 2013-04-26 14:19:05 +01:00
parent 33df8ecb2c
commit c00c3aaa29
1 changed files with 67 additions and 59 deletions

View File

@ -20,65 +20,73 @@ function VERBOSE()
} }
do_help () { do_help () {
echo "Use $0 to test application screen-layout." echo "Use $0 to test application screen-layout."
echo "First, you need to compose a tests file as follows:" echo "First, you need to compose a tests file as follows:"
echo "Each line begins with test name" echo "Each line begins with test name"
echo "second field is test-command and [optional] params." echo "second field is test-command and [optional] params."
echo "Any line starting with '#' is a comment (ignored):" echo "Any line starting with '#' is a comment (ignored):"
echo echo
echo "# This is a comment line" echo "# This is a comment line"
echo "TestName TestCmd [param1] [param2]" echo "TestName TestCmd [param1] [param2]"
echo echo
echo "Later, you run $0 with the tests file as parameter." echo "Later, you run $0 with the tests file as parameter."
echo echo
echo "By default, exactness runs through test file running all tests specified." echo "By default, exactness runs through test file running all tests specified."
echo "You may run selected tests by adding test name as param to exactness." echo "You may run selected tests by adding test name as param to exactness."
echo "Usage:" echo "Usage:"
echo "$0 -s TestsFile TestName1 [TestName2] [...]" echo "$0 -s TestsFile TestName1 [TestName2] [...]"
echo "Use this option to run selected tests without modifying your test file." echo "Use this option to run selected tests without modifying your test file."
echo "TestName param has to match test name given in tests file (1st field)" echo "TestName param has to match test name given in tests file (1st field)"
echo echo
echo echo
echo "Two additional parameters that $0 accepts:" echo "Two additional parameters that $0 accepts:"
echo "BaseDir - This is where '.rec' files reside." echo "BaseDir - This is where '.rec' files reside."
echo "DestDir - Where $0 creates test screen shots." echo "DestDir - Where $0 creates test screen shots."
echo " Gets 'current' under 'pwd' by default ('orig' on init)" echo " Gets 'current' under 'pwd' by default ('orig' on init)"
echo echo
echo echo
echo "Use the following options:" echo "Use the following options:"
echo "To record tests:" echo "To record tests:"
echo "$0 -r [-b BaseDir] TestsFile" echo "$0 -r [-b BaseDir] TestsFile"
echo "Use BaseDir arg to create record files in specific folder." echo "Use BaseDir arg to create record files in specific folder."
echo "Otherwise pwd is used." echo "Otherwise pwd is used."
echo echo
echo "Pressing F2 while recording, sets screen shot at this stage of test." echo "Pressing F2 while recording, sets screen shot at this stage of test."
echo "You may define env-var 'TSUITE_SHOT_KEY' to alter shot-key." echo "You may define env-var 'TSUITE_SHOT_KEY' to alter shot-key."
echo "'.rec' file is produced for each test in your TestsFile." echo "'.rec' file is produced for each test in your TestsFile."
echo "File name is defined as 'TestName.rec' for each test." echo "File name is defined as 'TestName.rec' for each test."
echo echo
echo "You may test your record files with simulate option:" echo "You may test your record files with simulate option:"
echo "$0 -s [-b BaseDir] TestsFile" echo "$0 -s [-b BaseDir] TestsFile"
echo echo
echo "You need to run $0 with init option prior" echo "You need to run $0 with init option prior"
echo "to using play option." echo "to using play option."
echo "Later, when doing play, PNG files are compared with" echo "Later, when doing play, PNG files are compared with"
echo "PNG files reside in 'orig' folder create when init." echo "PNG files reside in 'orig' folder create when init."
echo echo
echo "To use init option:" echo "To use init option:"
echo "$0 -i [-b BaseDir] TestsFile" echo "$0 -i [-b BaseDir] TestsFile"
echo "Do not use DestDir param with init, target always 'orig'." echo "Do not use DestDir param with init, target always 'orig'."
echo echo
echo "Use Play tests option to produce PNG files of screen shot:" echo "Use Play tests option to produce PNG files of screen shot:"
echo "$0 -p [-b BaseDir] [-d DestDir] TestsFile" echo "$0 -p [-b BaseDir] [-d DestDir] TestsFile"
echo "Play option produces PNG files in DestDir." echo "Play option produces PNG files in DestDir."
echo "These are compares with PNGs in 'orig'." echo "These are compares with PNGs in 'orig'."
echo "(created in 'init' phase)" echo "(created in 'init' phase)"
echo echo
echo "Use -v option for detailed flow-report." echo "Use -v option for detailed flow-report."
echo "Thus, when running many tests, the output format makes" echo "Thus, when running many tests, the output format makes"
echo "it easy to match output to a running test." echo "it easy to match output to a running test."
echo "Example:" echo "Example:"
echo "$0 -v -p [-b BaseDir] [-d DestDir] TestsFile" echo "$0 -v -p [-b BaseDir] [-d DestDir] TestsFile"
echo
echo "-b = Set the base dir, the location of the rec files."
echo "-p = Run in compare mode. Generates the current images and compares with the old ones."
echo "-r = Run in record mode. Record the '.rec' files."
echo "-i = Run in init mode. Generate the reference images."
echo "-s = Run in simulation mode. Similar to -p, but runs in visible window to show you what is actually recorded and does not actually generate images."
echo "-v = Run in verbose mode."
echo "-h/? = This message."
} }
get_test_params () { get_test_params () {