xref: /aosp_15_r20/external/perfetto/src/base/http/BUILD.gn (revision 6dbdd20afdafa5e3ca9b8809fa73465d530080dc)
1# Copyright (C) 2021 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15import("../../../gn/perfetto.gni")
16import("../../../gn/perfetto_component.gni")
17import("../../../gn/test.gni")
18
19perfetto_component("http") {
20  deps = [
21    "..:base",
22    "..:unix_socket",
23    "../../../gn:default_deps",
24  ]
25  public_deps = [
26    "../../../include/perfetto/base",
27    "../../../include/perfetto/ext/base/http",
28  ]
29  sources = [
30    "http_server.cc",
31    "sha1.cc",
32  ]
33}
34
35perfetto_unittest_source_set("unittests") {
36  testonly = true
37  deps = [
38    ":http",
39    "..:test_support",
40    "../../../gn:default_deps",
41    "../../../gn:gtest_and_gmock",
42  ]
43  sources = [ "sha1_unittest.cc" ]
44
45  # The HTTP server unittests cannot be run in parallel. Chromium runs tests
46  # in parallel on some bots so exclude all of these ones.
47  if (!build_with_chromium) {
48    sources += [ "http_server_unittest.cc" ]
49  }
50}
51