1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//testing/test.gni")
7 defines = [ "LEVELDB_PLATFORM_CHROMIUM=1" ]
9 config("leveldatabase_config") {
17 static_library("leveldatabase") {
22 "port/port_chromium.cc",
23 "port/port_chromium.h",
35 "src/db/log_format.h",
36 "src/db/log_reader.cc",
37 "src/db/log_reader.h",
38 "src/db/log_writer.cc",
39 "src/db/log_writer.h",
45 "src/db/table_cache.cc",
46 "src/db/table_cache.h",
47 "src/db/version_edit.cc",
48 "src/db/version_edit.h",
49 "src/db/version_set.cc",
50 "src/db/version_set.h",
51 "src/db/write_batch.cc",
52 "src/db/write_batch_internal.h",
53 "src/helpers/memenv/memenv.cc",
54 "src/helpers/memenv/memenv.h",
55 "src/include/leveldb/cache.h",
56 "src/include/leveldb/comparator.h",
57 "src/include/leveldb/db.h",
58 "src/include/leveldb/dumpfile.h",
59 "src/include/leveldb/env.h",
60 "src/include/leveldb/filter_policy.h",
61 "src/include/leveldb/iterator.h",
62 "src/include/leveldb/options.h",
63 "src/include/leveldb/slice.h",
64 "src/include/leveldb/status.h",
65 "src/include/leveldb/table.h",
66 "src/include/leveldb/table_builder.h",
67 "src/include/leveldb/write_batch.h",
71 "src/table/block_builder.cc",
72 "src/table/block_builder.h",
73 "src/table/filter_block.cc",
74 "src/table/filter_block.h",
75 "src/table/format.cc",
77 "src/table/iterator.cc",
78 "src/table/iterator_wrapper.h",
79 "src/table/merger.cc",
82 "src/table/table_builder.cc",
83 "src/table/two_level_iterator.cc",
84 "src/table/two_level_iterator.h",
91 "src/util/comparator.cc",
95 "src/util/filter_policy.cc",
98 "src/util/logging.cc",
100 "src/util/mutexlock.h",
101 "src/util/options.cc",
103 "src/util/status.cc",
106 configs -= [ "//build/config/compiler:chromium_code" ]
107 configs += [ "//build/config/compiler:no_chromium_code" ]
109 public_configs = [ ":leveldatabase_config" ]
113 "//base/third_party/dynamic_annotations",
115 "//third_party/snappy",
120 test("env_chromium_unittests") {
122 "env_chromium_unittest.cc",
126 "//base/test:test_support",
131 static_library("leveldb_testutil") {
133 "src/util/histogram.cc",
134 "src/util/histogram.h",
135 "src/util/testharness.cc",
136 "src/util/testharness.h",
137 "src/util/testutil.cc",
138 "src/util/testutil.h",
141 configs -= [ "//build/config/compiler:chromium_code" ]
142 configs += [ "//build/config/compiler:no_chromium_code" ]
152 test("leveldb_arena_test") {
154 "src/util/arena_test.cc",
156 configs -= [ "//build/config/compiler:chromium_code" ]
157 configs += [ "//build/config/compiler:no_chromium_code" ]
163 test("leveldb_bloom_test") {
165 "src/util/bloom_test.cc",
167 configs -= [ "//build/config/compiler:chromium_code" ]
168 configs += [ "//build/config/compiler:no_chromium_code" ]
174 test("leveldb_cache_test") {
176 "src/util/cache_test.cc",
178 configs -= [ "//build/config/compiler:chromium_code" ]
179 configs += [ "//build/config/compiler:no_chromium_code" ]
185 test("leveldb_corruption_test") {
187 "src/db/corruption_test.cc",
189 configs -= [ "//build/config/compiler:chromium_code" ]
190 configs += [ "//build/config/compiler:no_chromium_code" ]
196 test("leveldb_crc32c_test") {
198 "src/util/crc32c_test.cc",
200 configs -= [ "//build/config/compiler:chromium_code" ]
201 configs += [ "//build/config/compiler:no_chromium_code" ]
207 test("leveldb_db_bench") {
209 "src/db/db_bench.cc",
211 configs -= [ "//build/config/compiler:chromium_code" ]
212 configs += [ "//build/config/compiler:no_chromium_code" ]
218 test("leveldb_db_test") {
222 configs -= [ "//build/config/compiler:chromium_code" ]
223 configs += [ "//build/config/compiler:no_chromium_code" ]
229 test("leveldb_dbformat_test") {
231 "src/db/dbformat_test.cc",
233 configs -= [ "//build/config/compiler:chromium_code" ]
234 configs += [ "//build/config/compiler:no_chromium_code" ]
240 test("leveldb_env_test") {
242 "src/util/env_test.cc",
244 configs -= [ "//build/config/compiler:chromium_code" ]
245 configs += [ "//build/config/compiler:no_chromium_code" ]
251 test("leveldb_filename_test") {
253 "src/db/filename_test.cc",
255 configs -= [ "//build/config/compiler:chromium_code" ]
256 configs += [ "//build/config/compiler:no_chromium_code" ]
262 test("leveldb_filter_block_test") {
264 "src/table/filter_block_test.cc",
266 configs -= [ "//build/config/compiler:chromium_code" ]
267 configs += [ "//build/config/compiler:no_chromium_code" ]
273 test("leveldb_log_test") {
275 "src/db/log_test.cc",
277 configs -= [ "//build/config/compiler:chromium_code" ]
278 configs += [ "//build/config/compiler:no_chromium_code" ]
284 test("leveldb_skiplist_test") {
286 "src/db/skiplist_test.cc",
288 configs -= [ "//build/config/compiler:chromium_code" ]
289 configs += [ "//build/config/compiler:no_chromium_code" ]
295 test("leveldb_table_test") {
297 "src/table/table_test.cc",
299 configs -= [ "//build/config/compiler:chromium_code" ]
300 configs += [ "//build/config/compiler:no_chromium_code" ]
306 test("leveldb_version_edit_test") {
308 "src/db/version_edit_test.cc",
310 configs -= [ "//build/config/compiler:chromium_code" ]
311 configs += [ "//build/config/compiler:no_chromium_code" ]
317 test("leveldb_write_batch_test") {
319 "src/db/write_batch_test.cc",
321 configs -= [ "//build/config/compiler:chromium_code" ]
322 configs += [ "//build/config/compiler:no_chromium_code" ]