CI job improvements

Summary: Added more jobs and refactored code express the jobs more cleanly

Test Plan: Manual test

Reviewers: igor sdong

CC: leveldb@

Task ID: #6968635

Blame Rev:
This commit is contained in:
krad 2015-09-09 16:32:26 -07:00
parent 95ffc5d2bc
commit 41bce05869

View File

@ -2,6 +2,9 @@
# This script is executed by Sandcastle
# to determine next steps to run
#
# Helper variables
#
REPORT_EMAIL="'report': [
{
'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
#
@ -17,16 +61,12 @@ UNIT_TEST_COMMANDS="[
{
'name':'Rocksdb Unit Test',
'steps': [
$CLEANUP_ENV,
{
'name':'Build RocksDB',
'shell':'make clean all',
'name':'Build and test RocksDB debug version',
'shell':'$SHM $DEBUG make J=1 check',
'user':'root'
},
{
'name':'Test RocksDB',
'shell':'make J=1 check',
'user':'root'
}
],
$REPORT_EMAIL
}
@ -37,79 +77,12 @@ UNIT_TEST_COMMANDS="[
#
UNIT_TEST_COMMANDS_481="[
{
'name':'Rocksdb Unit Test',
'name':'Rocksdb Unit Test on GCC 4.8.1',
'steps': [
$CLEANUP_ENV,
{
'name':'Build RocksDB',
'shell':'ROCKSDB_FBCODE_BUILD_WITH_481=1 make clean all',
'user':'root'
},
{
'name':'Test RocksDB',
'shell':'make J=1 check',
'user':'root'
}
],
$REPORT_EMAIL
}
]"
#
# RocksDB stress/crash test
#
STRESS_CRASH_TEST_COMMANDS="[
{
'name':'Rocksdb Stress/Crash Test',
'steps': [
{
'name':'Build and run RocksDB stress tests',
'shell':'TEST_TMPDIR=/dev/shm make clean db_stress',
'user':'root'
},
{
'name':'Build and run RocksDB crash tests',
'shell':'TEST_TMPDIR=/dev/shm make crash_test',
'user':'root'
}
],
$REPORT_EMAIL
}
]"
#
# RocksDB test under address sanitizer
#
ASAN_TEST_COMMANDS="[
{
'name':'Rocksdb Unit Test',
'steps': [
{
'name':'Build RocksDB for ASAN',
'shell':'COMPILE_WITH_ASAN=1 make clean all',
'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'
}
],
$REPORT_EMAIL
}
]"
#
# RocksDB crash testing under address sanitizer
#
ASAN_CRASH_TEST_COMMANDS="[
{
'name':'Rocksdb Unit Test',
'steps': [
{
'name':'Build and run RocksDB asan_crash_test',
'shell':'make J=1 clean asan_crash_test',
'name':'Build and test RocksDB debug version',
'shell':'$SHM $GCC_481 $DEBUG make J=1 check',
'user':'root'
},
],
@ -124,14 +97,51 @@ CLANG_UNIT_TEST_COMMANDS="[
{
'name':'Rocksdb Unit Test',
'steps': [
$CLEANUP_ENV,
{
'name':'Build RocksDB with CLANG',
'shell':'USE_CLANG=1 make clean all',
'name':'Build and test RocksDB debug',
'shell':'$CLANG $SHM $DEBUG make check',
'user':'root'
},
],
$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
#
STRESS_CRASH_TEST_COMMANDS="[
{
'name':'Rocksdb Stress/Crash Test',
'steps': [
$CLEANUP_ENV,
{
'name':'Build and run RocksDB debug stress tests',
'shell':'$SHM $DEBUG make J=1 db_stress',
'user':'root'
},
{
'name':'Test RocksDB built using CLANG',
'shell':'make J=1 check',
'name':'Build and run RocksDB debug crash tests',
'shell':'$SHM $DEBUG make J=1 crash_test',
'user':'root'
}
],
@ -140,13 +150,94 @@ CLANG_UNIT_TEST_COMMANDS="[
]"
#
# RocksDB test under address sanitizer
#
ASAN_TEST_COMMANDS="[
{
'name':'Rocksdb Unit Test under ASAN',
'steps': [
$CLEANUP_ENV,
{
'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',
'user':'root'
}
],
$REPORT_EMAIL
}
]"
#
# RocksDB crash testing under address sanitizer
#
ASAN_CRASH_TEST_COMMANDS="[
{
'name':'Rocksdb crash test under ASAN',
'steps': [
$CLEANUP_ENV,
{
'name':'Build and run RocksDB debug asan_crash_test',
'shell':'$SHM $DEBUG make J=1 asan_crash_test',
'user':'root'
},
],
$REPORT_EMAIL
}
]"
#
# RocksDB unit test under valgrind
#
VALGRIND_TEST_COMMANDS="[
{
'name':'Rocksdb Unit Test under valgrind',
'steps': [
$CLEANUP_ENV,
{
'name':'Run RocksDB debug unit tests',
'shell':'$SHM $DEBUG ./build_tools/valgrind_test.sh',
'user':'root'
},
],
$REPORT_EMAIL
}
]"
#
# RocksDB test under TSAN
#
TSAN_TEST_COMMANDS="[
{
'name':'Rocksdb Unit Test under TSAN',
'steps': [
$CLEANUP_ENV,
{
'name':'Run RocksDB debug unit test',
'shell':'set -o pipefail && $SHM $DEBUG $TSAN make J=1 check',
'user':'root'
},
],
$REPORT_EMAIL
}
]"
case $1 in
punit)
echo $PARALLEL_UNIT_TEST_COMMANDS
;;
unit)
echo $UNIT_TEST_COMMANDS
;;
unit_481)
echo $UNIT_TEST_COMMANDS_481
;;
clang_unit)
echo $CLANG_UNIT_TEST_COMMANDS
;;
lite)
echo $LITE_BUILD_COMMANDS
;;
stress_crash)
echo $STRESS_CRASH_TEST_COMMANDS
;;
@ -156,10 +247,13 @@ case $1 in
asan_crash)
echo $ASAN_CRASH_TEST_COMMANDS
;;
clang_unit)
echo $CLANG_UNIT_TEST_COMMANDS
valgrind)
echo $VALGRIND_TEST_COMMANDS
;;
tsan)
echo $TSAN_TEST_COMMANDS
;;
*)
echo $UNIT_TEST_COMMANDS
echo "Invalid determinator command"
;;
esac