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

remove test dir before exit when current regression is running

Summary:
clean up the current test dir if the last regression test is still running.
Closes https://github.com/facebook/rocksdb/pull/2401

Differential Revision: D5177882

Pulled By: lightmark

fbshipit-source-id: 91d899fcc2bde841948eae71af8584d4bdb35468
上级 7f6c02dd
......@@ -114,8 +114,8 @@ PERC_PATTERN+="P99: ([0-9\.]+) P99.9: ([0-9\.]+) P99.99: ([0-9\.]+)"
function main {
commit=${1:-"origin/master"}
test_root_dir=${TEST_PATH:-"/tmp/rocksdb/regression_test"}
init_arguments $test_root_dir
TEST_ROOT_DIR=${TEST_PATH:-"/tmp/rocksdb/regression_test"}
init_arguments $TEST_ROOT_DIR
if [ $DEBUG -eq 0 ]; then
checkout_rocksdb $commit
......@@ -145,7 +145,7 @@ function main {
run_db_bench "seekrandomwhilewriting"
fi
cleanup_test_directory $test_root_dir
cleanup_test_directory $TEST_ROOT_DIR
echo ""
echo "Benchmark completed! Results are available in $RESULT_PATH"
}
......@@ -258,6 +258,8 @@ function run_db_bench {
if [ "$grep_output" != "" ]; then
echo "Stopped regression_test.sh as there're still db_bench processes running:"
echo $grep_output
echo "Clean up test directory"
cleanup_test_directory $TEST_ROOT_DIR
exit 2
fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册