test db existence on the remote host

Summary:
Fix the bug that previous test existence locally
Closes https://github.com/facebook/rocksdb/pull/2074

Differential Revision: D4813631

Pulled By: lightmark

fbshipit-source-id: eceb0d9
main
Aaron Gao 8 years ago committed by Facebook Github Bot
parent 5fc1e6765a
commit c81a805fe6
  1. 8
      tools/regression_test.sh

@ -126,13 +126,11 @@ function main {
if [ $TEST_MODE -le 1 ]; then if [ $TEST_MODE -le 1 ]; then
tmp=$DB_PATH tmp=$DB_PATH
DB_PATH=$ORIGIN_PATH DB_PATH=$ORIGIN_PATH
if [ ! -e $DB_PATH ]; then 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"
echo "Building DB..." echo "Building DB..."
run_db_bench "fillseqdeterministic" $NUM_KEYS 1 0 run_db_bench "fillseqdeterministic" $NUM_KEYS 1 0
elif [[ ! -d $DB_PATH ]] || [[ "$(( $(date +"%s") - $(stat -c "%Y" $DB_PATH) ))" -gt "604800" ]]; then
echo "Rebuilding DB..."
rm -rf $DB_PATH
run_db_bench "fillseqdeterministic" $NUM_KEYS 1 0
fi fi
DB_PATH=$tmp DB_PATH=$tmp
fi fi

Loading…
Cancel
Save