Clean up dependency: Move db_test_util.* to db directory

Summary:
As part of tech debt week, we are cleaning up dependencies.
This diff moves db_test_util.[h,cc] from util to db directory.

Test Plan: make check

Reviewers: igor, sdong

Reviewed By: sdong

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D48543
main
Venkatesh Radhakrishnan 9 years ago
parent 2379944093
commit f1fdf5205b
  1. 2
      CMakeLists.txt
  2. 20
      Makefile
  3. 2
      db/db_compaction_filter_test.cc
  4. 2
      db/db_compaction_test.cc
  5. 2
      db/db_dynamic_level_test.cc
  6. 2
      db/db_inplace_update_test.cc
  7. 2
      db/db_log_iter_test.cc
  8. 2
      db/db_tailing_iter_test.cc
  9. 2
      db/db_test.cc
  10. 2
      db/db_test_util.cc
  11. 2
      db/db_test_util.h
  12. 2
      db/db_universal_compaction_test.cc
  13. 2
      db/db_wal_test.cc
  14. 2
      src.mk

@ -100,6 +100,7 @@ set(SOURCES
db/db_impl_experimental.cc db/db_impl_experimental.cc
db/db_impl_readonly.cc db/db_impl_readonly.cc
db/db_iter.cc db/db_iter.cc
db/db_test_util.cc
db/event_helpers.cc db/event_helpers.cc
db/experimental.cc db/experimental.cc
db/filename.cc db/filename.cc
@ -175,7 +176,6 @@ set(SOURCES
util/crc32c.cc util/crc32c.cc
util/db_info_dumper.cc util/db_info_dumper.cc
util/delete_scheduler_impl.cc util/delete_scheduler_impl.cc
util/db_test_util.cc
util/dynamic_bloom.cc util/dynamic_bloom.cc
util/env.cc util/env.cc
util/env_hdfs.cc util/env_hdfs.cc

@ -609,7 +609,7 @@ unity.a: unity.o
$(AM_V_at)$(AR) $(ARFLAGS) $@ unity.o $(AM_V_at)$(AR) $(ARFLAGS) $@ unity.o
# try compiling db_test with unity # try compiling db_test with unity
unity_test: db/db_test.o util/db_test_util.o $(TESTHARNESS) unity.a unity_test: db/db_test.o db/db_test_util.o $(TESTHARNESS) unity.a
$(AM_LINK) $(AM_LINK)
./unity_test ./unity_test
@ -709,34 +709,34 @@ crc32c_test: util/crc32c_test.o $(LIBOBJECTS) $(TESTHARNESS)
slice_transform_test: util/slice_transform_test.o $(LIBOBJECTS) $(TESTHARNESS) slice_transform_test: util/slice_transform_test.o $(LIBOBJECTS) $(TESTHARNESS)
$(AM_LINK) $(AM_LINK)
db_test: db/db_test.o util/db_test_util.o $(LIBOBJECTS) $(TESTHARNESS) db_test: db/db_test.o db/db_test_util.o $(LIBOBJECTS) $(TESTHARNESS)
$(AM_LINK) $(AM_LINK)
db_log_iter_test: db/db_log_iter_test.o util/db_test_util.o $(LIBOBJECTS) $(TESTHARNESS) db_log_iter_test: db/db_log_iter_test.o db/db_test_util.o $(LIBOBJECTS) $(TESTHARNESS)
$(AM_LINK) $(AM_LINK)
db_compaction_filter_test: db/db_compaction_filter_test.o util/db_test_util.o $(LIBOBJECTS) $(TESTHARNESS) db_compaction_filter_test: db/db_compaction_filter_test.o db/db_test_util.o $(LIBOBJECTS) $(TESTHARNESS)
$(AM_LINK) $(AM_LINK)
db_compaction_test: db/db_compaction_test.o util/db_test_util.o $(LIBOBJECTS) $(TESTHARNESS) db_compaction_test: db/db_compaction_test.o db/db_test_util.o $(LIBOBJECTS) $(TESTHARNESS)
$(AM_LINK) $(AM_LINK)
db_dynamic_level_test: db/db_dynamic_level_test.o util/db_test_util.o $(LIBOBJECTS) $(TESTHARNESS) db_dynamic_level_test: db/db_dynamic_level_test.o db/db_test_util.o $(LIBOBJECTS) $(TESTHARNESS)
$(AM_LINK) $(AM_LINK)
db_inplace_update_test: db/db_inplace_update_test.o util/db_test_util.o $(LIBOBJECTS) $(TESTHARNESS) db_inplace_update_test: db/db_inplace_update_test.o db/db_test_util.o $(LIBOBJECTS) $(TESTHARNESS)
$(AM_LINK) $(AM_LINK)
db_tailing_iter_test: db/db_tailing_iter_test.o util/db_test_util.o $(LIBOBJECTS) $(TESTHARNESS) db_tailing_iter_test: db/db_tailing_iter_test.o db/db_test_util.o $(LIBOBJECTS) $(TESTHARNESS)
$(AM_LINK) $(AM_LINK)
db_iter_test: db/db_iter_test.o $(LIBOBJECTS) $(TESTHARNESS) db_iter_test: db/db_iter_test.o $(LIBOBJECTS) $(TESTHARNESS)
$(AM_LINK) $(AM_LINK)
db_universal_compaction_test: db/db_universal_compaction_test.o util/db_test_util.o $(LIBOBJECTS) $(TESTHARNESS) db_universal_compaction_test: db/db_universal_compaction_test.o db/db_test_util.o $(LIBOBJECTS) $(TESTHARNESS)
$(AM_LINK) $(AM_LINK)
db_wal_test: db/db_wal_test.o util/db_test_util.o $(LIBOBJECTS) $(TESTHARNESS) db_wal_test: db/db_wal_test.o db/db_test_util.o $(LIBOBJECTS) $(TESTHARNESS)
$(AM_LINK) $(AM_LINK)
log_write_bench: util/log_write_bench.o $(LIBOBJECTS) $(TESTHARNESS) log_write_bench: util/log_write_bench.o $(LIBOBJECTS) $(TESTHARNESS)

@ -7,8 +7,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors. // found in the LICENSE file. See the AUTHORS file for names of contributors.
#include "db/db_test_util.h"
#include "port/stack_trace.h" #include "port/stack_trace.h"
#include "util/db_test_util.h"
namespace rocksdb { namespace rocksdb {

@ -7,9 +7,9 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors. // found in the LICENSE file. See the AUTHORS file for names of contributors.
#include "db/db_test_util.h"
#include "port/stack_trace.h" #include "port/stack_trace.h"
#include "rocksdb/experimental.h" #include "rocksdb/experimental.h"
#include "util/db_test_util.h"
#include "util/sync_point.h" #include "util/sync_point.h"
namespace rocksdb { namespace rocksdb {

@ -12,8 +12,8 @@
// which is a pity, it is a good test // which is a pity, it is a good test
#if !(defined NDEBUG) || !defined(OS_WIN) #if !(defined NDEBUG) || !defined(OS_WIN)
#include "db/db_test_util.h"
#include "port/stack_trace.h" #include "port/stack_trace.h"
#include "util/db_test_util.h"
namespace rocksdb { namespace rocksdb {
class DBTestDynamicLevel : public DBTestBase { class DBTestDynamicLevel : public DBTestBase {

@ -6,8 +6,8 @@
// Copyright (c) 2011 The LevelDB Authors. All rights reserved. // Copyright (c) 2011 The LevelDB Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors. // found in the LICENSE file. See the AUTHORS file for names of contributors.
#include "db/db_test_util.h"
#include "port/stack_trace.h" #include "port/stack_trace.h"
#include "util/db_test_util.h"
namespace rocksdb { namespace rocksdb {

@ -12,8 +12,8 @@
// which is a pity, it is a good test // which is a pity, it is a good test
#if !(defined NDEBUG) || !defined(OS_WIN) #if !(defined NDEBUG) || !defined(OS_WIN)
#include "db/db_test_util.h"
#include "port/stack_trace.h" #include "port/stack_trace.h"
#include "util/db_test_util.h"
namespace rocksdb { namespace rocksdb {

@ -12,9 +12,9 @@
// which is a pity, it is a good test // which is a pity, it is a good test
#if !(defined NDEBUG) || !defined(OS_WIN) #if !(defined NDEBUG) || !defined(OS_WIN)
#include "db/db_test_util.h"
#include "db/forward_iterator.h" #include "db/forward_iterator.h"
#include "port/stack_trace.h" #include "port/stack_trace.h"
#include "util/db_test_util.h"
namespace rocksdb { namespace rocksdb {

@ -26,6 +26,7 @@
#include "db/filename.h" #include "db/filename.h"
#include "db/dbformat.h" #include "db/dbformat.h"
#include "db/db_impl.h" #include "db/db_impl.h"
#include "db/db_test_util.h"
#include "db/job_context.h" #include "db/job_context.h"
#include "db/version_set.h" #include "db/version_set.h"
#include "db/write_batch_internal.h" #include "db/write_batch_internal.h"
@ -53,7 +54,6 @@
#include "table/block_based_table_factory.h" #include "table/block_based_table_factory.h"
#include "table/mock_table.h" #include "table/mock_table.h"
#include "table/plain_table_factory.h" #include "table/plain_table_factory.h"
#include "util/db_test_util.h"
#include "util/file_reader_writer.h" #include "util/file_reader_writer.h"
#include "util/hash.h" #include "util/hash.h"
#include "util/hash_linklist_rep.h" #include "util/hash_linklist_rep.h"

@ -7,7 +7,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors. // found in the LICENSE file. See the AUTHORS file for names of contributors.
#include "util/db_test_util.h" #include "db/db_test_util.h"
namespace rocksdb { namespace rocksdb {

@ -27,6 +27,7 @@
#include <vector> #include <vector>
#include "db/db_impl.h" #include "db/db_impl.h"
#include "db/db_test_util.h"
#include "db/dbformat.h" #include "db/dbformat.h"
#include "db/filename.h" #include "db/filename.h"
#include "rocksdb/cache.h" #include "rocksdb/cache.h"
@ -43,7 +44,6 @@
#include "table/mock_table.h" #include "table/mock_table.h"
#include "table/plain_table_factory.h" #include "table/plain_table_factory.h"
#include "util/compression.h" #include "util/compression.h"
#include "util/db_test_util.h"
#include "util/hash_linklist_rep.h" #include "util/hash_linklist_rep.h"
#include "util/mock_env.h" #include "util/mock_env.h"
#include "util/mutexlock.h" #include "util/mutexlock.h"

@ -7,8 +7,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors. // found in the LICENSE file. See the AUTHORS file for names of contributors.
#include "db/db_test_util.h"
#include "port/stack_trace.h" #include "port/stack_trace.h"
#include "util/db_test_util.h"
#if !(defined NDEBUG) || !defined(OS_WIN) #if !(defined NDEBUG) || !defined(OS_WIN)
#include "util/sync_point.h" #include "util/sync_point.h"

@ -7,8 +7,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors. // found in the LICENSE file. See the AUTHORS file for names of contributors.
#include "db/db_test_util.h"
#include "port/stack_trace.h" #include "port/stack_trace.h"
#include "util/db_test_util.h"
#if !(defined NDEBUG) || !defined(OS_WIN) #if !(defined NDEBUG) || !defined(OS_WIN)
#include "util/sync_point.h" #include "util/sync_point.h"
#endif #endif

@ -205,6 +205,7 @@ TEST_BENCH_SOURCES = \
db/prefix_test.cc \ db/prefix_test.cc \
db/skiplist_test.cc \ db/skiplist_test.cc \
db/table_properties_collector_test.cc \ db/table_properties_collector_test.cc \
db/db_test_util.cc \
db/version_builder_test.cc \ db/version_builder_test.cc \
db/version_edit_test.cc \ db/version_edit_test.cc \
db/version_set_test.cc \ db/version_set_test.cc \
@ -233,7 +234,6 @@ TEST_BENCH_SOURCES = \
util/cache_test.cc \ util/cache_test.cc \
util/coding_test.cc \ util/coding_test.cc \
util/crc32c_test.cc \ util/crc32c_test.cc \
util/db_test_util.cc \
util/dynamic_bloom_test.cc \ util/dynamic_bloom_test.cc \
util/env_test.cc \ util/env_test.cc \
util/filelock_test.cc \ util/filelock_test.cc \

Loading…
Cancel
Save