• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2020 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")
16
17config("include_path") {
18  include_dirs = [ target_gen_dir ]
19}
20
21action("configs") {
22  testonly = true
23
24  sources = [
25    "backfills.cfg",
26    "bursts.cfg",
27    "heavy.cfg",
28    "simple.cfg",
29    "stalls.cfg",
30    "xxl_packets.cfg",
31  ]
32
33  protoc_target = "../../../gn:protoc($host_toolchain)"
34  protoc_out_dir = get_label_info(protoc_target, "root_out_dir")
35  protoc_rel_dir = rebase_path(protoc_out_dir, root_build_dir)
36  out_header = "$target_gen_dir/stress_test_config_blobs.h"
37  out_header_rel = rebase_path(out_header, root_build_dir)
38  protoc_ext = ""
39  if (host_os == "win") {
40    protoc_ext = ".exe"
41  }
42
43  deps = [ protoc_target ]
44  script = "../gen_configs_blob.py"
45  outputs = [ out_header ]
46  args = [
47    "--protoc=$protoc_rel_dir/protoc${protoc_ext}",
48    "--out=$out_header_rel",
49  ]
50  foreach(source, sources) {
51    args += [ rebase_path(source, root_build_dir) ]
52  }
53  public_configs = [ ":include_path" ]
54}
55