From cba530fa4d1376d1832bf64c1043d944cb9f2327 Mon Sep 17 00:00:00 2001 From: Denis Protyvenskyi Date: Fri, 21 Oct 2016 15:40:47 +0300 Subject: [PATCH] Search for mongo-tools not only in workdir, but also in $PATH --- run_smoke_resmoke_funcs.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/run_smoke_resmoke_funcs.sh b/run_smoke_resmoke_funcs.sh index 72c56c9..31cd7dd 100644 --- a/run_smoke_resmoke_funcs.sh +++ b/run_smoke_resmoke_funcs.sh @@ -28,11 +28,18 @@ run_system_validations() { # check for needed mongo binaries - for binary in bsondump mongo mongod mongodump mongoexport mongofiles mongoimport mongooplog mongorestore mongos mongostat; do + for binary in mongo mongod mongos; do if [ ! -x "./${binary}" ]; then - echo "Could not find ./${binary}; make sure you are running this from the root build directory," - echo "that the MongoDB binaries have been built and the mongo-tools binaries have been copied" - echo "to the build root." + echo "Could not find '${binary}'; make sure you are running this from the root build directory," + echo "and that the MongoDB binaries have been built." + exit 1; + fi + done + + for binary in bsondump mongodump mongoexport mongofiles mongoimport mongooplog mongorestore mongostat; do + if [ ! -x "./${binary}" ] && ! type -p ${binary} &> /dev/null ; then + echo "Could not find '${binary}'; make sure the mongo-tools binaries have been built" + echo "and can be found either in the working directory or in the \$PATH." exit 1; fi done