exit with code 2 when there is already a db_bench running in regression test
Summary: Closes https://github.com/facebook/rocksdb/pull/2063 Differential Revision: D4805507 Pulled By: lightmark fbshipit-source-id: 59ccb18
This commit is contained in:
parent
0ee7f04039
commit
da175f7ecc
@ -235,21 +235,13 @@ function run_db_bench {
|
||||
--num_multi_db=$NUM_MULTI_DB \
|
||||
--max_background_compactions=$MAX_BACKGROUND_COMPACTIONS \
|
||||
--seed=$SEED 2>&1"
|
||||
kill_db_bench_cmd="pkill db_bench"
|
||||
ps_cmd="ps aux"
|
||||
if ! [ -z "$REMOTE_USER_AT_HOST" ]; then
|
||||
echo "Running benchmark remotely on $REMOTE_USER_AT_HOST"
|
||||
kill_db_bench_cmd="$SSH $REMOTE_USER_AT_HOST $kill_db_bench_cmd"
|
||||
db_bench_cmd="$SSH $REMOTE_USER_AT_HOST $db_bench_cmd"
|
||||
ps_cmd="$SSH $REMOTE_USER_AT_HOST $ps_cmd"
|
||||
fi
|
||||
|
||||
## kill existing db_bench processes
|
||||
eval "$kill_db_bench_cmd"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Killed all currently running db_bench"
|
||||
fi
|
||||
|
||||
## make sure no db_bench is running
|
||||
# The following statement is necessary make sure "eval $ps_cmd" will success.
|
||||
# Otherwise, if we simply check whether "$(eval $ps_cmd | grep db_bench)" is
|
||||
@ -263,7 +255,7 @@ function run_db_bench {
|
||||
if [ "$grep_output" != "" ]; then
|
||||
echo "Stopped regression_test.sh as there're still db_bench processes running:"
|
||||
echo $grep_output
|
||||
exit 1
|
||||
exit 2
|
||||
fi
|
||||
|
||||
## run the db_bench
|
||||
|
Loading…
Reference in New Issue
Block a user