blob: 6a12a09e6734f8c01900cd00cf57339de629c232 [file] [log] [blame]
Primiano Tucciff68cac2020-08-06 18:13:17 +02001# 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
39 deps = [ protoc_target ]
40 script = "../gen_configs_blob.py"
41 outputs = [ out_header ]
42 args = [
43 "--protoc=$protoc_rel_dir/protoc",
44 "--out=$out_header_rel",
45 ]
46 foreach(source, sources) {
47 args += [ rebase_path(source, root_build_dir) ]
48 }
49 public_configs = [ ":include_path" ]
50}