diff --git a/tools/benchmark.sh b/tools/benchmark.sh index b41d25c787..73d9e96135 100755 --- a/tools/benchmark.sh +++ b/tools/benchmark.sh @@ -6,6 +6,7 @@ EXIT_INVALID_ARGS=1 EXIT_NOT_COMPACTION_TEST=2 EXIT_UNKNOWN_JOB=3 +EXIT_INVALID_PATH=4 # Size Constants K=1024 @@ -114,6 +115,11 @@ fi job_id=${JOB_ID} +if [ ! -x ./db_bench ]; then + echo "./db_bench not found. Please make sure it exists in the current directory." + exit $EXIT_INVALID_PATH +fi + # Make it easier to run only the compaction test. Getting valid data requires # a number of iterations and having an ability to run the test separately from # rest of the benchmarks helps. diff --git a/tools/run_blob_bench.sh b/tools/run_blob_bench.sh index 3755a9e56b..aeb2894f40 100755 --- a/tools/run_blob_bench.sh +++ b/tools/run_blob_bench.sh @@ -19,6 +19,7 @@ # Exit Codes EXIT_INVALID_ARGS=1 +EXIT_INVALID_PATH=2 # Size constants K=1024 @@ -74,6 +75,11 @@ if [ $# -ge 1 ]; then fi fi +if [ ! -f tools/benchmark.sh ]; then + echo "tools/benchmark.sh not found" + exit $EXIT_INVALID_PATH +fi + # shellcheck disable=SC2153 if [ -z "$DB_DIR" ]; then echo "DB_DIR is not defined"