OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # Snappy is a compression library we use. | 5 # Snappy is a compression library we use. |
6 # TODO(brettw) It's not clear why this needs to be parameterized. | 6 # TODO(brettw) It's not clear why this needs to be parameterized. |
7 use_snappy = true | 7 use_snappy = true |
8 | 8 |
9 defines = [ "LEVELDB_PLATFORM_CHROMIUM=1" ] | 9 defines = [ "LEVELDB_PLATFORM_CHROMIUM=1" ] |
10 | 10 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 "//base/third_party/dynamic_annotations", | 121 "//base/third_party/dynamic_annotations", |
122 "//third_party/re2", | 122 "//third_party/re2", |
123 ] | 123 ] |
124 | 124 |
125 if (use_snappy) { | 125 if (use_snappy) { |
126 defines += [ "USE_SNAPPY=1" ] | 126 defines += [ "USE_SNAPPY=1" ] |
127 deps += [ "//third_party/snappy" ] | 127 deps += [ "//third_party/snappy" ] |
128 } | 128 } |
129 } | 129 } |
130 | 130 |
131 test("env_chromium_unittests") { | 131 if (!is_android) { |
132 sources = [ | 132 test("env_chromium_unittests") { |
133 "env_chromium_unittest.cc", | 133 sources = [ |
134 ] | 134 "env_chromium_unittest.cc", |
135 deps = [ | 135 ] |
136 ":leveldatabase", | 136 deps = [ |
137 "//base/test:test_support", | 137 ":leveldatabase", |
138 "//testing/gtest", | 138 "//base/test:test_support", |
139 ] | 139 "//testing/gtest", |
| 140 ] |
| 141 } |
| 142 |
| 143 static_library("leveldb_testutil") { |
| 144 sources = [ |
| 145 "src/util/histogram.cc", |
| 146 "src/util/histogram.h", |
| 147 "src/util/testharness.cc", |
| 148 "src/util/testharness.h", |
| 149 "src/util/testutil.cc", |
| 150 "src/util/testutil.h", |
| 151 ] |
| 152 |
| 153 forward_dependent_configs_from = [ ":leveldatabase" ] |
| 154 configs -= [ "//build/config/compiler:chromium_code" ] |
| 155 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 156 |
| 157 deps = [ |
| 158 ":leveldatabase", |
| 159 "//base", |
| 160 ] |
| 161 } |
| 162 |
| 163 test("leveldb_arena_test") { |
| 164 sources = [ |
| 165 "src/util/arena_test.cc", |
| 166 ] |
| 167 configs -= [ "//build/config/compiler:chromium_code" ] |
| 168 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 169 deps = [ |
| 170 ":leveldb_testutil", |
| 171 ] |
| 172 } |
| 173 |
| 174 test("leveldb_bloom_test") { |
| 175 sources = [ |
| 176 "src/util/bloom_test.cc", |
| 177 ] |
| 178 configs -= [ "//build/config/compiler:chromium_code" ] |
| 179 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 180 deps = [ |
| 181 ":leveldb_testutil", |
| 182 ] |
| 183 } |
| 184 |
| 185 test("leveldb_cache_test") { |
| 186 sources = [ |
| 187 "src/util/cache_test.cc", |
| 188 ] |
| 189 configs -= [ "//build/config/compiler:chromium_code" ] |
| 190 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 191 deps = [ |
| 192 ":leveldb_testutil", |
| 193 ] |
| 194 } |
| 195 |
| 196 test("leveldb_corruption_test") { |
| 197 sources = [ |
| 198 "src/db/corruption_test.cc", |
| 199 ] |
| 200 configs -= [ "//build/config/compiler:chromium_code" ] |
| 201 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 202 deps = [ |
| 203 ":leveldb_testutil", |
| 204 ] |
| 205 } |
| 206 |
| 207 test("leveldb_crc32c_test") { |
| 208 sources = [ |
| 209 "src/util/crc32c_test.cc" |
| 210 ] |
| 211 configs -= [ "//build/config/compiler:chromium_code" ] |
| 212 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 213 deps = [ |
| 214 ":leveldb_testutil", |
| 215 ] |
| 216 } |
| 217 |
| 218 test("leveldb_db_bench") { |
| 219 sources = [ |
| 220 "src/db/db_bench.cc", |
| 221 ] |
| 222 configs -= [ "//build/config/compiler:chromium_code" ] |
| 223 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 224 deps = [ |
| 225 ":leveldb_testutil", |
| 226 ] |
| 227 } |
| 228 |
| 229 test("leveldb_db_test") { |
| 230 sources = [ |
| 231 "src/db/db_test.cc", |
| 232 ] |
| 233 configs -= [ "//build/config/compiler:chromium_code" ] |
| 234 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 235 deps = [ |
| 236 ":leveldb_testutil", |
| 237 ] |
| 238 } |
| 239 |
| 240 test("leveldb_dbformat_test") { |
| 241 sources = [ |
| 242 "src/db/dbformat_test.cc", |
| 243 ] |
| 244 configs -= [ "//build/config/compiler:chromium_code" ] |
| 245 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 246 deps = [ |
| 247 ":leveldb_testutil", |
| 248 ] |
| 249 } |
| 250 |
| 251 test("leveldb_env_test") { |
| 252 sources = [ |
| 253 "src/util/env_test.cc", |
| 254 ] |
| 255 configs -= [ "//build/config/compiler:chromium_code" ] |
| 256 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 257 deps = [ |
| 258 ":leveldb_testutil", |
| 259 ] |
| 260 } |
| 261 |
| 262 test("leveldb_filename_test") { |
| 263 sources = [ |
| 264 "src/db/filename_test.cc", |
| 265 ] |
| 266 configs -= [ "//build/config/compiler:chromium_code" ] |
| 267 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 268 deps = [ |
| 269 ":leveldb_testutil", |
| 270 ] |
| 271 } |
| 272 |
| 273 test("leveldb_filter_block_test") { |
| 274 sources = [ |
| 275 "src/table/filter_block_test.cc", |
| 276 ] |
| 277 configs -= [ "//build/config/compiler:chromium_code" ] |
| 278 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 279 deps = [ |
| 280 ":leveldb_testutil", |
| 281 ] |
| 282 } |
| 283 |
| 284 test("leveldb_log_test") { |
| 285 sources = [ |
| 286 "src/db/log_test.cc", |
| 287 ] |
| 288 configs -= [ "//build/config/compiler:chromium_code" ] |
| 289 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 290 deps = [ |
| 291 ":leveldb_testutil", |
| 292 ] |
| 293 } |
| 294 |
| 295 test("leveldb_skiplist_test") { |
| 296 sources = [ |
| 297 "src/db/skiplist_test.cc", |
| 298 ] |
| 299 configs -= [ "//build/config/compiler:chromium_code" ] |
| 300 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 301 deps = [ |
| 302 ":leveldb_testutil", |
| 303 ] |
| 304 } |
| 305 |
| 306 test("leveldb_table_test") { |
| 307 sources = [ |
| 308 "src/table/table_test.cc", |
| 309 ] |
| 310 configs -= [ "//build/config/compiler:chromium_code" ] |
| 311 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 312 deps = [ |
| 313 ":leveldb_testutil", |
| 314 ] |
| 315 } |
| 316 |
| 317 test("leveldb_version_edit_test") { |
| 318 sources = [ |
| 319 "src/db/version_edit_test.cc", |
| 320 ] |
| 321 configs -= [ "//build/config/compiler:chromium_code" ] |
| 322 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 323 deps = [ |
| 324 ":leveldb_testutil", |
| 325 ] |
| 326 } |
| 327 |
| 328 test("leveldb_write_batch_test") { |
| 329 sources = [ |
| 330 "src/db/write_batch_test.cc", |
| 331 ] |
| 332 configs -= [ "//build/config/compiler:chromium_code" ] |
| 333 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 334 deps = [ |
| 335 ":leveldb_testutil", |
| 336 ] |
| 337 } |
140 } | 338 } |
141 | |
142 static_library("leveldb_testutil") { | |
143 sources = [ | |
144 "src/util/histogram.cc", | |
145 "src/util/histogram.h", | |
146 "src/util/testharness.cc", | |
147 "src/util/testharness.h", | |
148 "src/util/testutil.cc", | |
149 "src/util/testutil.h", | |
150 ] | |
151 | |
152 forward_dependent_configs_from = [ ":leveldatabase" ] | |
153 configs -= [ "//build/config/compiler:chromium_code" ] | |
154 configs += [ "//build/config/compiler:no_chromium_code" ] | |
155 | |
156 deps = [ | |
157 ":leveldatabase", | |
158 "//base", | |
159 ] | |
160 } | |
161 | |
162 test("leveldb_arena_test") { | |
163 sources = [ | |
164 "src/util/arena_test.cc", | |
165 ] | |
166 configs -= [ "//build/config/compiler:chromium_code" ] | |
167 configs += [ "//build/config/compiler:no_chromium_code" ] | |
168 deps = [ | |
169 ":leveldb_testutil", | |
170 ] | |
171 } | |
172 | |
173 test("leveldb_bloom_test") { | |
174 sources = [ | |
175 "src/util/bloom_test.cc", | |
176 ] | |
177 configs -= [ "//build/config/compiler:chromium_code" ] | |
178 configs += [ "//build/config/compiler:no_chromium_code" ] | |
179 deps = [ | |
180 ":leveldb_testutil", | |
181 ] | |
182 } | |
183 | |
184 test("leveldb_cache_test") { | |
185 sources = [ | |
186 "src/util/cache_test.cc", | |
187 ] | |
188 configs -= [ "//build/config/compiler:chromium_code" ] | |
189 configs += [ "//build/config/compiler:no_chromium_code" ] | |
190 deps = [ | |
191 ":leveldb_testutil", | |
192 ] | |
193 } | |
194 | |
195 test("leveldb_corruption_test") { | |
196 sources = [ | |
197 "src/db/corruption_test.cc", | |
198 ] | |
199 configs -= [ "//build/config/compiler:chromium_code" ] | |
200 configs += [ "//build/config/compiler:no_chromium_code" ] | |
201 deps = [ | |
202 ":leveldb_testutil", | |
203 ] | |
204 } | |
205 | |
206 test("leveldb_crc32c_test") { | |
207 sources = [ | |
208 "src/util/crc32c_test.cc" | |
209 ] | |
210 configs -= [ "//build/config/compiler:chromium_code" ] | |
211 configs += [ "//build/config/compiler:no_chromium_code" ] | |
212 deps = [ | |
213 ":leveldb_testutil", | |
214 ] | |
215 } | |
216 | |
217 test("leveldb_db_bench") { | |
218 sources = [ | |
219 "src/db/db_bench.cc", | |
220 ] | |
221 configs -= [ "//build/config/compiler:chromium_code" ] | |
222 configs += [ "//build/config/compiler:no_chromium_code" ] | |
223 deps = [ | |
224 ":leveldb_testutil", | |
225 ] | |
226 } | |
227 | |
228 test("leveldb_db_test") { | |
229 sources = [ | |
230 "src/db/db_test.cc", | |
231 ] | |
232 configs -= [ "//build/config/compiler:chromium_code" ] | |
233 configs += [ "//build/config/compiler:no_chromium_code" ] | |
234 deps = [ | |
235 ":leveldb_testutil", | |
236 ] | |
237 } | |
238 | |
239 test("leveldb_dbformat_test") { | |
240 sources = [ | |
241 "src/db/dbformat_test.cc", | |
242 ] | |
243 configs -= [ "//build/config/compiler:chromium_code" ] | |
244 configs += [ "//build/config/compiler:no_chromium_code" ] | |
245 deps = [ | |
246 ":leveldb_testutil", | |
247 ] | |
248 } | |
249 | |
250 test("leveldb_env_test") { | |
251 sources = [ | |
252 "src/util/env_test.cc", | |
253 ] | |
254 configs -= [ "//build/config/compiler:chromium_code" ] | |
255 configs += [ "//build/config/compiler:no_chromium_code" ] | |
256 deps = [ | |
257 ":leveldb_testutil", | |
258 ] | |
259 } | |
260 | |
261 test("leveldb_filename_test") { | |
262 sources = [ | |
263 "src/db/filename_test.cc", | |
264 ] | |
265 configs -= [ "//build/config/compiler:chromium_code" ] | |
266 configs += [ "//build/config/compiler:no_chromium_code" ] | |
267 deps = [ | |
268 ":leveldb_testutil", | |
269 ] | |
270 } | |
271 | |
272 test("leveldb_filter_block_test") { | |
273 sources = [ | |
274 "src/table/filter_block_test.cc", | |
275 ] | |
276 configs -= [ "//build/config/compiler:chromium_code" ] | |
277 configs += [ "//build/config/compiler:no_chromium_code" ] | |
278 deps = [ | |
279 ":leveldb_testutil", | |
280 ] | |
281 } | |
282 | |
283 test("leveldb_log_test") { | |
284 sources = [ | |
285 "src/db/log_test.cc", | |
286 ] | |
287 configs -= [ "//build/config/compiler:chromium_code" ] | |
288 configs += [ "//build/config/compiler:no_chromium_code" ] | |
289 deps = [ | |
290 ":leveldb_testutil", | |
291 ] | |
292 } | |
293 | |
294 test("leveldb_skiplist_test") { | |
295 sources = [ | |
296 "src/db/skiplist_test.cc", | |
297 ] | |
298 configs -= [ "//build/config/compiler:chromium_code" ] | |
299 configs += [ "//build/config/compiler:no_chromium_code" ] | |
300 deps = [ | |
301 ":leveldb_testutil", | |
302 ] | |
303 } | |
304 | |
305 test("leveldb_table_test") { | |
306 sources = [ | |
307 "src/table/table_test.cc", | |
308 ] | |
309 configs -= [ "//build/config/compiler:chromium_code" ] | |
310 configs += [ "//build/config/compiler:no_chromium_code" ] | |
311 deps = [ | |
312 ":leveldb_testutil", | |
313 ] | |
314 } | |
315 | |
316 test("leveldb_version_edit_test") { | |
317 sources = [ | |
318 "src/db/version_edit_test.cc", | |
319 ] | |
320 configs -= [ "//build/config/compiler:chromium_code" ] | |
321 configs += [ "//build/config/compiler:no_chromium_code" ] | |
322 deps = [ | |
323 ":leveldb_testutil", | |
324 ] | |
325 } | |
326 | |
327 test("leveldb_write_batch_test") { | |
328 sources = [ | |
329 "src/db/write_batch_test.cc", | |
330 ] | |
331 configs -= [ "//build/config/compiler:chromium_code" ] | |
332 configs += [ "//build/config/compiler:no_chromium_code" ] | |
333 deps = [ | |
334 ":leveldb_testutil", | |
335 ] | |
336 } | |
OLD | NEW |