Add startup_cold, startup_cold_dirty, startup_warm, and startup_warm_dirty test info.
[chromium-blink-merge.git] / sql / sql.gyp
blobaa2d642e2c17858998bbf64b630a052f248c8d91
1 # Copyright (c) 2012 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.
6   'variables': {
7     'chromium_code': 1,
8   },
9   'targets': [
10     {
11       'target_name': 'sql',
12       'type': '<(component)',
13       'dependencies': [
14         '../base/base.gyp:base',
15         '../third_party/sqlite/sqlite.gyp:sqlite',
16         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
17       ],
18       'export_dependent_settings': [
19         '../base/base.gyp:base',
20       ],
21       'defines': [ 'SQL_IMPLEMENTATION' ],
22       'sources': [
23         'connection.cc',
24         'connection.h',
25         'error_delegate_util.cc',
26         'error_delegate_util.h',
27         'init_status.h',
28         'meta_table.cc',
29         'meta_table.h',
30         'recovery.cc',
31         'recovery.h',
32         'statement.cc',
33         'statement.h',
34         'transaction.cc',
35         'transaction.h',
36       ],
37       'include_dirs': [
38         '..',
39       ],
40       'direct_dependent_settings': {
41         'include_dirs': [
42           '..',
43         ],
44       },
45       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
46       'msvs_disabled_warnings': [4267, ],
47     },
48     {
49       'target_name': 'test_support_sql',
50       'type': 'static_library',
51       'dependencies': [
52         'sql',
53         '../base/base.gyp:base',
54         '../testing/gtest.gyp:gtest',
55       ],
56       'export_dependent_settings': [
57         'sql',
58         '../base/base.gyp:base',
59       ],
60       'sources': [
61         'test/error_callback_support.cc',
62         'test/error_callback_support.h',
63         'test/scoped_error_ignorer.cc',
64         'test/scoped_error_ignorer.h',
65       ],
66       'include_dirs': [
67         '..',
68       ],
69       'direct_dependent_settings': {
70         'include_dirs': [
71           '..',
72         ],
73       },
74     },
75     {
76       'target_name': 'sql_unittests',
77       'type': '<(gtest_target_type)',
78       'dependencies': [
79         'sql',
80         'test_support_sql',
81         '../base/base.gyp:run_all_unittests',
82         '../base/base.gyp:test_support_base',
83         '../testing/gtest.gyp:gtest',
84         '../third_party/sqlite/sqlite.gyp:sqlite',
85       ],
86       'sources': [
87         'connection_unittest.cc',
88         'recovery_unittest.cc',
89         'sqlite_features_unittest.cc',
90         'statement_unittest.cc',
91         'transaction_unittest.cc',
92       ],
93       'include_dirs': [
94         '..',
95       ],
96       'conditions': [
97         ['os_posix==1 and OS!="mac" and OS!="ios"', {
98           'conditions': [
99             ['linux_use_tcmalloc==1', {
100               'dependencies': [
101                 '../base/allocator/allocator.gyp:allocator',
102               ],
103             }],
104           ],
105         }],
106         ['OS == "android" and gtest_target_type == "shared_library"', {
107           'dependencies': [
108             '../testing/android/native_test.gyp:native_test_native_code',
109           ],
110         }],
111       ],
112       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
113       'msvs_disabled_warnings': [4267, ],
114     },
115   ],
116   'conditions': [
117     # Special target to wrap a gtest_target_type==shared_library
118     # sql_unittests into an android apk for execution.
119     ['OS == "android" and gtest_target_type == "shared_library"', {
120       'targets': [
121         {
122           'target_name': 'sql_unittests_apk',
123           'type': 'none',
124           'dependencies': [
125             'sql_unittests',
126           ],
127           'variables': {
128             'test_suite_name': 'sql_unittests',
129             'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)sql_unittests<(SHARED_LIB_SUFFIX)',
130           },
131           'includes': [ '../build/apk_test.gypi' ],
132         },
133       ],
134     }],
135   ],