blob: 791ca1c779360bd0e281aaf72472debb29aa9218 [file] [log] [blame]
# Copyright 2017 The Fuchsia 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("//build/test.gni")
source_set("forculus_utils") {
sources = [
"field_element.cc",
"forculus_utils.cc",
"polynomial_computations.cc",
]
public_deps = [
"$cobalt_root/src:logging",
"$cobalt_root/src/pb",
"$cobalt_root/src/registry:cobalt_registry_proto",
]
configs += [ "$cobalt_root:cobalt_config" ]
}
source_set("forculus_encrypter") {
sources = [
"forculus_encrypter.cc",
]
public_deps = [
":forculus_utils",
"$cobalt_root/src/lib/crypto_util",
"$cobalt_root/src/lib/util:datetime_util",
"$cobalt_root/src/pb",
"$cobalt_root/src/registry:cobalt_registry_proto",
"$cobalt_root/src/system_data:client_secret",
"$cobalt_root/src/system_data:client_secret",
]
configs += [ "$cobalt_root:cobalt_config" ]
}
source_set("forculus_analyzer") {
sources = [
"forculus_analyzer.cc",
"forculus_decrypter.cc",
]
public_deps = [
":forculus_utils",
"$cobalt_root/src/lib/crypto_util",
"$cobalt_root/src/pb",
"$cobalt_root/src/registry:cobalt_registry_proto",
]
configs += [ "$cobalt_root:cobalt_config" ]
}
test("forculus_tests") {
testonly = true
sources = [
"field_element_test.cc",
"forculus_analyzer_test.cc",
"forculus_decrypter_test.cc",
"forculus_encrypter_test.cc",
"polynomial_computation_test.cc",
]
deps = [
":forculus_analyzer",
":forculus_encrypter",
"$cobalt_root/src:logging",
"//third_party/gflags",
"//third_party/googletest:gtest",
]
configs += [ "$cobalt_root:cobalt_config" ]
}
test("forculus_performance_test") {
testonly = true
if (!is_fuchsia_tree) {
output_dir = "$root_out_dir/tests/perf"
}
sources = [
"forculus_performance_test.cc",
]
deps = [
":forculus_analyzer",
":forculus_encrypter",
"//third_party/gflags",
"//third_party/googletest:gtest",
]
configs += [ "$cobalt_root:cobalt_config" ]
}
group("tests") {
testonly = true
deps = [
":forculus_performance_test",
":forculus_tests",
]
}