aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJoerg Mayer <jmayer@loplof.de>2014-11-05 21:00:26 +0100
committerMichael Mann <mmann78@netscape.net>2015-01-02 15:00:03 +0000
commit27fa202b5e0bdc4543a06bfceaad89bd3f58cff7 (patch)
tree544d8503bbc6c67b61059a963c7037fe69e438cc /test
parent7935ba9f5be8b9a1e0627dcb2573485e1577336e (diff)
Make it easier to run tests out of tree.
Change-Id: I4ed10339d3c543d9d199e5262b6e7bb8247544ac Reviewed-on: https://code.wireshark.org/review/5148 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'test')
-rwxr-xr-xtest/test.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/test/test.sh b/test/test.sh
index abc3969dc2..b3651f5591 100755
--- a/test/test.sh
+++ b/test/test.sh
@@ -61,9 +61,14 @@ FIN
exit 0
fi
-source test-backend.sh
-
-source config.sh
+MYDIR=$(dirname $0)
+THISBINDIR=$(cd run && pwd)
+if [ -e $THISBINDIR/tshark -o -e $THISBINDIR/dumpcap -o -e $THISBINDIR/rawshark ]; then
+ WS_BIN_PATH=${WS_BIN_PATH:-$THISBINDIR}
+ WS_QT_BIN_PATH=${WS_QT_BIN_PATH:-$THISBINDIR}
+fi
+source $MYDIR/test-backend.sh
+source $MYDIR/config.sh
# needed by some tests
TEST_OUTDIR=$(mktemp -d)