diff options
author | Bill Meier <wmeier@newsguy.com> | 2008-02-23 21:19:44 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2008-02-23 21:19:44 +0000 |
commit | 0deb0a6555cbaba735128820c6d443d6a6d51a58 (patch) | |
tree | a437413f09dc547e506a5745b4a3ae6b490911bf /test/suite-clopts.sh | |
parent | 8d4f01eea70c59acb0ef18acbc4f5254d4149e9f (diff) |
Add some debug info to help in diagnosing buildbot 'run tests' failures
svn path=/trunk/; revision=24447
Diffstat (limited to 'test/suite-clopts.sh')
-rwxr-xr-x | test/suite-clopts.sh | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/test/suite-clopts.sh b/test/suite-clopts.sh index 6c751d0ff8..ad691acd97 100755 --- a/test/suite-clopts.sh +++ b/test/suite-clopts.sh @@ -28,7 +28,6 @@ EXIT_OK=0 EXIT_COMMAND_LINE=1 EXIT_ERROR=2 - # generic: check against a specific exit status with a single char option # $1 command: tshark # $2 option: a @@ -60,7 +59,7 @@ clopts_step_existing_file() { } -# check exit status when reading a none existing file +# check exit status when reading a non-existing file clopts_step_nonexisting_file() { $TSHARK -r ThisFileDontExist.pcap > ./testout.txt 2>&1 RETURNVALUE=$? @@ -119,9 +118,10 @@ clopts_step_invalid_capfilter() { else grep -i 'Invalid capture filter: "jkghg"' ./testout.txt > /dev/null if [ $? -eq 0 ]; then + test_step_output_print ./testout.txt test_step_ok else - cat ./testout.txt + test_step_output_print ./testout.txt test_step_failed "Infos" fi fi @@ -136,9 +136,10 @@ clopts_step_invalid_interface() { else grep -i 'The capture session could not be initiated' ./testout.txt > /dev/null if [ $? -eq 0 ]; then + test_step_output_print ./testout.txt test_step_ok else - cat ./testout.txt + test_step_output_print ./testout.txt test_step_failed "Infos" fi fi @@ -156,7 +157,7 @@ clopts_step_invalid_interface_index() { if [ $? -eq 0 ]; then test_step_ok else - cat ./testout.txt + test_step_output_print ./testout.txt test_step_failed "Infos" fi fi @@ -185,9 +186,14 @@ clopts_suite_basic() { test_step_add "Exit status for none existing files must be 2" clopts_step_nonexisting_file } +clopts_suite_capture_options() { + test_step_add "Invalid capture filter -f" clopts_step_invalid_capfilter + test_step_add "Invalid capture interface -i" clopts_step_invalid_interface + test_step_add "Invalid capture interface index 0" clopts_step_invalid_interface_index +} clopts_post_step() { - rm -f ./testout.txt + rm -f ./testout.txt ./testout2.txt } clopt_suite() { @@ -196,11 +202,15 @@ clopt_suite() { test_suite_add "Invalid TShark single char options" clopts_suite_tshark_invalid_chars test_suite_add "Valid TShark single char options" clopts_suite_valid_chars test_suite_add "Interface-specific TShark single char options" clopts_suite_interface_chars - test_step_add "Invalid capture filter -f" clopts_step_invalid_capfilter - test_step_add "Invalid capture interface -i" clopts_step_invalid_interface - test_step_add "Invalid capture interface index 0" clopts_step_invalid_interface_index + test_suite_add "Capture filter/interface options tests" clopts_suite_capture_options test_step_add "Valid name resolution options -N (1s)" clopts_step_valid_name_resolving #test_remark_add "Undocumented command line option: G" #test_remark_add "Options currently unchecked: S, V, l, n, p, q and x" } +## Emacs +## Local Variables: +## tab-width: 8 +## indent-tabs-mode: t +## sh-basic-offset: 8 +## End: |