From 260e044db5caee31b9337473673d21703b70e7fb Mon Sep 17 00:00:00 2001
From: ajs <palebluedot@gmail.com>
Date: Mon, 2 Jul 2018 22:23:49 -0300
Subject: Avoid hanging in tests.sh when IPC program is not found

---
 scripts/tests.sh | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/scripts/tests.sh b/scripts/tests.sh
index ffb5e7ef..7fb260bc 100755
--- a/scripts/tests.sh
+++ b/scripts/tests.sh
@@ -109,9 +109,18 @@ function run_eth()
     sleep 2
 }
 
+function check_eth() {
+    printTask "Running IPC tests with $ETH_PATH..."
+    if ! hash $ETH_PATH 2>/dev/null; then
+      printError "$ETH_PATH not found"    
+      exit 1
+    fi
+}
+
 if [ "$IPC_ENABLED" = true ];
 then
     download_eth
+    check_eth
     ETH_PID=$(run_eth /tmp/test)
 fi
 
-- 
cgit v1.2.3