Fix regression test script (#8753)
Summary: Regression test is broken and not running: 1. failed test is not reporting, fix it by add `set -e` 2. internal regression test is not run inside github, removing that 3. fix a few minor issues to pass the test 4. delete unused binary size build, and regression test is reporting binary size now. Pull Request resolved: https://github.com/facebook/rocksdb/pull/8753 Test Plan: CI: https://www.internalfb.com/intern/sandcastle/job/13510799359573861 Reviewed By: ltamasi Differential Revision: D30754380 Pulled By: jay-zhuang fbshipit-source-id: 0cfa008327fff31bc61118a3fe642924090d28e1
This commit is contained in:
parent
361895ad79
commit
0c942a9c0d
@ -20,26 +20,11 @@ STAT_FILE=${STAT_FILE:-$(mktemp -t -u rocksdb_test_stats_XXXX)}
|
||||
|
||||
function cleanup {
|
||||
rm -rf $DATA_DIR
|
||||
rm -f $STAT_FILE.fillseq
|
||||
rm -f $STAT_FILE.readrandom
|
||||
rm -f $STAT_FILE.overwrite
|
||||
rm -f $STAT_FILE.memtablefillreadrandom
|
||||
rm -f $STAT_FILE.*
|
||||
}
|
||||
|
||||
trap cleanup EXIT
|
||||
|
||||
if [ -z $GIT_BRANCH ]; then
|
||||
git_br=`git rev-parse --abbrev-ref HEAD`
|
||||
else
|
||||
git_br=$(basename $GIT_BRANCH)
|
||||
fi
|
||||
|
||||
if [ $git_br == "master" ]; then
|
||||
git_br=""
|
||||
else
|
||||
git_br="."$git_br
|
||||
fi
|
||||
|
||||
make release
|
||||
|
||||
# measure fillseq + fill up the DB for overwrite benchmark
|
||||
@ -286,12 +271,10 @@ common_in_mem_args="--db=/dev/shm/rocksdb \
|
||||
--sync=0 \
|
||||
--verify_checksum=1 \
|
||||
--delete_obsolete_files_period_micros=314572800 \
|
||||
--max_grandparent_overlap_factor=10 \
|
||||
--use_plain_table=1 \
|
||||
--open_files=-1 \
|
||||
--mmap_read=1 \
|
||||
--mmap_write=0 \
|
||||
--memtablerep=prefix_hash \
|
||||
--bloom_bits=10 \
|
||||
--bloom_locality=1 \
|
||||
--perf_level=0"
|
||||
@ -378,7 +361,7 @@ function send_to_ods {
|
||||
echo >&2 "ERROR: Key $key doesn't have a value."
|
||||
return
|
||||
fi
|
||||
curl --silent "https://www.intern.facebook.com/intern/agent/ods_set.php?entity=rocksdb_build$git_br&key=$key&value=$value" \
|
||||
curl --silent "https://www.intern.facebook.com/intern/agent/ods_set.php?entity=rocksdb_build&key=$key&value=$value" \
|
||||
--connect-timeout 60
|
||||
}
|
||||
|
||||
|
@ -379,23 +379,6 @@ LITE_BUILD_COMMANDS="[
|
||||
}
|
||||
]"
|
||||
|
||||
#
|
||||
# Report RocksDB lite binary size to scuba
|
||||
REPORT_LITE_BINARY_SIZE_COMMANDS="[
|
||||
{
|
||||
'name':'Rocksdb Lite Binary Size',
|
||||
'oncall':'$ONCALL',
|
||||
'executeLocal': 'true',
|
||||
'steps': [
|
||||
$CLEANUP_ENV,
|
||||
{
|
||||
'name':'Report RocksDB Lite binary size to scuba',
|
||||
'shell':'cd $WORKING_DIR; tools/report_lite_binary_size.sh',
|
||||
'user':'root',
|
||||
},
|
||||
],
|
||||
]"
|
||||
|
||||
#
|
||||
# RocksDB stress/crash test
|
||||
#
|
||||
@ -1120,7 +1103,7 @@ NO_COMPRESSION_COMMANDS="[
|
||||
#
|
||||
run_regression()
|
||||
{
|
||||
time -v bash -vx ./build_tools/regression_build_test.sh $(mktemp -d $WORKSPACE/leveldb.XXXX) $(mktemp leveldb_test_stats.XXXX)
|
||||
time -v bash -vx ./build_tools/regression_build_test.sh $(mktemp -d $WORKING_DIR/rocksdb.XXXX) $(mktemp rocksdb_test_stats.XXXX)
|
||||
|
||||
# ======= report size to ODS ========
|
||||
|
||||
@ -1161,6 +1144,7 @@ REGRESSION_COMMANDS="[
|
||||
{
|
||||
'name':'Rocksdb regression commands',
|
||||
'oncall':'$ONCALL',
|
||||
'executeLocal': 'true',
|
||||
'steps': [
|
||||
$CLEANUP_ENV,
|
||||
{
|
||||
@ -1264,9 +1248,6 @@ case $1 in
|
||||
lite)
|
||||
echo $LITE_BUILD_COMMANDS
|
||||
;;
|
||||
report_lite_binary_size)
|
||||
echo $REPORT_LITE_BINARY_SIZE_COMMANDS
|
||||
;;
|
||||
stress_crash)
|
||||
echo $STRESS_CRASH_TEST_COMMANDS
|
||||
;;
|
||||
@ -1361,7 +1342,9 @@ case $1 in
|
||||
echo $REGRESSION_COMMANDS
|
||||
;;
|
||||
run_regression)
|
||||
set -e
|
||||
run_regression
|
||||
unset -e
|
||||
;;
|
||||
java_build)
|
||||
echo $JAVA_BUILD_TEST_COMMANDS
|
||||
|
@ -37,8 +37,8 @@
|
||||
# ./tools/regression_test.sh
|
||||
#
|
||||
# = Regression test environmental parameters =
|
||||
# DEBUG: If true, then the script will not checkout master and build db_bench
|
||||
# if db_bench already exists
|
||||
# DEBUG: If true, then the script will not build db_bench if db_bench already
|
||||
# exists
|
||||
# Default: 0
|
||||
# TEST_MODE: If 1, run fillseqdeterminstic and benchmarks both
|
||||
# if 0, only run fillseqdeterministc
|
||||
|
@ -1,42 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
# Script to report lite build binary size for latest RocksDB commits.
|
||||
# Usage:
|
||||
# ./report_lite_binary_size [num_recent_commits]
|
||||
|
||||
num_recent_commits=${1:-10}
|
||||
|
||||
echo "Computing RocksDB lite build binary size for the most recent $num_recent_commits commits."
|
||||
|
||||
for ((i=0; i < num_recent_commits; i++))
|
||||
do
|
||||
git checkout master~$i
|
||||
commit_hash=$(git show -s --format=%H)
|
||||
commit_time=$(git show -s --format=%ct)
|
||||
|
||||
# It would be nice to check if scuba already have a record for the commit,
|
||||
# but sandcastle don't seems to have scuba CLI installed.
|
||||
|
||||
make clean
|
||||
make OPT=-DROCKSDB_LITE static_lib
|
||||
|
||||
if make OPT=-DROCKSDB_LITE static_lib
|
||||
then
|
||||
build_succeeded='true'
|
||||
strip librocksdb.a
|
||||
binary_size=$(stat -c %s librocksdb.a)
|
||||
else
|
||||
build_succeeded='false'
|
||||
binary_size=0
|
||||
fi
|
||||
|
||||
current_time="\"time\": $(date +%s)"
|
||||
commit_hash="\"hash\": \"$commit_hash\""
|
||||
commit_time="\"commit_time\": $commit_time"
|
||||
build_succeeded="\"build_succeeded\": \"$build_succeeded\""
|
||||
binary_size="\"binary_size\": $binary_size"
|
||||
|
||||
scribe_log="{\"int\":{$current_time, $commit_time, $binary_size}, \"normal\":{$commit_hash, $build_succeeded}}"
|
||||
echo "Logging to scribe: $scribe_log"
|
||||
scribe_cat perfpipe_rocksdb_lite_build "$scribe_log"
|
||||
done
|
Loading…
Reference in New Issue
Block a user