forked from osmocom/wireshark
test: improve check for out-of-tree tests
Rather than running `cd` and letting it potentially fail, just use the `-d` flag to test that `run` exists and is a directory. Avoids useless stderr output. Change-Id: Iab8b63681db6256aa1a6fc389d2536acbd491aba Reviewed-on: https://code.wireshark.org/review/6239 Reviewed-by: Evan Huus <eapache@gmail.com>
This commit is contained in:
parent
5cb96a0eb5
commit
887d198361
|
@ -62,10 +62,11 @@ FIN
|
|||
fi
|
||||
|
||||
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}
|
||||
if [ -d run ]; then
|
||||
if [ -e run/tshark -o -e run/dumpcap -o -e run/rawshark ]; then
|
||||
WS_BIN_PATH=${WS_BIN_PATH:-$(cd run && pwd)}
|
||||
WS_QT_BIN_PATH=${WS_QT_BIN_PATH:-$WS_BIN_PATH}
|
||||
fi
|
||||
fi
|
||||
source $MYDIR/test-backend.sh
|
||||
source $MYDIR/config.sh
|
||||
|
|
Loading…
Reference in New Issue