Check if installed netcat is the right version. Skip nc tests if not.

pull/956/head
Fredrik Öhrström 2023-05-08 20:09:40 +02:00
rodzic 88a811d434
commit acaf159f33
1 zmienionych plików z 11 dodań i 6 usunięć

17
test.sh
Wyświetl plik

@ -180,14 +180,19 @@ fi
# Only run the netcat tests if netcat is installed.
if command -v nc > /dev/null 2> /dev/null
then
./tests/test_nc1.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
IS_NC_OPENBSD=$(nc -help 2>&1 | grep -o OpenBSD)
# These tests only work with netcat-openbsd.
if [ "$IS_NC_OPENBSD" = "OpenBSD" ]
then
./tests/test_nc1.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
./tests/test_nc2.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
./tests/test_nc2.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
./tests/test_nc3.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
./tests/test_nc3.sh $PROG
if [ "$?" != "0" ]; then RC="1"; fi
fi
fi
echo Slower tests...