File: BUILD.gn

package info (click to toggle)
chromium 139.0.7258.127-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 6,122,068 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (63 lines) | stat: -rw-r--r-- 2,007 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Copyright 2024 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/clang/clang.gni")
import("//build/config/python.gni")
import("//testing/test.gni")

# Use the following import to find other suffixes as needed. The suffixes start
# with _android. Since there are only two targets here, prefer to duplicate for
# now instead of using a variable for better searchability.
# import("//tools/perf/chrome_telemetry_build/android_browser_types.gni")

python_library("generate_profile_py") {
  testonly = true
  pydeps_file = "//tools/pgo/generate_profile.pydeps"
  data = [ "//.vpython3" ]
}

template("generate_profile_test") {
  script_test(target_name) {
    script = "//tools/pgo/generate_profile.py"

    # Stream logcat from device (doesn't seem to fully work yet).
    enable_android_wrapper = true

    args = [
      # Assume that we are running this script from the output directory.
      "--builddir",
      ".",
      "--android-browser",
      invoker.browser_name,
    ]

    deps = [ ":generate_profile_py" ]

    data_deps = [
      # From performance_test_suite_template_base:
      "//chrome/test:telemetry_perf_tests${invoker.suffix}",

      # From performance_test_suite_template_android:
      "//components:components_perftests",
      "//testing:run_perf_test",
      "//third_party/dawn/src/tint/cmd/bench:bench_cmd",
    ]

    # This avoids generate_profile.py attempting to download it on demand.
    data = [ "${clang_base_path}/bin/llvm-profdata" ]
  }
}

generate_profile_test("generate_profile_android_trichrome_chrome_bundle") {
  browser_name = "android-trichrome-chrome-bundle"
  suffix = "_android_trichrome_chrome_bundle"
}

if (defined(android_app_secondary_abi)) {
  generate_profile_test(
      "generate_profile_android_trichrome_chrome_64_32_bundle") {
    browser_name = "android-trichrome-chrome-64-32-bundle"
    suffix = "_android_trichrome_chrome_64_32_bundle"
  }
}