diff options
author | Gerald Combs <gerald@wireshark.org> | 2015-03-24 20:33:08 -0500 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2015-03-30 21:02:21 +0000 |
commit | 9670f05384312a9c287e91f0fcc2accc0a35dfdd (patch) | |
tree | 7d6af3483318caac8442987228c1f78bf7f32707 /test | |
parent | 7181ae471345d4e4e85d5edd5341ff7f156de01d (diff) |
Add ftsanity.py to the unit tests.
Change-Id: Ib480d8be5f66c70a4213af27acee94016fbf974b
Reviewed-on: https://code.wireshark.org/review/7855
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'test')
-rwxr-xr-x | test/suite-unittests.sh | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/test/suite-unittests.sh b/test/suite-unittests.sh index 102ab6ac98..380e875f54 100755 --- a/test/suite-unittests.sh +++ b/test/suite-unittests.sh @@ -32,11 +32,18 @@ unittests_step_test() { test_step_ok } +TOOL_SEARCH_PATHS=" + $WS_BIN_PATH + $SOURCE_DIR/epan + $SOURCE_DIR/epan/wmem + $SOURCE_DIR/tools +" + check_dut() { TEST_EXE="" # WS_BIN_PATH must be checked first, otherwise when using Nmake # we'll find a non-functional program in epan or epan/wmem. - for TEST_PATH in "$WS_BIN_PATH" "$SOURCE_DIR/epan" "$SOURCE_DIR/epan/wmem" ; do + for TEST_PATH in $TOOL_SEARCH_PATHS ; do if [ -x "$TEST_PATH/$1" ]; then TEST_EXE=$TEST_PATH/$1 break @@ -44,7 +51,14 @@ check_dut() { done if [ -n "$TEST_EXE" ]; then - DUT=$TEST_EXE + if [[ "$WS_SYSTEM" == "Windows" && "$TEST_EXE" == *.py ]] ; then + SCRIPT_PATH=$( cygpath -w "$TEST_EXE" ) + TSHARK_PATH=$( cygpath -w "$TSHARK" ) + DUT="python $SCRIPT_PATH" + else + TSHARK_PATH="$TSHARK" + DUT=$TEST_EXE + fi else test_step_failed "$1 not found. Have you built test-programs?" fi @@ -80,6 +94,12 @@ unittests_step_wmem_test() { unittests_step_test } +unittests_step_ftsanity() { + check_dut ftsanity.py + ARGS=$TSHARK_PATH + unittests_step_test +} + unittests_cleanup_step() { rm -f ./testout.txt } @@ -92,6 +112,7 @@ unittests_suite() { test_step_add "reassemble_test" unittests_step_reassemble_test test_step_add "tvbtest" unittests_step_tvbtest test_step_add "wmem_test" unittests_step_wmem_test + test_step_add "ftsanity.py" unittests_step_ftsanity } # # Editor modelines - http://www.wireshark.org/tools/modelines.html |