2015-08-31 21:37:26 +02:00
|
|
|
#!/bin/bash
|
|
|
|
# This script is executed by Sandcastle
|
|
|
|
# to determine next steps to run
|
|
|
|
|
2015-09-30 21:26:46 +02:00
|
|
|
# Usage:
|
|
|
|
# EMAIL=<email> ONCALL=<email> TRIGGER=<trigger> SUBSCRIBER=<email> rocks_ci.py <test-name>
|
|
|
|
#
|
|
|
|
# Input Value
|
|
|
|
# -------------------------------------------------------------------------
|
|
|
|
# EMAIL Email address to report on trigger conditions
|
|
|
|
# ONCAL Email address to raise a task on failure
|
|
|
|
# TRIGGER Trigger conditions for email. Valid values are fail, warn, all
|
|
|
|
# SUBSCRIBER Email addresss to add as subscriber for task
|
|
|
|
#
|
2015-09-25 00:15:45 +02:00
|
|
|
|
2015-09-10 01:32:26 +02:00
|
|
|
#
|
2015-09-30 21:26:46 +02:00
|
|
|
# Report configuration
|
2015-09-10 01:32:26 +02:00
|
|
|
#
|
2015-09-30 21:26:46 +02:00
|
|
|
REPORT_EMAIL=
|
|
|
|
if [ ! -z $EMAIL ]; then
|
|
|
|
if [ -z $TRIGGER ]; then
|
|
|
|
TRIGGER="fail"
|
|
|
|
fi
|
|
|
|
|
|
|
|
REPORT_EMAIL="
|
|
|
|
{
|
|
|
|
'type':'email',
|
|
|
|
'triggers': [ '$TRIGGER' ],
|
|
|
|
'emails':['$EMAIL']
|
|
|
|
},"
|
|
|
|
fi
|
|
|
|
|
|
|
|
CREATE_TASK=
|
|
|
|
if [ ! -z $ONCALL ]; then
|
|
|
|
CREATE_TASK="
|
|
|
|
{
|
|
|
|
'type':'task',
|
|
|
|
'triggers':[ 'fail' ],
|
|
|
|
'priority':0,
|
|
|
|
'subscribers':[ '$SUBSCRIBER' ],
|
|
|
|
'tags':[ 'rocksdb', 'ci' ],
|
|
|
|
},"
|
|
|
|
fi
|
|
|
|
|
|
|
|
REPORT=
|
|
|
|
if [[ ! -z $REPORT_EMAIL || ! -z $CREATE_TASK ]]; then
|
|
|
|
REPORT="'report': [
|
|
|
|
$REPORT_EMAIL
|
|
|
|
$CREATE_TASK
|
|
|
|
]"
|
|
|
|
fi
|
2015-09-04 21:25:15 +02:00
|
|
|
|
2015-09-30 21:26:46 +02:00
|
|
|
#
|
|
|
|
# Helper variables
|
|
|
|
#
|
2015-09-10 01:32:26 +02:00
|
|
|
CLEANUP_ENV="
|
|
|
|
{
|
2015-09-30 21:26:46 +02:00
|
|
|
'name':'Cleanup environment',
|
|
|
|
'shell':'rm -rf /dev/shm/rocksdb && mkdir /dev/shm/rocksdb && make clean',
|
|
|
|
'user':'root'
|
2015-09-10 01:32:26 +02:00
|
|
|
}"
|
|
|
|
|
|
|
|
DEBUG="OPT=-g"
|
|
|
|
SHM="TEST_TMPDIR=/dev/shm/rocksdb"
|
|
|
|
GCC_481="ROCKSDB_FBCODE_BUILD_WITH_481=1"
|
|
|
|
ASAN="COMPILE_WITH_ASAN=1"
|
|
|
|
CLANG="USE_CLANG=1"
|
|
|
|
LITE="OPT=-DROCKSDB_LITE"
|
|
|
|
TSAN="COMPILE_WITH_TSAN=1"
|
2016-03-31 00:59:24 +02:00
|
|
|
UBSAN="COMPILE_WITH_UBSAN=1"
|
2015-09-12 00:34:33 +02:00
|
|
|
DISABLE_JEMALLOC="DISABLE_JEMALLOC=1"
|
2016-04-15 00:04:10 +02:00
|
|
|
HTTP_PROXY="https_proxy=http://fwdproxy.29.prn1:8080 http_proxy=http://fwdproxy.29.prn1:8080 ftp_proxy=http://fwdproxy.29.prn1:8080"
|
|
|
|
SETUP_JAVA_ENV="export $HTTP_PROXY; export JAVA_HOME=/usr/local/jdk-7u10-64/; export PATH=\$PATH:\$JAVA_HOME/bin"
|
2016-04-18 22:01:10 +02:00
|
|
|
PARSER="'parser':'python build_tools/error_filter.py $1'"
|
2015-09-10 01:32:26 +02:00
|
|
|
|
2015-10-20 05:13:14 +02:00
|
|
|
ARTIFACTS=" 'artifacts': [
|
|
|
|
{
|
|
|
|
'name':'database',
|
|
|
|
'paths':[ '/dev/shm/rocksdb' ],
|
|
|
|
}
|
|
|
|
]"
|
|
|
|
|
2015-09-21 21:51:15 +02:00
|
|
|
#
|
|
|
|
# A mechanism to disable tests temporarily
|
|
|
|
#
|
|
|
|
DISABLE_COMMANDS="[
|
|
|
|
{
|
|
|
|
'name':'Disable test',
|
2015-09-30 21:26:46 +02:00
|
|
|
'oncall':'$ONCALL',
|
2015-09-21 21:51:15 +02:00
|
|
|
'steps': [
|
|
|
|
{
|
2015-09-30 21:26:46 +02:00
|
|
|
'name':'Job disabled. Please contact test owner',
|
2015-09-21 21:51:15 +02:00
|
|
|
'shell':'exit 1',
|
|
|
|
'user':'root'
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|
|
|
|
]"
|
|
|
|
|
2015-09-10 01:32:26 +02:00
|
|
|
#
|
|
|
|
# RocksDB unit test in parallel
|
|
|
|
# Currently we always have noise in our parallel runs. This job is to help
|
|
|
|
# manage the noise
|
|
|
|
#
|
|
|
|
PARALLEL_UNIT_TEST_COMMANDS="[
|
|
|
|
{
|
|
|
|
'name':'Rocksdb Parallel Unit Test',
|
2015-09-30 21:26:46 +02:00
|
|
|
'oncall':'$ONCALL',
|
2015-09-10 01:32:26 +02:00
|
|
|
'steps': [
|
|
|
|
$CLEANUP_ENV,
|
|
|
|
{
|
|
|
|
'name':'Build and test RocksDB debug version',
|
2015-09-12 00:34:33 +02:00
|
|
|
'shell':'$DEBUG make -j$(nproc) all && $SHM make check > /dev/null 2>&1 || cat t/log-*',
|
2015-10-10 02:54:20 +02:00
|
|
|
'user':'root',
|
|
|
|
$PARSER
|
2015-09-11 03:49:09 +02:00
|
|
|
},
|
2015-09-10 01:32:26 +02:00
|
|
|
$CLEANUP_ENV,
|
|
|
|
{
|
|
|
|
'name':'Build and test RocksDB debug version under gcc-4.8.1',
|
2015-09-12 00:34:33 +02:00
|
|
|
'shell':'$GCC_481 $DEBUG make -j$(nproc) all && $SHM make check > /dev/null 2>&1 || cat t/log-*',
|
2015-10-10 02:54:20 +02:00
|
|
|
'user':'root',
|
|
|
|
$PARSER
|
2015-09-11 03:49:09 +02:00
|
|
|
},
|
2015-09-10 01:32:26 +02:00
|
|
|
],
|
2015-09-30 21:26:46 +02:00
|
|
|
$REPORT
|
2015-09-10 01:32:26 +02:00
|
|
|
}
|
|
|
|
]"
|
|
|
|
|
2015-09-02 21:16:42 +02:00
|
|
|
#
|
|
|
|
# RocksDB unit test
|
|
|
|
#
|
2015-08-31 21:37:26 +02:00
|
|
|
UNIT_TEST_COMMANDS="[
|
|
|
|
{
|
|
|
|
'name':'Rocksdb Unit Test',
|
2015-09-30 21:26:46 +02:00
|
|
|
'oncall':'$ONCALL',
|
2015-08-31 21:37:26 +02:00
|
|
|
'steps': [
|
2015-09-10 01:32:26 +02:00
|
|
|
$CLEANUP_ENV,
|
2015-08-31 21:37:26 +02:00
|
|
|
{
|
2015-09-10 01:32:26 +02:00
|
|
|
'name':'Build and test RocksDB debug version',
|
|
|
|
'shell':'$SHM $DEBUG make J=1 check',
|
2015-10-10 02:54:20 +02:00
|
|
|
'user':'root',
|
|
|
|
$PARSER
|
2015-08-31 21:37:26 +02:00
|
|
|
},
|
|
|
|
],
|
2015-09-30 21:26:46 +02:00
|
|
|
$REPORT
|
2015-08-31 21:37:26 +02:00
|
|
|
}
|
|
|
|
]"
|
|
|
|
|
2015-09-03 23:53:33 +02:00
|
|
|
#
|
|
|
|
# RocksDB unit test on gcc-4.8.1
|
|
|
|
#
|
|
|
|
UNIT_TEST_COMMANDS_481="[
|
|
|
|
{
|
2015-09-10 01:32:26 +02:00
|
|
|
'name':'Rocksdb Unit Test on GCC 4.8.1',
|
2015-09-30 21:26:46 +02:00
|
|
|
'oncall':'$ONCALL',
|
2015-09-03 23:53:33 +02:00
|
|
|
'steps': [
|
2015-09-10 01:32:26 +02:00
|
|
|
$CLEANUP_ENV,
|
2015-09-03 23:53:33 +02:00
|
|
|
{
|
2015-09-10 01:32:26 +02:00
|
|
|
'name':'Build and test RocksDB debug version',
|
|
|
|
'shell':'$SHM $GCC_481 $DEBUG make J=1 check',
|
2015-10-10 02:54:20 +02:00
|
|
|
'user':'root',
|
|
|
|
$PARSER
|
2015-09-03 23:53:33 +02:00
|
|
|
},
|
2015-09-10 01:32:26 +02:00
|
|
|
],
|
2015-09-30 21:26:46 +02:00
|
|
|
$REPORT
|
2015-09-10 01:32:26 +02:00
|
|
|
}
|
|
|
|
]"
|
|
|
|
|
|
|
|
#
|
|
|
|
# RocksDB unit test with CLANG
|
|
|
|
#
|
|
|
|
CLANG_UNIT_TEST_COMMANDS="[
|
|
|
|
{
|
|
|
|
'name':'Rocksdb Unit Test',
|
2015-09-30 21:26:46 +02:00
|
|
|
'oncall':'$ONCALL',
|
2015-09-10 01:32:26 +02:00
|
|
|
'steps': [
|
|
|
|
$CLEANUP_ENV,
|
2015-09-03 23:53:33 +02:00
|
|
|
{
|
2015-09-10 01:32:26 +02:00
|
|
|
'name':'Build and test RocksDB debug',
|
2015-09-11 03:49:09 +02:00
|
|
|
'shell':'$CLANG $SHM $DEBUG make J=1 check',
|
2015-10-10 02:54:20 +02:00
|
|
|
'user':'root',
|
|
|
|
$PARSER
|
2015-09-10 01:32:26 +02:00
|
|
|
},
|
2015-09-03 23:53:33 +02:00
|
|
|
],
|
2015-09-30 21:26:46 +02:00
|
|
|
$REPORT
|
2015-09-03 23:53:33 +02:00
|
|
|
}
|
|
|
|
]"
|
|
|
|
|
2015-09-18 21:08:56 +02:00
|
|
|
#
|
|
|
|
# RocksDB analyze
|
|
|
|
#
|
|
|
|
CLANG_ANALYZE_COMMANDS="[
|
|
|
|
{
|
|
|
|
'name':'Rocksdb analyze',
|
2015-09-30 21:26:46 +02:00
|
|
|
'oncall':'$ONCALL',
|
2015-09-18 21:08:56 +02:00
|
|
|
'steps': [
|
|
|
|
$CLEANUP_ENV,
|
|
|
|
{
|
|
|
|
'name':'RocksDB build and analyze',
|
|
|
|
'shell':'$CLANG $SHM $DEBUG make J=1 analyze',
|
2015-10-10 02:54:20 +02:00
|
|
|
'user':'root',
|
|
|
|
$PARSER
|
2015-09-18 21:08:56 +02:00
|
|
|
},
|
|
|
|
],
|
2015-09-30 21:26:46 +02:00
|
|
|
$REPORT
|
2015-09-18 21:08:56 +02:00
|
|
|
}
|
|
|
|
]"
|
|
|
|
|
|
|
|
#
|
|
|
|
# RocksDB code coverage
|
|
|
|
#
|
|
|
|
CODE_COV_COMMANDS="[
|
|
|
|
{
|
|
|
|
'name':'Rocksdb Unit Test Code Coverage',
|
2015-09-30 21:26:46 +02:00
|
|
|
'oncall':'$ONCALL',
|
2015-09-18 21:08:56 +02:00
|
|
|
'steps': [
|
|
|
|
$CLEANUP_ENV,
|
|
|
|
{
|
|
|
|
'name':'Build, test and collect code coverage info',
|
|
|
|
'shell':'$SHM $DEBUG make J=1 coverage',
|
2015-10-10 02:54:20 +02:00
|
|
|
'user':'root',
|
|
|
|
$PARSER
|
2015-09-18 21:08:56 +02:00
|
|
|
},
|
|
|
|
],
|
2015-09-30 21:26:46 +02:00
|
|
|
$REPORT
|
2015-09-18 21:08:56 +02:00
|
|
|
}
|
|
|
|
]"
|
|
|
|
|
|
|
|
#
|
|
|
|
# RocksDB unity
|
|
|
|
#
|
|
|
|
UNITY_COMMANDS="[
|
|
|
|
{
|
|
|
|
'name':'Rocksdb Unity',
|
2015-09-30 21:26:46 +02:00
|
|
|
'oncall':'$ONCALL',
|
2015-09-18 21:08:56 +02:00
|
|
|
'steps': [
|
|
|
|
$CLEANUP_ENV,
|
|
|
|
{
|
|
|
|
'name':'Build, test unity test',
|
2015-10-07 23:46:18 +02:00
|
|
|
'shell':'$SHM $DEBUG V=1 make J=1 unity_test',
|
2015-10-10 02:54:20 +02:00
|
|
|
'user':'root',
|
|
|
|
$PARSER
|
2015-09-18 21:08:56 +02:00
|
|
|
},
|
|
|
|
],
|
2015-09-30 21:26:46 +02:00
|
|
|
$REPORT
|
2015-09-18 21:08:56 +02:00
|
|
|
}
|
|
|
|
]"
|
|
|
|
|
2015-09-10 01:32:26 +02:00
|
|
|
#
|
|
|
|
# Build RocksDB lite
|
|
|
|
#
|
|
|
|
LITE_BUILD_COMMANDS="[
|
|
|
|
{
|
|
|
|
'name':'Rocksdb Lite build',
|
2015-09-30 21:26:46 +02:00
|
|
|
'oncall':'$ONCALL',
|
2015-09-10 01:32:26 +02:00
|
|
|
'steps': [
|
|
|
|
$CLEANUP_ENV,
|
|
|
|
{
|
|
|
|
'name':'Build RocksDB debug version',
|
|
|
|
'shell':'$LITE $DEBUG make J=1 static_lib',
|
2015-10-10 02:54:20 +02:00
|
|
|
'user':'root',
|
|
|
|
$PARSER
|
2015-09-10 01:32:26 +02:00
|
|
|
},
|
|
|
|
],
|
2015-09-30 21:26:46 +02:00
|
|
|
$REPORT
|
2015-09-10 01:32:26 +02:00
|
|
|
}
|
|
|
|
]"
|
2015-09-03 23:53:33 +02:00
|
|
|
|
2015-10-26 19:50:29 +01:00
|
|
|
#
|
|
|
|
# RocksDB lite tests
|
|
|
|
#
|
|
|
|
LITE_UNIT_TEST_COMMANDS="[
|
|
|
|
{
|
|
|
|
'name':'Rocksdb Lite Unit Test',
|
|
|
|
'oncall':'$ONCALL',
|
|
|
|
'steps': [
|
|
|
|
$CLEANUP_ENV,
|
|
|
|
{
|
|
|
|
'name':'Build RocksDB debug version',
|
|
|
|
'shell':'$SHM $LITE $DEBUG make J=1 check',
|
|
|
|
'user':'root',
|
|
|
|
$PARSER
|
|
|
|
},
|
|
|
|
],
|
|
|
|
$REPORT
|
|
|
|
}
|
|
|
|
]"
|
|
|
|
|
2015-09-02 21:16:42 +02:00
|
|
|
#
|
|
|
|
# RocksDB stress/crash test
|
|
|
|
#
|
|
|
|
STRESS_CRASH_TEST_COMMANDS="[
|
|
|
|
{
|
|
|
|
'name':'Rocksdb Stress/Crash Test',
|
2015-09-30 21:26:46 +02:00
|
|
|
'oncall':'$ONCALL',
|
2015-09-15 19:36:42 +02:00
|
|
|
'timeout': 86400,
|
2015-09-02 21:16:42 +02:00
|
|
|
'steps': [
|
2015-09-10 01:32:26 +02:00
|
|
|
$CLEANUP_ENV,
|
2015-09-02 21:16:42 +02:00
|
|
|
{
|
2015-09-10 01:32:26 +02:00
|
|
|
'name':'Build and run RocksDB debug stress tests',
|
|
|
|
'shell':'$SHM $DEBUG make J=1 db_stress',
|
2015-10-10 02:54:20 +02:00
|
|
|
'user':'root',
|
|
|
|
$PARSER
|
2015-09-02 21:16:42 +02:00
|
|
|
},
|
|
|
|
{
|
2015-09-10 01:32:26 +02:00
|
|
|
'name':'Build and run RocksDB debug crash tests',
|
2015-09-14 20:51:22 +02:00
|
|
|
'timeout': 86400,
|
2015-09-10 01:32:26 +02:00
|
|
|
'shell':'$SHM $DEBUG make J=1 crash_test',
|
2015-10-10 02:54:20 +02:00
|
|
|
'user':'root',
|
|
|
|
$PARSER
|
2015-09-02 21:16:42 +02:00
|
|
|
}
|
|
|
|
],
|
2015-10-20 05:13:14 +02:00
|
|
|
$ARTIFACTS,
|
2015-09-30 21:26:46 +02:00
|
|
|
$REPORT
|
2015-09-02 21:16:42 +02:00
|
|
|
}
|
|
|
|
]"
|
|
|
|
|
2015-11-05 21:07:39 +01:00
|
|
|
# RocksDB write stress test.
|
|
|
|
# We run on disk device on purpose (i.e. no $SHM)
|
|
|
|
# because we want to add some randomness to fsync commands
|
|
|
|
WRITE_STRESS_COMMANDS="[
|
|
|
|
{
|
|
|
|
'name':'Rocksdb Write Stress Test',
|
|
|
|
'oncall':'$ONCALL',
|
|
|
|
'steps': [
|
|
|
|
$CLEANUP_ENV,
|
|
|
|
{
|
|
|
|
'name':'Build and run RocksDB write stress tests',
|
|
|
|
'shell':'make write_stress && python tools/write_stress_runner.py --runtime_sec=3600 --db=/tmp/rocksdb_write_stress',
|
|
|
|
'user':'root',
|
|
|
|
$PARSER
|
|
|
|
}
|
|
|
|
],
|
|
|
|
'artifacts': [{'name': 'database', 'paths': ['/tmp/rocksdb_write_stress']}],
|
|
|
|
$REPORT
|
|
|
|
}
|
|
|
|
]"
|
|
|
|
|
|
|
|
|
2015-09-02 21:16:42 +02:00
|
|
|
#
|
|
|
|
# RocksDB test under address sanitizer
|
|
|
|
#
|
|
|
|
ASAN_TEST_COMMANDS="[
|
|
|
|
{
|
2015-09-10 01:32:26 +02:00
|
|
|
'name':'Rocksdb Unit Test under ASAN',
|
2015-09-30 21:26:46 +02:00
|
|
|
'oncall':'$ONCALL',
|
2015-09-02 21:16:42 +02:00
|
|
|
'steps': [
|
2015-09-10 01:32:26 +02:00
|
|
|
$CLEANUP_ENV,
|
2015-09-02 21:16:42 +02:00
|
|
|
{
|
2015-09-10 01:32:26 +02:00
|
|
|
'name':'Test RocksDB debug under ASAN',
|
|
|
|
'shell':'set -o pipefail && $SHM $ASAN $DEBUG make J=1 asan_check |& /usr/facebook/ops/scripts/asan_symbolize.py -d',
|
2015-10-10 02:54:20 +02:00
|
|
|
'user':'root',
|
|
|
|
$PARSER
|
2015-09-02 21:16:42 +02:00
|
|
|
}
|
|
|
|
],
|
2015-09-30 21:26:46 +02:00
|
|
|
$REPORT
|
2015-09-02 21:16:42 +02:00
|
|
|
}
|
|
|
|
]"
|
|
|
|
|
|
|
|
#
|
|
|
|
# RocksDB crash testing under address sanitizer
|
|
|
|
#
|
|
|
|
ASAN_CRASH_TEST_COMMANDS="[
|
|
|
|
{
|
2015-09-10 01:32:26 +02:00
|
|
|
'name':'Rocksdb crash test under ASAN',
|
2015-09-30 21:26:46 +02:00
|
|
|
'oncall':'$ONCALL',
|
2015-09-15 19:36:42 +02:00
|
|
|
'timeout': 86400,
|
2015-09-02 21:16:42 +02:00
|
|
|
'steps': [
|
2015-09-10 01:32:26 +02:00
|
|
|
$CLEANUP_ENV,
|
2015-09-02 21:16:42 +02:00
|
|
|
{
|
2015-09-10 01:32:26 +02:00
|
|
|
'name':'Build and run RocksDB debug asan_crash_test',
|
2015-09-14 20:51:22 +02:00
|
|
|
'timeout': 86400,
|
2015-09-10 01:32:26 +02:00
|
|
|
'shell':'$SHM $DEBUG make J=1 asan_crash_test',
|
2015-10-10 02:54:20 +02:00
|
|
|
'user':'root',
|
|
|
|
$PARSER
|
2015-09-02 21:16:42 +02:00
|
|
|
},
|
|
|
|
],
|
2015-09-30 21:26:46 +02:00
|
|
|
$REPORT
|
2015-09-02 21:16:42 +02:00
|
|
|
}
|
|
|
|
]"
|
|
|
|
|
2016-03-31 00:59:24 +02:00
|
|
|
#
|
|
|
|
# RocksDB test under undefined behavior sanitizer
|
|
|
|
#
|
|
|
|
UBSAN_TEST_COMMANDS="[
|
|
|
|
{
|
|
|
|
'name':'Rocksdb Unit Test under UBSAN',
|
|
|
|
'oncall':'$ONCALL',
|
|
|
|
'steps': [
|
|
|
|
$CLEANUP_ENV,
|
|
|
|
{
|
|
|
|
'name':'Test RocksDB debug under UBSAN',
|
|
|
|
'shell':'set -o pipefail && $SHM $UBSAN $DEBUG make J=1 ubsan_check',
|
|
|
|
'user':'root',
|
|
|
|
$PARSER
|
|
|
|
}
|
|
|
|
],
|
|
|
|
$REPORT
|
|
|
|
}
|
|
|
|
]"
|
|
|
|
|
|
|
|
#
|
|
|
|
# RocksDB crash testing under udnefined behavior sanitizer
|
|
|
|
#
|
|
|
|
UBSAN_CRASH_TEST_COMMANDS="[
|
|
|
|
{
|
|
|
|
'name':'Rocksdb crash test under UBSAN',
|
|
|
|
'oncall':'$ONCALL',
|
|
|
|
'timeout': 86400,
|
|
|
|
'steps': [
|
|
|
|
$CLEANUP_ENV,
|
|
|
|
{
|
|
|
|
'name':'Build and run RocksDB debug ubsan_crash_test',
|
|
|
|
'timeout': 86400,
|
|
|
|
'shell':'$SHM $DEBUG make J=1 ubsan_crash_test',
|
|
|
|
'user':'root',
|
|
|
|
$PARSER
|
|
|
|
},
|
|
|
|
],
|
|
|
|
$REPORT
|
|
|
|
}
|
|
|
|
]"
|
|
|
|
|
2015-09-02 21:16:42 +02:00
|
|
|
#
|
2015-09-10 01:32:26 +02:00
|
|
|
# RocksDB unit test under valgrind
|
2015-09-02 21:16:42 +02:00
|
|
|
#
|
2015-09-10 01:32:26 +02:00
|
|
|
VALGRIND_TEST_COMMANDS="[
|
2015-09-02 21:16:42 +02:00
|
|
|
{
|
2015-09-10 01:32:26 +02:00
|
|
|
'name':'Rocksdb Unit Test under valgrind',
|
2015-09-30 21:26:46 +02:00
|
|
|
'oncall':'$ONCALL',
|
2015-09-02 21:16:42 +02:00
|
|
|
'steps': [
|
2015-09-10 01:32:26 +02:00
|
|
|
$CLEANUP_ENV,
|
2015-09-02 21:16:42 +02:00
|
|
|
{
|
2015-09-10 01:32:26 +02:00
|
|
|
'name':'Run RocksDB debug unit tests',
|
2015-09-23 04:19:46 +02:00
|
|
|
'shell':'$DISABLE_JEMALLOC $SHM $DEBUG make valgrind_check',
|
2015-10-10 02:54:20 +02:00
|
|
|
'user':'root',
|
|
|
|
$PARSER
|
2015-09-02 21:16:42 +02:00
|
|
|
},
|
2015-09-10 01:32:26 +02:00
|
|
|
],
|
2015-09-30 21:26:46 +02:00
|
|
|
$REPORT
|
2015-09-10 01:32:26 +02:00
|
|
|
}
|
|
|
|
]"
|
|
|
|
|
|
|
|
#
|
|
|
|
# RocksDB test under TSAN
|
|
|
|
#
|
2015-09-18 21:08:56 +02:00
|
|
|
TSAN_UNIT_TEST_COMMANDS="[
|
2015-09-10 01:32:26 +02:00
|
|
|
{
|
|
|
|
'name':'Rocksdb Unit Test under TSAN',
|
2015-09-30 21:26:46 +02:00
|
|
|
'oncall':'$ONCALL',
|
2015-09-10 01:32:26 +02:00
|
|
|
'steps': [
|
|
|
|
$CLEANUP_ENV,
|
2015-09-02 21:16:42 +02:00
|
|
|
{
|
2015-09-10 01:32:26 +02:00
|
|
|
'name':'Run RocksDB debug unit test',
|
|
|
|
'shell':'set -o pipefail && $SHM $DEBUG $TSAN make J=1 check',
|
2015-10-10 02:54:20 +02:00
|
|
|
'user':'root',
|
|
|
|
$PARSER
|
2015-09-10 01:32:26 +02:00
|
|
|
},
|
2015-09-02 21:16:42 +02:00
|
|
|
],
|
2015-09-30 21:26:46 +02:00
|
|
|
$REPORT
|
2015-09-02 21:16:42 +02:00
|
|
|
}
|
|
|
|
]"
|
|
|
|
|
2015-09-18 21:08:56 +02:00
|
|
|
#
|
|
|
|
# RocksDB crash test under TSAN
|
|
|
|
#
|
|
|
|
TSAN_CRASH_TEST_COMMANDS="[
|
|
|
|
{
|
|
|
|
'name':'Rocksdb Crash Test under TSAN',
|
2015-09-30 21:26:46 +02:00
|
|
|
'oncall':'$ONCALL',
|
2015-09-18 21:08:56 +02:00
|
|
|
'timeout': 86400,
|
|
|
|
'steps': [
|
|
|
|
$CLEANUP_ENV,
|
|
|
|
{
|
|
|
|
'name':'Compile and run',
|
|
|
|
'timeout': 86400,
|
|
|
|
'shell':'set -o pipefail && $SHM $DEBUG $TSAN make J=1 crash_test',
|
2015-10-10 02:54:20 +02:00
|
|
|
'user':'root',
|
|
|
|
$PARSER
|
2015-09-18 21:08:56 +02:00
|
|
|
},
|
|
|
|
],
|
2015-09-30 21:26:46 +02:00
|
|
|
$REPORT
|
2015-09-18 21:08:56 +02:00
|
|
|
}
|
|
|
|
]"
|
|
|
|
|
2015-10-15 22:40:55 +02:00
|
|
|
TSAN_CRASH_TEST_COMMANDS=$DISABLE_COMMANDS
|
|
|
|
|
2015-09-18 21:08:56 +02:00
|
|
|
#
|
|
|
|
# RocksDB format compatible
|
|
|
|
#
|
|
|
|
|
2015-09-20 02:33:06 +02:00
|
|
|
run_format_compatible()
|
|
|
|
{
|
|
|
|
export TEST_TMPDIR=/dev/shm/rocksdb
|
|
|
|
rm -rf /dev/shm/rocksdb
|
|
|
|
mkdir /dev/shm/rocksdb
|
|
|
|
|
|
|
|
echo '
|
|
|
|
if [ -e "build_tools/build_detect_platform" ]
|
|
|
|
then
|
|
|
|
sed "s/tcmalloc/nothingnothingnothing/g" build_tools/build_detect_platform > $TEST_TMPDIR/temp_build_file
|
|
|
|
rm -rf build_tools/build_detect_platform
|
|
|
|
cp $TEST_TMPDIR/temp_build_file build_tools/build_detect_platform
|
|
|
|
chmod +x build_tools/build_detect_platform
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -e "build_detect_platform" ]
|
|
|
|
then
|
|
|
|
sed "s/tcmalloc/nothingnothingnothing/g" build_detect_platform > $TEST_TMPDIR/temp_build_file
|
2016-03-31 00:59:24 +02:00
|
|
|
rm -rf build_detect_platform
|
2015-09-20 02:33:06 +02:00
|
|
|
cp $TEST_TMPDIR/temp_build_file build_detect_platform
|
2016-03-31 00:59:24 +02:00
|
|
|
chmod +x build_detect_platform
|
2015-09-20 02:33:06 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
make ldb -j32
|
|
|
|
|
|
|
|
if [ -e "build_detect_platform" ]
|
|
|
|
then
|
|
|
|
git checkout -- build_detect_platform
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -e "build_tools/build_detect_platform" ]
|
|
|
|
then
|
|
|
|
git checkout -- build_tools/build_detect_platform
|
|
|
|
fi
|
|
|
|
' > temp_build_ldb.sh
|
|
|
|
|
|
|
|
sed "s/make ldb -j32/source temp_build_ldb.sh/g" tools/check_format_compatible.sh > tools/temp_check_format_compatible.sh
|
|
|
|
chmod +x tools/temp_check_format_compatible.sh
|
|
|
|
tools/temp_check_format_compatible.sh
|
|
|
|
}
|
2015-09-18 21:08:56 +02:00
|
|
|
|
|
|
|
FORMAT_COMPATIBLE_COMMANDS="[
|
|
|
|
{
|
|
|
|
'name':'Rocksdb Format Compatible tests',
|
2015-09-30 21:26:46 +02:00
|
|
|
'oncall':'$ONCALL',
|
2015-09-18 21:08:56 +02:00
|
|
|
'steps': [
|
|
|
|
$CLEANUP_ENV,
|
|
|
|
{
|
|
|
|
'name':'Run RocksDB debug unit test',
|
2015-09-20 02:33:06 +02:00
|
|
|
'shell':'build_tools/rocksdb-lego-determinator run_format_compatible',
|
2015-10-10 02:54:20 +02:00
|
|
|
'user':'root',
|
|
|
|
$PARSER
|
2015-09-18 21:08:56 +02:00
|
|
|
},
|
|
|
|
],
|
2015-09-30 21:26:46 +02:00
|
|
|
$REPORT
|
2015-09-18 21:08:56 +02:00
|
|
|
}
|
|
|
|
]"
|
|
|
|
|
|
|
|
#
|
|
|
|
# RocksDB no compression
|
|
|
|
#
|
2015-09-20 02:33:06 +02:00
|
|
|
run_no_compression()
|
|
|
|
{
|
|
|
|
export TEST_TMPDIR=/dev/shm/rocksdb
|
|
|
|
rm -rf /dev/shm/rocksdb
|
|
|
|
mkdir /dev/shm/rocksdb
|
|
|
|
make clean
|
2015-09-25 23:51:35 +02:00
|
|
|
cat build_tools/fbcode_config.sh | grep -iv dzlib | grep -iv dlz4 | grep -iv dsnappy | grep -iv dbzip2 > .tmp.fbcode_config.sh
|
2015-09-20 02:33:06 +02:00
|
|
|
mv .tmp.fbcode_config.sh build_tools/fbcode_config.sh
|
|
|
|
cat Makefile | grep -v tools/ldb_test.py > .tmp.Makefile
|
|
|
|
mv .tmp.Makefile Makefile
|
|
|
|
make $DEBUG J=1 check
|
|
|
|
}
|
2015-09-18 21:08:56 +02:00
|
|
|
|
|
|
|
NO_COMPRESSION_COMMANDS="[
|
|
|
|
{
|
|
|
|
'name':'Rocksdb No Compression tests',
|
2015-09-30 21:26:46 +02:00
|
|
|
'oncall':'$ONCALL',
|
2015-09-18 21:08:56 +02:00
|
|
|
'steps': [
|
|
|
|
$CLEANUP_ENV,
|
|
|
|
{
|
|
|
|
'name':'Run RocksDB debug unit test',
|
2015-09-20 02:33:06 +02:00
|
|
|
'shell':'build_tools/rocksdb-lego-determinator run_no_compression',
|
2015-10-10 02:54:20 +02:00
|
|
|
'user':'root',
|
|
|
|
$PARSER
|
2015-09-18 21:08:56 +02:00
|
|
|
},
|
|
|
|
],
|
2015-09-30 21:26:46 +02:00
|
|
|
$REPORT
|
2015-09-18 21:08:56 +02:00
|
|
|
}
|
|
|
|
]"
|
|
|
|
|
|
|
|
#
|
|
|
|
# RocksDB regression
|
|
|
|
#
|
2015-09-20 02:33:06 +02:00
|
|
|
run_regression()
|
|
|
|
{
|
|
|
|
time -v bash -vx ./build_tools/regression_build_test.sh $(mktemp -d $WORKSPACE/leveldb.XXXX) $(mktemp leveldb_test_stats.XXXX)
|
|
|
|
|
|
|
|
# ======= report size to ODS ========
|
|
|
|
|
|
|
|
# parameters: $1 -- key, $2 -- value
|
|
|
|
function send_size_to_ods {
|
|
|
|
curl -s "https://www.intern.facebook.com/intern/agent/ods_set.php?entity=rocksdb_build&key=rocksdb.build_size.$1&value=$2" \
|
|
|
|
--connect-timeout 60
|
|
|
|
}
|
|
|
|
|
|
|
|
# === normal build ===
|
|
|
|
make clean
|
|
|
|
make -j$(nproc) static_lib
|
|
|
|
send_size_to_ods static_lib $(stat --printf="%s" librocksdb.a)
|
|
|
|
strip librocksdb.a
|
|
|
|
send_size_to_ods static_lib_stripped $(stat --printf="%s" librocksdb.a)
|
|
|
|
|
|
|
|
make -j$(nproc) shared_lib
|
|
|
|
send_size_to_ods shared_lib $(stat --printf="%s" `readlink -f librocksdb.so`)
|
|
|
|
strip `readlink -f librocksdb.so`
|
|
|
|
send_size_to_ods shared_lib_stripped $(stat --printf="%s" `readlink -f librocksdb.so`)
|
|
|
|
|
|
|
|
# === lite build ===
|
|
|
|
make clean
|
|
|
|
OPT=-DROCKSDB_LITE make -j$(nproc) static_lib
|
|
|
|
send_size_to_ods static_lib_lite $(stat --printf="%s" librocksdb.a)
|
|
|
|
strip librocksdb.a
|
|
|
|
send_size_to_ods static_lib_lite_stripped $(stat --printf="%s" librocksdb.a)
|
|
|
|
|
|
|
|
OPT=-DROCKSDB_LITE make -j$(nproc) shared_lib
|
|
|
|
send_size_to_ods shared_lib_lite $(stat --printf="%s" `readlink -f librocksdb.so`)
|
|
|
|
strip `readlink -f librocksdb.so`
|
|
|
|
send_size_to_ods shared_lib_lite_stripped $(stat --printf="%s" `readlink -f librocksdb.so`)
|
2015-09-18 21:08:56 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
REGRESSION_COMMANDS="[
|
|
|
|
{
|
|
|
|
'name':'Rocksdb regression commands',
|
2015-09-30 21:26:46 +02:00
|
|
|
'oncall':'$ONCALL',
|
2015-09-18 21:08:56 +02:00
|
|
|
'steps': [
|
|
|
|
$CLEANUP_ENV,
|
|
|
|
{
|
|
|
|
'name':'Make and run script',
|
2015-09-20 02:33:06 +02:00
|
|
|
'shell':'build_tools/rocksdb-lego-determinator run_regression',
|
2015-10-10 02:54:20 +02:00
|
|
|
'user':'root',
|
|
|
|
$PARSER
|
2015-09-18 21:08:56 +02:00
|
|
|
},
|
|
|
|
],
|
2015-09-30 21:26:46 +02:00
|
|
|
$REPORT
|
2015-09-18 21:08:56 +02:00
|
|
|
}
|
|
|
|
]"
|
|
|
|
|
2016-04-13 20:38:47 +02:00
|
|
|
#
|
|
|
|
# RocksDB Java build
|
|
|
|
#
|
|
|
|
JAVA_BUILD_TEST_COMMANDS="[
|
|
|
|
{
|
|
|
|
'name':'Rocksdb Java Build',
|
|
|
|
'oncall':'$ONCALL',
|
|
|
|
'steps': [
|
|
|
|
$CLEANUP_ENV,
|
|
|
|
{
|
|
|
|
'name':'Build RocksDB for Java',
|
2016-04-15 00:04:10 +02:00
|
|
|
'shell':'$SETUP_JAVA_ENV; $SHM make rocksdbjava',
|
2016-04-13 20:38:47 +02:00
|
|
|
'user':'root',
|
|
|
|
$PARSER
|
|
|
|
},
|
|
|
|
],
|
|
|
|
$REPORT
|
|
|
|
}
|
|
|
|
]"
|
|
|
|
|
|
|
|
|
2015-08-31 21:37:26 +02:00
|
|
|
case $1 in
|
2015-09-10 01:32:26 +02:00
|
|
|
punit)
|
|
|
|
echo $PARALLEL_UNIT_TEST_COMMANDS
|
|
|
|
;;
|
2015-08-31 21:37:26 +02:00
|
|
|
unit)
|
|
|
|
echo $UNIT_TEST_COMMANDS
|
|
|
|
;;
|
2015-09-03 23:53:33 +02:00
|
|
|
unit_481)
|
|
|
|
echo $UNIT_TEST_COMMANDS_481
|
|
|
|
;;
|
2015-09-10 01:32:26 +02:00
|
|
|
clang_unit)
|
|
|
|
echo $CLANG_UNIT_TEST_COMMANDS
|
|
|
|
;;
|
2015-09-18 21:08:56 +02:00
|
|
|
clang_analyze)
|
|
|
|
echo $CLANG_ANALYZE_COMMANDS
|
|
|
|
;;
|
|
|
|
code_cov)
|
|
|
|
echo $CODE_COV_COMMANDS
|
|
|
|
;;
|
|
|
|
unity)
|
|
|
|
echo $UNITY_COMMANDS
|
|
|
|
;;
|
2015-09-10 01:32:26 +02:00
|
|
|
lite)
|
|
|
|
echo $LITE_BUILD_COMMANDS
|
|
|
|
;;
|
2015-10-26 19:50:29 +01:00
|
|
|
lite_test)
|
|
|
|
echo $LITE_UNIT_TEST_COMMANDS
|
|
|
|
;;
|
2015-09-02 21:16:42 +02:00
|
|
|
stress_crash)
|
|
|
|
echo $STRESS_CRASH_TEST_COMMANDS
|
|
|
|
;;
|
2015-11-05 21:07:39 +01:00
|
|
|
write_stress)
|
|
|
|
echo $WRITE_STRESS_COMMANDS
|
|
|
|
;;
|
2015-09-02 21:16:42 +02:00
|
|
|
asan)
|
|
|
|
echo $ASAN_TEST_COMMANDS
|
|
|
|
;;
|
|
|
|
asan_crash)
|
|
|
|
echo $ASAN_CRASH_TEST_COMMANDS
|
|
|
|
;;
|
2016-03-31 00:59:24 +02:00
|
|
|
ubsan)
|
|
|
|
echo $UBSAN_TEST_COMMANDS
|
|
|
|
;;
|
|
|
|
ubsan_crash)
|
|
|
|
echo $UBSAN_CRASH_TEST_COMMANDS
|
|
|
|
;;
|
2015-09-10 01:32:26 +02:00
|
|
|
valgrind)
|
|
|
|
echo $VALGRIND_TEST_COMMANDS
|
|
|
|
;;
|
|
|
|
tsan)
|
2015-09-18 21:08:56 +02:00
|
|
|
echo $TSAN_UNIT_TEST_COMMANDS
|
|
|
|
;;
|
|
|
|
tsan_crash)
|
|
|
|
echo $TSAN_CRASH_TEST_COMMANDS
|
|
|
|
;;
|
|
|
|
format_compatible)
|
|
|
|
echo $FORMAT_COMPATIBLE_COMMANDS
|
|
|
|
;;
|
2015-09-20 02:33:06 +02:00
|
|
|
run_format_compatible)
|
|
|
|
run_format_compatible
|
|
|
|
;;
|
2015-09-18 21:08:56 +02:00
|
|
|
no_compression)
|
|
|
|
echo $NO_COMPRESSION_COMMANDS
|
|
|
|
;;
|
2015-09-20 02:33:06 +02:00
|
|
|
run_no_compression)
|
|
|
|
run_no_compression
|
|
|
|
;;
|
2015-09-18 21:08:56 +02:00
|
|
|
regression)
|
|
|
|
echo $REGRESSION_COMMANDS
|
2015-09-02 21:16:42 +02:00
|
|
|
;;
|
2015-09-20 02:33:06 +02:00
|
|
|
run_regression)
|
|
|
|
run_regression
|
|
|
|
;;
|
2016-04-13 20:38:47 +02:00
|
|
|
java_build)
|
|
|
|
echo $JAVA_BUILD_TEST_COMMANDS
|
|
|
|
;;
|
2015-08-31 21:37:26 +02:00
|
|
|
*)
|
2015-09-10 01:32:26 +02:00
|
|
|
echo "Invalid determinator command"
|
2015-08-31 21:37:26 +02:00
|
|
|
;;
|
|
|
|
esac
|