Support total and per-second task/threadtime timeline metrics
[chromium-blink-merge.git] / sql / BUILD.gn
blob8b75d8009365c16261e704dd5eebb5632cd424b2
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 component("sql") {
8   sources = [
9     "connection.cc",
10     "connection.h",
11     "error_delegate_util.cc",
12     "error_delegate_util.h",
13     "init_status.h",
14     "meta_table.cc",
15     "meta_table.h",
16     "recovery.cc",
17     "recovery.h",
18     "statement.cc",
19     "statement.h",
20     "transaction.cc",
21     "transaction.h",
22   ]
24   # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
25   configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
27   defines = [ "SQL_IMPLEMENTATION" ]
29   deps = [
30     "//base",
31     "//third_party/sqlite",
32     "//base/third_party/dynamic_annotations",
33   ]
36 source_set("test_support") {
37   testonly = true
38   sources = [
39     "test/error_callback_support.cc",
40     "test/error_callback_support.h",
41     "test/scoped_error_ignorer.cc",
42     "test/scoped_error_ignorer.h",
43     "test/test_helpers.cc",
44     "test/test_helpers.h",
45   ]
47   deps = [
48     ":sql",
49     "//base",
50     "//testing/gtest",
51     "//third_party/sqlite",
52   ]
55 test("sql_unittests") {
56   sources = [
57     "connection_unittest.cc",
58     "meta_table_unittest.cc",
59     "recovery_unittest.cc",
60     "sqlite_features_unittest.cc",
61     "statement_unittest.cc",
62     "test/paths.cc",
63     "test/paths.h",
64     "test/run_all_unittests.cc",
65     "test/sql_test_suite.cc",
66     "test/sql_test_suite.h",
67     "transaction_unittest.cc",
68   ]
70   # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
71   configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
73   deps = [
74     ":sql",
75     ":test_support",
76     "//base/allocator",
77     "//base/test:test_support",
78     "//testing/gtest",
79     "//third_party/sqlite",
80   ]
82   # TODO(GYP)
83   #['OS == "android"', {
84   #  'dependencies': [
85   #    '../testing/android/native_test.gyp:native_test_native_code',
86   #  ],
87   #}],
90 if (is_android) {
91   #TODO(GYP)
92   #'target_name': 'sql_unittests_apk',
93   #'type': 'none',
94   #'dependencies': [
95   #  'sql_unittests',
96   #],
97   #'variables': {
98   #  'test_suite_name': 'sql_unittests',
99   #},
100   #'includes': [ '../build/apk_test.gypi' ],