提交 c81a805f 编写于 作者: A Aaron Gao 提交者: Facebook Github Bot

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
上级 5fc1e676
......@@ -126,13 +126,11 @@ function main {
if [ $TEST_MODE -le 1 ]; then
tmp=$DB_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..."
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
DB_PATH=$tmp
fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册