-#!/bin/bash
+#!/usr/bin/env bash
# This script is executed by Sandcastle
# to determine next steps to run
LITE="OPT=\"-DROCKSDB_LITE -g\""
TSAN="COMPILE_WITH_TSAN=1"
UBSAN="COMPILE_WITH_UBSAN=1"
+TSAN_CRASH='CRASH_TEST_EXT_ARGS="--compression_type=zstd --log2_keys_per_lock=22"'
+NON_TSAN_CRASH="CRASH_TEST_EXT_ARGS=--compression_type=zstd"
DISABLE_JEMALLOC="DISABLE_JEMALLOC=1"
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-8u60-64/; export PATH=\$JAVA_HOME/bin:\$PATH"
}
]"
-#
-# 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',
- 'oncall':'$ONCALL',
- 'steps': [
- $CLEANUP_ENV,
- {
- 'name':'Build and test RocksDB debug version',
- 'shell':'$DEBUG make -j$(nproc) all && $SHM make check > /dev/null 2>&1 || $CONTRUN_NAME=punit_check $TASK_CREATION_TOOL || cat t/log-*',
- 'user':'root',
- $PARSER
- },
- $CLEANUP_ENV,
- {
- 'name':'Build and test RocksDB debug version under gcc-4.8.1',
- 'shell':'$GCC_481 $DEBUG make -j$(nproc) all && $SHM make check > /dev/null 2>&1 || $CONTRUN_NAME=punit_check_gcc481 $TASK_CREATION_TOOL || cat t/log-*',
- 'user':'root',
- $PARSER
- },
- ],
- $REPORT
- }
-]"
-
#
# RocksDB unit test
#
$CLEANUP_ENV,
{
'name':'Build RocksDB debug version',
- 'shell':'$LITE make J=1 static_lib || $CONTRUN_NAME=lite_static_lib $TASK_CREATION_TOOL',
+ 'shell':'$LITE make J=1 all check || $CONTRUN_NAME=lite $TASK_CREATION_TOOL',
'user':'root',
$PARSER
},
]"
#
-# RocksDB lite tests
-#
-LITE_UNIT_TEST_COMMANDS="[
+# Report RocksDB lite binary size to scuba
+REPORT_LITE_BINARY_SIZE_COMMANDS="[
{
- 'name':'Rocksdb Lite Unit Test',
+ 'name':'Rocksdb Lite Binary Size',
'oncall':'$ONCALL',
'steps': [
$CLEANUP_ENV,
{
- 'name':'Build RocksDB debug version',
- 'shell':'$SHM $LITE make J=1 check || $CONTRUN_NAME=lite_check $TASK_CREATION_TOOL',
+ 'name':'Report RocksDB Lite binary size to scuba',
+ 'shell':'tools/report_lite_binary_size.sh',
'user':'root',
- $PARSER
},
],
- $REPORT
- }
]"
#
$CLEANUP_ENV,
{
'name':'Build and run RocksDB debug stress tests',
- 'shell':'$SHM $DEBUG make J=1 db_stress || $CONTRUN_NAME=db_stress $TASK_CREATION_TOOL',
+ 'shell':'$SHM $DEBUG $NON_TSAN_CRASH make J=1 db_stress || $CONTRUN_NAME=db_stress $TASK_CREATION_TOOL',
'user':'root',
$PARSER
},
{
'name':'Build and run RocksDB debug crash tests',
'timeout': 86400,
- 'shell':'$SHM $DEBUG make J=1 crash_test || $CONTRUN_NAME=crash_test $TASK_CREATION_TOOL',
+ 'shell':'$SHM $DEBUG $NON_TSAN_CRASH make J=1 crash_test || $CONTRUN_NAME=crash_test $TASK_CREATION_TOOL',
'user':'root',
$PARSER
}
{
'name':'Build and run RocksDB debug asan_crash_test',
'timeout': 86400,
- 'shell':'$SHM $DEBUG make J=1 asan_crash_test || $CONTRUN_NAME=asan_crash_test $TASK_CREATION_TOOL',
+ 'shell':'$SHM $DEBUG $NON_TSAN_CRASH make J=1 asan_crash_test || $CONTRUN_NAME=asan_crash_test $TASK_CREATION_TOOL',
'user':'root',
$PARSER
},
{
'name':'Build and run RocksDB debug ubsan_crash_test',
'timeout': 86400,
- 'shell':'$SHM $DEBUG make J=1 ubsan_crash_test || $CONTRUN_NAME=ubsan_crash_test $TASK_CREATION_TOOL',
+ 'shell':'$SHM $DEBUG $NON_TSAN_CRASH make J=1 ubsan_crash_test || $CONTRUN_NAME=ubsan_crash_test $TASK_CREATION_TOOL',
'user':'root',
$PARSER
},
{
'name':'Compile and run',
'timeout': 86400,
- 'shell':'set -o pipefail && $SHM $DEBUG $TSAN CRASH_TEST_KILL_ODD=1887 make J=1 crash_test || $CONTRUN_NAME=tsan_crash_test $TASK_CREATION_TOOL',
+ 'shell':'set -o pipefail && $SHM $DEBUG $TSAN $TSAN_CRASH CRASH_TEST_KILL_ODD=1887 make J=1 crash_test || $CONTRUN_NAME=tsan_crash_test $TASK_CREATION_TOOL',
'user':'root',
$PARSER
},
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
- rm -rf build_detect_platform
- cp $TEST_TMPDIR/temp_build_file build_detect_platform
- chmod +x build_detect_platform
- 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
+ tools/check_format_compatible.sh
}
FORMAT_COMPATIBLE_COMMANDS="[
case $1 in
- punit)
- echo $PARALLEL_UNIT_TEST_COMMANDS
- ;;
unit)
echo $UNIT_TEST_COMMANDS
;;
lite)
echo $LITE_BUILD_COMMANDS
;;
- lite_test)
- echo $LITE_UNIT_TEST_COMMANDS
+ report_lite_binary_size)
+ echo $REPORT_LITE_BINARY_SIZE_COMMANDS
;;
stress_crash)
echo $STRESS_CRASH_TEST_COMMANDS