diff options
author | Evan Huus <eapache@gmail.com> | 2013-10-06 12:44:10 +0000 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2013-10-06 12:44:10 +0000 |
commit | e0cc11c92b16e3128cfa93c6fab07540e785f018 (patch) | |
tree | c7c740c52cec6004400ee1bbcf0fd5c91fb76975 /test/config.sh | |
parent | f5cebd0ef9c446eea4b4bce871a0af9160d37390 (diff) |
From Peter Wu via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9174
Support running most tests out-of-tree. Use case is to have a source tree and
use a semi-unprivileged user to perform tests (to rule out interference).
From me:
- fix unit-test suite, it has to build the binaries it runs so it must
more-or-less ignore the out-of-tree stuff
- fix name-res suite, just missing a path qualifier
svn path=/trunk/; revision=52397
Diffstat (limited to 'test/config.sh')
-rwxr-xr-x | test/config.sh | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/test/config.sh b/test/config.sh index 872bdbfe3b..82acb9c71a 100755 --- a/test/config.sh +++ b/test/config.sh @@ -40,18 +40,24 @@ if [ $? -eq 0 ] ; then ENDIANNESS="big" fi -# Path to the Wireshark binaries, only used for the settings below -WS_BIN_PATH=.. +# Absolute path to the source tree +SOURCE_DIR="$(cd "$(dirname "$0")" && cd .. && pwd)" + +# Absolute path to this test directory (for capture and config files) +TESTS_DIR="$SOURCE_DIR/test" # Are we allowed to open interfaces or capture on this system? SKIP_CAPTURE=${SKIP_CAPTURE:-1} # Override the last two items if we're running Windows if [ "$WS_SYSTEM" = "Windows" ] ; then - WS_BIN_PATH=../wireshark-gtk2 + WS_BIN_PATH=${WS_BIN_PATH:-$SOURCE_DIR/wireshark-gtk2} SKIP_CAPTURE=0 fi +# Path to the Wireshark binaries, default to source dir if unset +WS_BIN_PATH=${WS_BIN_PATH:-$SOURCE_DIR} + # Tweak the following to your liking. WIRESHARK=$WS_BIN_PATH/wireshark TSHARK=$WS_BIN_PATH/tshark @@ -91,7 +97,7 @@ fi # Tell Wireshark to quit after capuring packets. export WIRESHARK_QUIT_AFTER_CAPTURE="True" -CAPTURE_DIR="captures/" +CAPTURE_DIR="$TESTS_DIR/captures/" # Configuration paths TEST_HOME="$PWD/fakehome" |