naiveproxy/tools/traffic_annotation/auditor/BUILD.gn

123 lines
3.5 KiB
Plaintext
Raw Normal View History

2018-01-28 19:30:36 +03:00
# Copyright 2016 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")
import("//third_party/protobuf/proto_library.gni")
# Works only on desktop platforms.
assert(is_win || is_linux || is_mac)
proto_library("chrome_settings_full_runtime") {
proto_out_dir = "/tools/traffic_annotation"
cc_include = "components/policy/proto/policy_proto_export.h"
sources = [
"$root_gen_dir" +
"/components/policy/proto/cloud_policy_full_runtime.proto",
"$root_gen_dir" +
"/components/policy/proto/chrome_settings_full_runtime.proto",
]
use_protobuf_full = true
deps = [
"//components/policy:full_runtime_code_generate",
"//third_party/protobuf:protobuf_full",
]
}
proto_library("traffic_annotation") {
sources = [
"../traffic_annotation.proto",
]
import_dirs = [ "$root_gen_dir" + "/components/policy/proto" ]
deps = [
":chrome_settings_full_runtime",
]
use_protobuf_full = true
}
source_set("auditor_sources") {
sources = [
"../../../net/traffic_annotation/network_traffic_annotation.h",
"../../../net/traffic_annotation/network_traffic_annotation_test_helper.h",
"auditor_result.cc",
"auditor_result.h",
"instance.cc",
"instance.h",
"traffic_annotation_auditor.cc",
"traffic_annotation_auditor.h",
"traffic_annotation_exporter.cc",
"traffic_annotation_exporter.h",
"traffic_annotation_file_filter.cc",
"traffic_annotation_file_filter.h",
]
data = [
"safe_list.txt",
]
public_deps = [
":traffic_annotation",
"//base",
"//net:traffic_annotation",
"//third_party/libxml",
"//third_party/protobuf:protobuf_full",
]
}
executable("traffic_annotation_auditor") {
sources = [
"traffic_annotation_auditor_ui.cc",
]
deps = [
":auditor_sources",
]
}
test("traffic_annotation_auditor_unittests") {
sources = [
"traffic_annotation_auditor_unittest.cc",
]
data = [
"tests/extractor_outputs/bad_assignment1.txt",
"tests/extractor_outputs/bad_assignment2.txt",
"tests/extractor_outputs/bad_call.txt",
"tests/extractor_outputs/bad_syntax_annotation1.txt",
"tests/extractor_outputs/bad_syntax_annotation2.txt",
"tests/extractor_outputs/bad_syntax_annotation3.txt",
"tests/extractor_outputs/bad_syntax_annotation4.txt",
"tests/extractor_outputs/fatal_annotation1.txt",
"tests/extractor_outputs/fatal_annotation2.txt",
"tests/extractor_outputs/fatal_annotation3.txt",
"tests/extractor_outputs/good_assignment.txt",
"tests/extractor_outputs/good_branched_completing_annotation.txt",
"tests/extractor_outputs/good_call.txt",
"tests/extractor_outputs/good_complete_annotation.txt",
"tests/extractor_outputs/good_completing_annotation.txt",
"tests/extractor_outputs/good_partial_annotation.txt",
"tests/extractor_outputs/good_test_annotation.txt",
"tests/extractor_outputs/missing_annotation.txt",
"tests/extractor_outputs/no_annotation.txt",
"tests/git_list.txt",
"tests/gn_list_negative.txt",
"tests/gn_list_positive.txt",
"tests/irrelevant_file_content.cc",
"tests/irrelevant_file_content.mm",
"tests/irrelevant_file_name.txt",
"tests/relevant_file_name_and_content.cc",
"tests/relevant_file_name_and_content.mm",
]
deps = [
":auditor_sources",
"//base/test:run_all_unittests",
"//base/test:test_support",
"//testing/gmock",
"//testing/gtest",
]
}