From fca4d6da175f0a77e5f77ae439c69ab5208e229a Mon Sep 17 00:00:00 2001 From: Siying Dong Date: Thu, 27 Jul 2017 17:15:48 -0700 Subject: [PATCH] Build fewer tests in Travis platform_dependent tests Summary: platform_dependent tests in Travis now builds all tests, which is not needed. Only build those tests we need to run. Closes https://github.com/facebook/rocksdb/pull/2647 Differential Revision: D5513954 Pulled By: siying fbshipit-source-id: 4d540b146124e70dd25586c47939d19f93655b0a --- .travis.yml | 2 +- Makefile | 2 ++ db/db_basic_test.cc | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 887fbfc2f..78e519159 100644 --- a/.travis.yml +++ b/.travis.yml @@ -57,7 +57,7 @@ before_script: script: - ${CXX} --version - - if [ "${TEST_GROUP}" == 'platform_dependent' ]; then ccache -C && OPT=-DTRAVIS V=1 make -j4 all && OPT=-DTRAVIS V=1 ROCKSDBTESTS_END=db_block_cache_test make -j4 check_some; fi + - if [ "${TEST_GROUP}" == 'platform_dependent' ]; then ccache -C && OPT=-DTRAVIS V=1 ROCKSDBTESTS_END=db_block_cache_test make -j4 all_but_some_tests check_some; fi - if [ "${TEST_GROUP}" == '1' ]; then OPT=-DTRAVIS V=1 ROCKSDBTESTS_START=db_block_cache_test ROCKSDBTESTS_END=comparator_db_test make -j4 check_some; fi - if [ "${TEST_GROUP}" == '2' ]; then OPT=-DTRAVIS V=1 ROCKSDBTESTS_START=comparator_db_test make -j4 check_some; fi - if [ "${JOB_NAME}" == 'java_test' ]; then OPT=-DTRAVIS V=1 make clean jclean && make rocksdbjava jtest; fi diff --git a/Makefile b/Makefile index c40d741d7..55f642135 100644 --- a/Makefile +++ b/Makefile @@ -575,6 +575,8 @@ endif # PLATFORM_SHARED_EXT all: $(LIBRARY) $(BENCHMARKS) tools tools_lib test_libs $(TESTS) +all_but_some_tests: $(LIBRARY) $(BENCHMARKS) tools tools_lib test_libs $(SUBSET) + static_lib: $(LIBRARY) shared_lib: $(SHARED) diff --git a/db/db_basic_test.cc b/db/db_basic_test.cc index 3d732f573..cfbe2c567 100644 --- a/db/db_basic_test.cc +++ b/db/db_basic_test.cc @@ -175,6 +175,8 @@ TEST_F(DBBasicTest, LevelLimitReopen) { int i = 0; while (NumTableFilesAtLevel(2, 1) == 0) { ASSERT_OK(Put(1, Key(i++), value)); + dbfull()->TEST_WaitForFlushMemTable(); + dbfull()->TEST_WaitForCompact(); } options.num_levels = 1; -- GitLab