time out sooner, add warning in case when no binary found

This commit is contained in:
Ryan Mulligan 2018-03-04 11:05:22 -08:00
parent 819a5bcdf8
commit b1e3a87ff7

View File

@ -9,7 +9,7 @@ rm -f $LOG_FILE
function check_binary_help()
{
if timeout -k 10 5 $1 $2 2>/dev/null 1>/dev/null
if timeout -k 2 1 $1 $2 2>/dev/null 1>/dev/null
then
echo "- ran \`$1 $2\` got 0 exit code" >> $LOG_FILE
fi
@ -17,7 +17,7 @@ function check_binary_help()
function check_version_type()
{
if timeout -k 10 5 $1 $2 2>&1 | grep $EXPECTED_VERSION >/dev/null
if timeout -k 2 1 $1 $2 2>&1 | grep $EXPECTED_VERSION >/dev/null
then
echo "- ran \`$1 $2\` and found version $EXPECTED_VERSION" >> $LOG_FILE
fi
@ -46,6 +46,13 @@ do
check_binary $b
done
if [ -s $LOG_FILE ]
then
true
else
echo "- Warning: no binary found that responded to help or version flags" >> $LOG_FILE
fi
if grep -r "$EXPECTED_VERSION" $RESULT_PATH >/dev/null
then
echo "- found $EXPECTED_VERSION with grep in $RESULT_PATH" >> $LOG_FILE