test remote instead run remote in regression test
Summary: avoid exit when $? != 0 Closes https://github.com/facebook/rocksdb/pull/2076 Differential Revision: D4815655 Pulled By: lightmark fbshipit-source-id: 829299e
This commit is contained in:
parent
c81a805fe6
commit
bd7d13835e
@ -126,9 +126,9 @@ function main {
|
||||
if [ $TEST_MODE -le 1 ]; then
|
||||
tmp=$DB_PATH
|
||||
DB_PATH=$ORIGIN_PATH
|
||||
run_remote "test -d $DB_PATH"
|
||||
if [[ $? -ne 0 ]] || [[ $(run_remote 'echo $(( $(date +"%s") - $(stat -c "%Y" '"$a"') ))') -gt "604800" ]]; then
|
||||
rm -rf "$DB_PATH"
|
||||
test_remote "test -d $DB_PATH"
|
||||
if [[ $? -ne 0 ]] || [[ $(run_remote 'echo $(( $(date +"%s") - $(stat -c "%Y" '"$DB_PATH"') ))') -gt "604800" ]]; then
|
||||
run_remote "rm -rf $DB_PATH"
|
||||
echo "Building DB..."
|
||||
run_db_bench "fillseqdeterministic" $NUM_KEYS 1 0
|
||||
fi
|
||||
@ -355,14 +355,17 @@ function build_db_bench_and_ldb {
|
||||
}
|
||||
|
||||
function run_remote {
|
||||
if ! [ -z "$REMOTE_USER_AT_HOST" ]; then
|
||||
cmd="$SSH $REMOTE_USER_AT_HOST $1"
|
||||
else
|
||||
cmd="$1"
|
||||
fi
|
||||
test_remote "$1"
|
||||
exit_on_error $? "$1"
|
||||
}
|
||||
|
||||
function test_remote {
|
||||
if ! [ -z "$REMOTE_USER_AT_HOST" ]; then
|
||||
cmd="$SSH $REMOTE_USER_AT_HOST $1"
|
||||
else
|
||||
cmd="$1"
|
||||
fi
|
||||
eval "$cmd"
|
||||
exit_on_error $? "$cmd"
|
||||
}
|
||||
|
||||
function run_local {
|
||||
|
Loading…
Reference in New Issue
Block a user