blob: 8b75d8009365c16261e704dd5eebb5632cd424b2 [file] [log] [blame]
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//testing/test.gni")
component("sql") {
sources = [
"connection.cc",
"connection.h",
"error_delegate_util.cc",
"error_delegate_util.h",
"init_status.h",
"meta_table.cc",
"meta_table.h",
"recovery.cc",
"recovery.h",
"statement.cc",
"statement.h",
"transaction.cc",
"transaction.h",
]
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
defines = [ "SQL_IMPLEMENTATION" ]
deps = [
"//base",
"//third_party/sqlite",
"//base/third_party/dynamic_annotations",
]
}
source_set("test_support") {
testonly = true
sources = [
"test/error_callback_support.cc",
"test/error_callback_support.h",
"test/scoped_error_ignorer.cc",
"test/scoped_error_ignorer.h",
"test/test_helpers.cc",
"test/test_helpers.h",
]
deps = [
":sql",
"//base",
"//testing/gtest",
"//third_party/sqlite",
]
}
test("sql_unittests") {
sources = [
"connection_unittest.cc",
"meta_table_unittest.cc",
"recovery_unittest.cc",
"sqlite_features_unittest.cc",
"statement_unittest.cc",
"test/paths.cc",
"test/paths.h",
"test/run_all_unittests.cc",
"test/sql_test_suite.cc",
"test/sql_test_suite.h",
"transaction_unittest.cc",
]
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
deps = [
":sql",
":test_support",
"//base/allocator",
"//base/test:test_support",
"//testing/gtest",
"//third_party/sqlite",
]
# TODO(GYP)
#['OS == "android"', {
# 'dependencies': [
# '../testing/android/native_test.gyp:native_test_native_code',
# ],
#}],
}
if (is_android) {
#TODO(GYP)
#'target_name': 'sql_unittests_apk',
#'type': 'none',
#'dependencies': [
# 'sql_unittests',
#],
#'variables': {
# 'test_suite_name': 'sql_unittests',
#},
#'includes': [ '../build/apk_test.gypi' ],
}