From 0439a45e20c472a53cd69018a035eb9a69a8b65a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20=C3=96hrstr=C3=B6m?= Date: Thu, 29 Dec 2022 15:49:14 +0100 Subject: [PATCH] Only run the netcat tests if nc is installed. --- test.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/test.sh b/test.sh index 7491c0f..8eb33c6 100755 --- a/test.sh +++ b/test.sh @@ -168,14 +168,18 @@ then (cd ..; ./additional_tests.sh $PROG) fi -./tests/test_nc1.sh $PROG -if [ "$?" != "0" ]; then RC="1"; 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 -./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 echo Slower tests...