@ -2,6 +2,9 @@
# This script is executed by Sandcastle
# This script is executed by Sandcastle
# to determine next steps to run
# to determine next steps to run
#
# Helper variables
#
REPORT_EMAIL="'report': [
REPORT_EMAIL="'report': [
{
{
'type':'email',
'type':'email',
@ -10,6 +13,47 @@ REPORT_EMAIL="'report': [
}
}
]"
]"
CLEANUP_ENV="
{
'name':'Cleanup environment',
'shell':'rm -rf /dev/shm/rocksdb && mkdir /dev/shm/rocksdb && make clean',
'user':'root'
}"
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"
#
# 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',
'steps': [
$CLEANUP_ENV,
{
'name':'Build and test RocksDB debug version',
'shell':'$SHM $DEBUG make check 2>&1 > /dev/null || cat t/log-*',
'user':'root'
},
$CLEANUP_ENV,
{
'name':'Build and test RocksDB debug version under gcc-4.8.1',
'shell':'$SHM $GCC_481 $DEBUG make check 2>&1 > /dev/null || cat t/log-*',
'user':'root'
},
],
$REPORT_EMAIL
}
]"
#
#
# RocksDB unit test
# RocksDB unit test
#
#
@ -17,16 +61,12 @@ UNIT_TEST_COMMANDS="[
{
{
'name':'Rocksdb Unit Test',
'name':'Rocksdb Unit Test',
'steps': [
'steps': [
$CLEANUP_ENV,
{
{
'name':'Build RocksDB',
'name':'Build and test RocksDB debug version ',
'shell':'make clean all ',
'shell':'$SHM $DEBUG make J=1 check ',
'user':'root'
'user':'root'
},
},
{
'name':'Test RocksDB',
'shell':'make J=1 check',
'user':'root'
}
],
],
$REPORT_EMAIL
$REPORT_EMAIL
}
}
@ -37,23 +77,54 @@ UNIT_TEST_COMMANDS="[
#
#
UNIT_TEST_COMMANDS_481="[
UNIT_TEST_COMMANDS_481="[
{
{
'name':'Rocksdb Unit Test',
'name':'Rocksdb Unit Test on GCC 4.8.1 ',
'steps': [
'steps': [
$CLEANUP_ENV,
{
{
'name':'Build RocksDB',
'name':'Build and test RocksDB debug version ',
'shell':'ROCKSDB_FBCODE_BUILD_WITH_481=1 make clean all ',
'shell':'$SHM $GCC_481 $DEBUG make J=1 check ',
'user':'root'
'user':'root'
},
},
],
$REPORT_EMAIL
}
]"
#
# RocksDB unit test with CLANG
#
CLANG_UNIT_TEST_COMMANDS="[
{
'name':'Rocksdb Unit Test',
'steps': [
$CLEANUP_ENV,
{
{
'name':'Test RocksDB',
'name':'Build and test RocksDB debug ',
'shell':'make J=1 check',
'shell':'$CLANG $SHM $DEBUG make check',
'user':'root'
'user':'root'
}
},
],
],
$REPORT_EMAIL
$REPORT_EMAIL
}
}
]"
]"
#
# Build RocksDB lite
#
LITE_BUILD_COMMANDS="[
{
'name':'Rocksdb Lite build',
'steps': [
$CLEANUP_ENV,
{
'name':'Build RocksDB debug version',
'shell':'$LITE $DEBUG make J=1 static_lib',
'user':'root'
},
],
$REPORT_EMAIL
}
]"
#
#
# RocksDB stress/crash test
# RocksDB stress/crash test
@ -62,14 +133,15 @@ STRESS_CRASH_TEST_COMMANDS="[
{
{
'name':'Rocksdb Stress/Crash Test',
'name':'Rocksdb Stress/Crash Test',
'steps': [
'steps': [
$CLEANUP_ENV,
{
{
'name':'Build and run RocksDB stress tests',
'name':'Build and run RocksDB debug stress tests',
'shell':'TEST_TMPDIR=/dev/shm make clean db_stress',
'shell':'$SHM $DEBUG make J=1 db_stress',
'user':'root'
'user':'root'
},
},
{
{
'name':'Build and run RocksDB crash tests',
'name':'Build and run RocksDB debug crash tests',
'shell':'TEST_TMPDIR=/dev/shm make crash_test',
'shell':'$SHM $DEBUG make J=1 crash_test',
'user':'root'
'user':'root'
}
}
],
],
@ -83,16 +155,12 @@ STRESS_CRASH_TEST_COMMANDS="[
#
#
ASAN_TEST_COMMANDS="[
ASAN_TEST_COMMANDS="[
{
{
'name':'Rocksdb Unit Test',
'name':'Rocksdb Unit Test under ASAN ',
'steps': [
'steps': [
$CLEANUP_ENV,
{
{
'name':'Build RocksDB for ASAN',
'name':'Test RocksDB debug under ASAN',
'shell':'COMPILE_WITH_ASAN=1 make clean all',
'shell':'set -o pipefail && $SHM $ASAN $DEBUG make J=1 asan_check |& /usr/facebook/ops/scripts/asan_symbolize.py -d',
'user':'root'
},
{
'name':'Test RocksDB under ASAN',
'shell':'set -o pipefail && make J=1 asan_check |& /usr/facebook/ops/scripts/asan_symbolize.py -d',
'user':'root'
'user':'root'
}
}
],
],
@ -105,11 +173,12 @@ ASAN_TEST_COMMANDS="[
#
#
ASAN_CRASH_TEST_COMMANDS="[
ASAN_CRASH_TEST_COMMANDS="[
{
{
'name':'Rocksdb Unit Test ',
'name':'Rocksdb crash test under ASAN ',
'steps': [
'steps': [
$CLEANUP_ENV,
{
{
'name':'Build and run RocksDB asan_crash_test',
'name':'Build and run RocksDB debug asan_crash_test',
'shell':'make J=1 clean asan_crash_test',
'shell':'$SHM $DEBUG make J=1 asan_crash_test',
'user':'root'
'user':'root'
},
},
],
],
@ -118,35 +187,57 @@ ASAN_CRASH_TEST_COMMANDS="[
]"
]"
#
#
# RocksDB unit test with CLANG
# RocksDB unit test under valgrind
#
#
CLANG_UNIT _TEST_COMMANDS="[
VALGRIND _TEST_COMMANDS="[
{
{
'name':'Rocksdb Unit Test',
'name':'Rocksdb Unit Test under valgrind ',
'steps': [
'steps': [
$CLEANUP_ENV,
{
{
'name':'Build RocksDB with CLANG ',
'name':'Run RocksDB debug unit tests ',
'shell':'USE_CLANG=1 make clean all ',
'shell':'$SHM $DEBUG ./build_tools/valgrind_test.sh ',
'user':'root'
'user':'root'
},
},
],
$REPORT_EMAIL
}
]"
#
# RocksDB test under TSAN
#
TSAN_TEST_COMMANDS="[
{
'name':'Rocksdb Unit Test under TSAN',
'steps': [
$CLEANUP_ENV,
{
{
'name':'Test RocksDB built using CLANG',
'name':'Run RocksDB debug unit test ',
'shell':'make J=1 check',
'shell':'set -o pipefail && $SHM $DEBUG $TSAN make J=1 check',
'user':'root'
'user':'root'
}
},
],
],
$REPORT_EMAIL
$REPORT_EMAIL
}
}
]"
]"
case $1 in
case $1 in
punit)
echo $PARALLEL_UNIT_TEST_COMMANDS
;;
unit)
unit)
echo $UNIT_TEST_COMMANDS
echo $UNIT_TEST_COMMANDS
;;
;;
unit_481)
unit_481)
echo $UNIT_TEST_COMMANDS_481
echo $UNIT_TEST_COMMANDS_481
;;
;;
clang_unit)
echo $CLANG_UNIT_TEST_COMMANDS
;;
lite)
echo $LITE_BUILD_COMMANDS
;;
stress_crash)
stress_crash)
echo $STRESS_CRASH_TEST_COMMANDS
echo $STRESS_CRASH_TEST_COMMANDS
;;
;;
@ -156,10 +247,13 @@ case $1 in
asan_crash)
asan_crash)
echo $ASAN_CRASH_TEST_COMMANDS
echo $ASAN_CRASH_TEST_COMMANDS
;;
;;
clang_unit)
valgrind)
echo $CLANG_UNIT_TEST_COMMANDS
echo $VALGRIND_TEST_COMMANDS
;;
tsan)
echo $TSAN_TEST_COMMANDS
;;
;;
*)
*)
echo $UNIT_TEST_COMMANDS
echo "Invalid determinator command"
;;
;;
esac
esac