From b50632920d6730cc12deb30ee71338b1e72c93ac Mon Sep 17 00:00:00 2001 From: sdong Date: Thu, 21 Jul 2016 12:53:02 -0700 Subject: [PATCH] Add unit test not on /dev/shm as part of the pre-commit tests Summary: RocksDB behavior is slightly different between data on tmpfs and normal file systems. Add a test case to run RocksDB on normal file system. Test Plan: See the tests launched by Phabricator Reviewers: kradhakrishnan, IslamAbdelRahman, gunnarku Reviewed By: gunnarku Subscribers: leveldb, andrewkr, dhruba Differential Revision: https://reviews.facebook.net/D60963 --- Makefile | 2 +- arcanist_util/config/RocksDBCommonHelper.php | 4 ++-- build_tools/rocksdb-lego-determinator | 23 ++++++++++++++++++++ 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 1514c0b77..c7e5fcb3a 100644 --- a/Makefile +++ b/Makefile @@ -1375,7 +1375,7 @@ jdb_bench: commit_prereq: build_tools/rocksdb-lego-determinator \ build_tools/precommit_checker.py - J=$(J) build_tools/precommit_checker.py unit unit_481 clang_unit release release_481 clang_release tsan asan ubsan lite + J=$(J) build_tools/precommit_checker.py unit unit_481 clang_unit release release_481 clang_release tsan asan ubsan lite unit_non_shm $(MAKE) clean && $(MAKE) jclean && $(MAKE) rocksdbjava; xfunc: diff --git a/arcanist_util/config/RocksDBCommonHelper.php b/arcanist_util/config/RocksDBCommonHelper.php index 6c398c5da..3edfc5999 100644 --- a/arcanist_util/config/RocksDBCommonHelper.php +++ b/arcanist_util/config/RocksDBCommonHelper.php @@ -223,8 +223,8 @@ function getSandcastleConfig() { } else { // Manually list of tests we want to run in Sandcastle. $tests = array( - "unit", "unit_481", "clang_unit", "tsan", "asan", "lite_test", - "valgrind", "release", "release_481", "clang_release" + "unit", "unit_non_shm", "unit_481", "clang_unit", "tsan", "asan", + "lite_test", "valgrind", "release", "release_481", "clang_release" ); } diff --git a/build_tools/rocksdb-lego-determinator b/build_tools/rocksdb-lego-determinator index 5fe9826ed..6fc3f0a73 100755 --- a/build_tools/rocksdb-lego-determinator +++ b/build_tools/rocksdb-lego-determinator @@ -146,6 +146,26 @@ UNIT_TEST_COMMANDS="[ } ]" +# +# RocksDB unit test not under /dev/shm +# +UNIT_TEST_NON_SHM_COMMANDS="[ + { + 'name':'Rocksdb Unit Test', + 'oncall':'$ONCALL', + 'steps': [ + $CLEANUP_ENV, + { + 'name':'Build and test RocksDB debug version', + 'shell':'$DEBUG make J=1 check', + 'user':'root', + $PARSER + }, + ], + $REPORT + } +]" + # # RocksDB release build and unit tests # @@ -724,6 +744,9 @@ case $1 in unit) echo $UNIT_TEST_COMMANDS ;; + unit_non_shm) + echo $UNIT_TEST_NON_SHM_COMMANDS + ;; release) echo $RELEASE_BUILD_COMMANDS ;;