• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1load("@//build/bazel/product_config:android_product.bzl", "android_product")
2load("@//build/bazel/tests/products:aosp_arm.variables.bzl", _soong_variables_arm = "variables")
3load("@//build/bazel/tests/products:aosp_arm64.variables.bzl", _soong_variables_arm64 = "variables")
4load("@//build/bazel/tests/products:aosp_x86.variables.bzl", _soong_variables_x86 = "variables")
5load("@//build/bazel/tests/products:aosp_x86_64.variables.bzl", _soong_variables_x86_64 = "variables")
6load("@bazel_skylib//lib:dicts.bzl", "dicts")
7
8package(default_visibility = [
9    "@//build/bazel/product_config:__subpackages__",
10])
11
12# This package contains pregenerated soong.variables files for the aosp_<arch> products, used to
13# make platforms for testing. This is an optimization, we could generate these directly from source
14# at build time but it would add time to every `m nothing`. Converting the product config makefiles
15# to starlark and checking them in would also solve this performance issue.
16#
17# This is also where we can define platforms that have set product config variables to certain
18# values for testing. Unfortunately we cannot just transition on a single product config variable
19# due to limitations in bazel.
20
21android_product(
22    name = "aosp_arm_for_testing",
23    soong_variables = _soong_variables_arm,
24)
25
26android_product(
27    name = "aosp_arm_for_testing_custom_linker_alignment",
28    soong_variables = dicts.add(
29        _soong_variables_arm,
30        {"DeviceMaxPageSizeSupported": "65536"},
31    ),
32)
33
34android_product(
35    name = "aosp_arm64_for_testing",
36    soong_variables = _soong_variables_arm64,
37)
38
39android_product(
40    name = "aosp_arm64_for_testing_no_compression",
41    soong_variables = dicts.add(
42        _soong_variables_arm64,
43        {"CompressedApex": False},
44    ),
45)
46
47android_product(
48    name = "aosp_arm64_for_testing_unbundled_build",
49    soong_variables = dicts.add(
50        _soong_variables_arm64,
51        {"Unbundled_build": True},
52    ),
53)
54
55android_product(
56    name = "aosp_arm64_for_testing_with_overrides_and_app_cert",
57    soong_variables = dicts.add(
58        _soong_variables_arm64,
59        {
60            "ManifestPackageNameOverrides": [
61                "apex_certificate_label_with_overrides:another",
62                "package_name_override_from_config:another.package",
63            ],
64            "CertificateOverrides": [
65                "apex_certificate_label_with_overrides:another.certificate",
66            ],
67            "DefaultAppCertificate": "build/bazel/rules/apex/testdata/devkey",
68        },
69    ),
70)
71
72android_product(
73    name = "aosp_arm64_for_testing_custom_linker_alignment",
74    soong_variables = dicts.add(
75        _soong_variables_arm64,
76        {"DeviceMaxPageSizeSupported": "16384"},
77    ),
78)
79
80android_product(
81    name = "aosp_x86_for_testing",
82    soong_variables = _soong_variables_x86,
83)
84
85android_product(
86    name = "aosp_x86_64_for_testing",
87    soong_variables = _soong_variables_x86_64,
88)
89