2015-08-31 21:37:26 +02:00
|
|
|
#!/bin/bash
|
|
|
|
# This script is executed by Sandcastle
|
|
|
|
# to determine next steps to run
|
|
|
|
|
2015-09-04 21:25:15 +02:00
|
|
|
REPORT_EMAIL="'report': [
|
|
|
|
{
|
|
|
|
'type':'email',
|
|
|
|
'triggers':['fail'],
|
|
|
|
'emails':['leveldb@fb.com']
|
|
|
|
}
|
|
|
|
]"
|
|
|
|
|
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',
|
|
|
|
'steps': [
|
|
|
|
{
|
|
|
|
'name':'Build RocksDB',
|
2015-09-09 19:41:07 +02:00
|
|
|
'shell':'make clean all',
|
2015-08-31 21:37:26 +02:00
|
|
|
'user':'root'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'name':'Test RocksDB',
|
|
|
|
'shell':'make J=1 check',
|
|
|
|
'user':'root'
|
|
|
|
}
|
|
|
|
],
|
2015-09-04 21:25:15 +02:00
|
|
|
$REPORT_EMAIL
|
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="[
|
|
|
|
{
|
|
|
|
'name':'Rocksdb Unit Test',
|
|
|
|
'steps': [
|
|
|
|
{
|
|
|
|
'name':'Build RocksDB',
|
2015-09-09 19:41:07 +02:00
|
|
|
'shell':'ROCKSDB_FBCODE_BUILD_WITH_481=1 make clean all',
|
2015-09-03 23:53:33 +02:00
|
|
|
'user':'root'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'name':'Test RocksDB',
|
|
|
|
'shell':'make J=1 check',
|
|
|
|
'user':'root'
|
|
|
|
}
|
|
|
|
],
|
2015-09-04 21:25:15 +02:00
|
|
|
$REPORT_EMAIL
|
2015-09-03 23:53:33 +02:00
|
|
|
}
|
|
|
|
]"
|
|
|
|
|
|
|
|
|
2015-09-02 21:16:42 +02:00
|
|
|
#
|
|
|
|
# RocksDB stress/crash test
|
|
|
|
#
|
|
|
|
STRESS_CRASH_TEST_COMMANDS="[
|
|
|
|
{
|
|
|
|
'name':'Rocksdb Stress/Crash Test',
|
|
|
|
'steps': [
|
|
|
|
{
|
|
|
|
'name':'Build and run RocksDB stress tests',
|
2015-09-09 19:41:07 +02:00
|
|
|
'shell':'TEST_TMPDIR=/dev/shm make clean db_stress',
|
2015-09-02 21:16:42 +02:00
|
|
|
'user':'root'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'name':'Build and run RocksDB crash tests',
|
2015-09-03 23:53:33 +02:00
|
|
|
'shell':'TEST_TMPDIR=/dev/shm make crash_test',
|
2015-09-02 21:16:42 +02:00
|
|
|
'user':'root'
|
|
|
|
}
|
|
|
|
],
|
2015-09-04 21:25:15 +02:00
|
|
|
$REPORT_EMAIL
|
2015-09-02 21:16:42 +02:00
|
|
|
}
|
|
|
|
]"
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# RocksDB test under address sanitizer
|
|
|
|
#
|
|
|
|
ASAN_TEST_COMMANDS="[
|
|
|
|
{
|
|
|
|
'name':'Rocksdb Unit Test',
|
|
|
|
'steps': [
|
|
|
|
{
|
|
|
|
'name':'Build RocksDB for ASAN',
|
2015-09-09 19:41:07 +02:00
|
|
|
'shell':'COMPILE_WITH_ASAN=1 make clean all',
|
2015-09-02 21:16:42 +02:00
|
|
|
'user':'root'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'name':'Test RocksDB under ASAN',
|
2015-09-03 23:53:33 +02:00
|
|
|
'shell':'set -o pipefail && make J=1 asan_check |& /usr/facebook/ops/scripts/asan_symbolize.py -d',
|
2015-09-02 21:16:42 +02:00
|
|
|
'user':'root'
|
|
|
|
}
|
|
|
|
],
|
2015-09-04 21:25:15 +02:00
|
|
|
$REPORT_EMAIL
|
2015-09-02 21:16:42 +02:00
|
|
|
}
|
|
|
|
]"
|
|
|
|
|
|
|
|
#
|
|
|
|
# RocksDB crash testing under address sanitizer
|
|
|
|
#
|
|
|
|
ASAN_CRASH_TEST_COMMANDS="[
|
|
|
|
{
|
|
|
|
'name':'Rocksdb Unit Test',
|
|
|
|
'steps': [
|
|
|
|
{
|
|
|
|
'name':'Build and run RocksDB asan_crash_test',
|
2015-09-09 19:41:07 +02:00
|
|
|
'shell':'make J=1 clean asan_crash_test',
|
2015-09-02 21:16:42 +02:00
|
|
|
'user':'root'
|
|
|
|
},
|
|
|
|
],
|
2015-09-04 21:25:15 +02:00
|
|
|
$REPORT_EMAIL
|
2015-09-02 21:16:42 +02:00
|
|
|
}
|
|
|
|
]"
|
|
|
|
|
|
|
|
#
|
|
|
|
# RocksDB unit test with CLANG
|
|
|
|
#
|
|
|
|
CLANG_UNIT_TEST_COMMANDS="[
|
|
|
|
{
|
|
|
|
'name':'Rocksdb Unit Test',
|
|
|
|
'steps': [
|
|
|
|
{
|
|
|
|
'name':'Build RocksDB with CLANG',
|
|
|
|
'shell':'USE_CLANG=1 make clean all',
|
|
|
|
'user':'root'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'name':'Test RocksDB built using CLANG',
|
|
|
|
'shell':'make J=1 check',
|
|
|
|
'user':'root'
|
|
|
|
}
|
|
|
|
],
|
2015-09-04 21:25:15 +02:00
|
|
|
$REPORT_EMAIL
|
2015-09-02 21:16:42 +02:00
|
|
|
}
|
|
|
|
]"
|
|
|
|
|
|
|
|
|
2015-08-31 21:37:26 +02:00
|
|
|
case $1 in
|
|
|
|
unit)
|
|
|
|
echo $UNIT_TEST_COMMANDS
|
|
|
|
;;
|
2015-09-03 23:53:33 +02:00
|
|
|
unit_481)
|
|
|
|
echo $UNIT_TEST_COMMANDS_481
|
|
|
|
;;
|
2015-09-02 21:16:42 +02:00
|
|
|
stress_crash)
|
|
|
|
echo $STRESS_CRASH_TEST_COMMANDS
|
|
|
|
;;
|
|
|
|
asan)
|
|
|
|
echo $ASAN_TEST_COMMANDS
|
|
|
|
;;
|
|
|
|
asan_crash)
|
|
|
|
echo $ASAN_CRASH_TEST_COMMANDS
|
|
|
|
;;
|
|
|
|
clang_unit)
|
|
|
|
echo $CLANG_UNIT_TEST_COMMANDS
|
|
|
|
;;
|
2015-08-31 21:37:26 +02:00
|
|
|
*)
|
|
|
|
echo $UNIT_TEST_COMMANDS
|
|
|
|
;;
|
|
|
|
esac
|