Merge pull request #4407 from ajsantander/exit-if-no-eth

Avoid hanging in tests.sh when IPC program is not found
This commit is contained in:
chriseth 2018-07-03 20:22:54 +02:00 committed by GitHub
commit 672bc7fc00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -109,9 +109,18 @@ function run_eth()
sleep 2 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 ]; if [ "$IPC_ENABLED" = true ];
then then
download_eth download_eth
check_eth
ETH_PID=$(run_eth /tmp/test) ETH_PID=$(run_eth /tmp/test)
fi fi