1 # Copyright 2014 The Chromium Authors
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/libfuzzer/fuzzer_test.gni")
6 import("//testing/test.gni")
12 "database_memory_dump_provider.cc",
13 "database_memory_dump_provider.h",
14 "error_delegate_util.cc",
15 "error_delegate_util.h",
19 "internal_api_token.h",
22 "recover_module/btree.cc",
23 "recover_module/btree.h",
24 "recover_module/cursor.cc",
25 "recover_module/cursor.h",
26 "recover_module/integers.cc",
27 "recover_module/integers.h",
28 "recover_module/module.cc",
29 "recover_module/module.h",
30 "recover_module/pager.cc",
31 "recover_module/pager.h",
32 "recover_module/parsing.cc",
33 "recover_module/parsing.h",
34 "recover_module/payload.cc",
35 "recover_module/payload.h",
36 "recover_module/record.cc",
37 "recover_module/record.h",
38 "recover_module/table.cc",
39 "recover_module/table.h",
44 "sandboxed_vfs_file.cc",
45 "sandboxed_vfs_file.h",
48 "sql_memory_dump_provider.cc",
49 "sql_memory_dump_provider.h",
50 "sqlite_result_code.cc",
51 "sqlite_result_code.h",
52 "sqlite_result_code_values.cc",
53 "sqlite_result_code_values.h",
64 defines = [ "IS_SQL_IMPL" ]
68 "//base/third_party/dynamic_annotations",
69 "//third_party/sqlite",
72 # For vfs_wrapper.cc time-machine exclusions.
75 "CoreFoundation.framework",
76 "CoreServices.framework",
82 "vfs_wrapper_fuchsia.cc",
83 "vfs_wrapper_fuchsia.h",
88 static_library("test_support") {
91 "test/scoped_error_expecter.cc",
92 "test/scoped_error_expecter.h",
93 "test/test_helpers.cc",
94 "test/test_helpers.h",
97 public_deps = [ ":sql" ]
101 "//third_party/sqlite",
105 bundle_data("sql_unittests_bundle_data") {
107 sources = [ "test/data/recovery_387868" ]
108 outputs = [ "{{bundle_resources_dir}}/" +
109 "{{source_root_relative_dir}}/{{source_file_part}}" ]
112 test("sql_unittests") {
114 "database_options_unittest.cc",
115 "database_unittest.cc",
116 "meta_table_unittest.cc",
117 "recover_module/module_unittest.cc",
118 "recovery_unittest.cc",
119 "sql_memory_dump_provider_unittest.cc",
120 "sqlite_features_unittest.cc",
121 "sqlite_result_code_unittest.cc",
122 "statement_id_unittest.cc",
123 "statement_unittest.cc",
124 "test/database_test_peer.cc",
125 "test/database_test_peer.h",
128 "test/run_all_unittests.cc",
129 "test/sql_test_suite.cc",
130 "test/sql_test_suite.h",
131 "transaction_unittest.cc",
134 data = [ "test/data/" ]
138 ":sql_unittests_bundle_data",
140 "//base/test:test_support",
142 "//third_party/sqlite",
146 fuzzer_test("sql_recovery_fuzzer") {
147 sources = [ "recovery_fuzzer.cc" ]
151 "//base/test:test_support",
155 # TODO(https://crbug.com/1385500): Make built-in recovery work on Fuchsia.
157 fuzzer_test("sql_built_in_recovery_fuzzer") {
158 sources = [ "built_in_recovery_fuzzer.cc" ]
162 "//base/test:test_support",
165 libfuzzer_options = [ "rss_limit_mb=4096" ]