Upload upstream chromium 73.0.3683.0
[platform/framework/web/chromium-efl.git] / sql / BUILD.gn
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.
4
5 import("//testing/test.gni")
6
7 component("sql") {
8   sources = [
9     "database.cc",
10     "database.h",
11     "database_memory_dump_provider.cc",
12     "database_memory_dump_provider.h",
13     "error_delegate_util.cc",
14     "error_delegate_util.h",
15     "init_status.h",
16     "initialization.cc",
17     "initialization.h",
18     "internal_api_token.h",
19     "meta_table.cc",
20     "meta_table.h",
21     "recovery.cc",
22     "recovery.h",
23     "sql_features.cc",
24     "sql_features.h",
25     "sql_memory_dump_provider.cc",
26     "sql_memory_dump_provider.h",
27     "statement.cc",
28     "statement.h",
29     "statement_id.cc",
30     "statement_id.h",
31     "transaction.cc",
32     "transaction.h",
33     "vfs_wrapper.cc",
34     "vfs_wrapper.h",
35   ]
36
37   defines = [ "IS_SQL_IMPL" ]
38
39   deps = [
40     "//base",
41     "//base/third_party/dynamic_annotations",
42     "//third_party/sqlite",
43   ]
44
45   # For vfs_wrapper.cc time-machine exclusions.
46   if (is_mac) {
47     libs = [
48       "CoreFoundation.framework",
49       "CoreServices.framework",
50     ]
51   }
52 }
53
54 static_library("test_support") {
55   testonly = true
56   sources = [
57     "test/error_callback_support.cc",
58     "test/error_callback_support.h",
59     "test/scoped_error_expecter.cc",
60     "test/scoped_error_expecter.h",
61     "test/test_helpers.cc",
62     "test/test_helpers.h",
63   ]
64
65   public_deps = [
66     ":sql",
67   ]
68   deps = [
69     "//base",
70     "//testing/gtest",
71     "//third_party/sqlite",
72   ]
73 }
74
75 bundle_data("sql_unittests_bundle_data") {
76   testonly = true
77   sources = [
78     "test/data/recovery_387868",
79   ]
80   outputs = [
81     "{{bundle_resources_dir}}/" +
82         "{{source_root_relative_dir}}/{{source_file_part}}",
83   ]
84 }
85
86 test("sql_unittests") {
87   sources = [
88     "database_unittest.cc",
89     "meta_table_unittest.cc",
90     "recovery_unittest.cc",
91     "sql_memory_dump_provider_unittest.cc",
92     "sqlite_features_unittest.cc",
93     "statement_id_unittest.cc",
94     "statement_unittest.cc",
95     "test/paths.cc",
96     "test/paths.h",
97     "test/run_all_unittests.cc",
98     "test/sql_test_base.cc",
99     "test/sql_test_base.h",
100     "test/sql_test_suite.cc",
101     "test/sql_test_suite.h",
102     "transaction_unittest.cc",
103   ]
104
105   data = [
106     "test/data/",
107   ]
108
109   deps = [
110     ":sql",
111     ":sql_unittests_bundle_data",
112     ":test_support",
113     "//base/test:test_support",
114     "//testing/gtest",
115     "//third_party/sqlite",
116   ]
117 }