2019-11-09 03:40:39 +01:00
|
|
|
// Copyright (C) 2019 The Android Open Source Project
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
|
2021-02-13 06:42:54 +01:00
|
|
|
package {
|
|
|
|
// See: http://go/android-license-faq
|
2022-01-25 00:21:32 +01:00
|
|
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
2021-02-13 06:42:54 +01:00
|
|
|
}
|
|
|
|
|
2019-11-09 03:40:39 +01:00
|
|
|
python_binary_host {
|
2023-10-13 04:51:08 +02:00
|
|
|
name: "generate-self-extracting-archive",
|
|
|
|
srcs: ["generate-self-extracting-archive.py"],
|
2019-11-09 03:40:39 +01:00
|
|
|
}
|
2020-05-20 11:33:43 +02:00
|
|
|
|
|
|
|
python_binary_host {
|
2023-10-13 04:51:08 +02:00
|
|
|
name: "post_process_props",
|
|
|
|
srcs: ["post_process_props.py"],
|
2020-05-20 11:33:43 +02:00
|
|
|
}
|
Support optional prop assignments
This CL adds a number of changes to make the assignment of system
properties to be less confusing.
1. Added `a ?= b` syntax, which is called optional prop assignments. The
prop `a` gets the value `b` only when there is no non-optional prop
assignment for `a` such as `a = c`. This is useful for props that
provide some reasonable default values as fallback.
2. With the introduction of the optional prop assignment syntax,
duplicated non-optional assignments is prohibited; e.g., the follwing
now triggers a build-time error:
a = b
a = c
, but the following doesn't:
a ?= b
a = c
Note that the textual order between the optional and non-optional
assignments doesn't matter. The non-optional assignment eclipses the
optional assignment even when the former appears 'before' the latter.
a = c
a ?= b
In the above, `a` gets the value `c`
When there are multiple optional assignments without a non-optional
assignments as shown below, the last one wins:
a ?= b
a ?= c
`a` becomes `c`. Specifically, the former assignment is commented out
and the latter is converted to a non-optional assignment.
3. post_process_props.py is modified so that when a prop assignment is
deleted, changed, or added, the changes are recorded as comments. This
is to aid debugging. Previously, it was often difficult to find out why
a certain sysprop assignment is missing or is added.
4. post_process_prop.py now has a unittest
Bug: 117892318
Bug: 158735147
Test: atest --host post_process_prop_unittest
Exempt-From-Owner-Approval: cherry-pick from master
Merged-In: I9c073a21c8257987cf2378012cadaeeeb698a4fb
(cherry picked from commit 7aeb8de74e08eb2d305686aa8eff45353973e7d7)
Change-Id: I9c073a21c8257987cf2378012cadaeeeb698a4fb
2020-06-22 10:30:57 +02:00
|
|
|
|
|
|
|
python_test_host {
|
2023-10-13 04:51:08 +02:00
|
|
|
name: "post_process_props_unittest",
|
|
|
|
main: "test_post_process_props.py",
|
|
|
|
srcs: [
|
|
|
|
"post_process_props.py",
|
|
|
|
"test_post_process_props.py",
|
|
|
|
],
|
|
|
|
test_config: "post_process_props_unittest.xml",
|
|
|
|
test_suites: ["general-tests"],
|
Support optional prop assignments
This CL adds a number of changes to make the assignment of system
properties to be less confusing.
1. Added `a ?= b` syntax, which is called optional prop assignments. The
prop `a` gets the value `b` only when there is no non-optional prop
assignment for `a` such as `a = c`. This is useful for props that
provide some reasonable default values as fallback.
2. With the introduction of the optional prop assignment syntax,
duplicated non-optional assignments is prohibited; e.g., the follwing
now triggers a build-time error:
a = b
a = c
, but the following doesn't:
a ?= b
a = c
Note that the textual order between the optional and non-optional
assignments doesn't matter. The non-optional assignment eclipses the
optional assignment even when the former appears 'before' the latter.
a = c
a ?= b
In the above, `a` gets the value `c`
When there are multiple optional assignments without a non-optional
assignments as shown below, the last one wins:
a ?= b
a ?= c
`a` becomes `c`. Specifically, the former assignment is commented out
and the latter is converted to a non-optional assignment.
3. post_process_props.py is modified so that when a prop assignment is
deleted, changed, or added, the changes are recorded as comments. This
is to aid debugging. Previously, it was often difficult to find out why
a certain sysprop assignment is missing or is added.
4. post_process_prop.py now has a unittest
Bug: 117892318
Bug: 158735147
Test: atest --host post_process_prop_unittest
Exempt-From-Owner-Approval: cherry-pick from master
Merged-In: I9c073a21c8257987cf2378012cadaeeeb698a4fb
(cherry picked from commit 7aeb8de74e08eb2d305686aa8eff45353973e7d7)
Change-Id: I9c073a21c8257987cf2378012cadaeeeb698a4fb
2020-06-22 10:30:57 +02:00
|
|
|
}
|
2020-07-28 03:49:41 +02:00
|
|
|
|
|
|
|
python_binary_host {
|
2023-10-13 04:51:08 +02:00
|
|
|
name: "extract_kernel",
|
|
|
|
srcs: ["extract_kernel.py"],
|
2020-07-28 03:49:41 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
genrule_defaults {
|
2023-10-13 04:51:08 +02:00
|
|
|
name: "extract_kernel_release_defaults",
|
|
|
|
tools: ["extract_kernel", "lz4"],
|
|
|
|
out: ["kernel_release.txt"],
|
|
|
|
cmd: "$(location) --tools lz4:$(location lz4) --input $(in) --output-release > $(out)"
|
2020-07-28 03:49:41 +02:00
|
|
|
}
|
2022-06-23 01:24:47 +02:00
|
|
|
|
|
|
|
cc_binary_host {
|
2023-10-13 04:51:08 +02:00
|
|
|
name: "build-runfiles",
|
|
|
|
srcs: ["build-runfiles.cc"],
|
2022-06-23 01:24:47 +02:00
|
|
|
}
|
2022-10-23 03:13:50 +02:00
|
|
|
|
|
|
|
python_binary_host {
|
2023-10-13 04:51:08 +02:00
|
|
|
name: "check_radio_versions",
|
|
|
|
srcs: ["check_radio_versions.py"],
|
2022-10-23 03:13:50 +02:00
|
|
|
}
|
2022-10-27 02:44:24 +02:00
|
|
|
|
|
|
|
python_binary_host {
|
2023-10-13 04:51:08 +02:00
|
|
|
name: "check_elf_file",
|
|
|
|
srcs: ["check_elf_file.py"],
|
2022-10-27 02:44:24 +02:00
|
|
|
}
|
2022-11-30 11:06:20 +01:00
|
|
|
|
|
|
|
python_binary_host {
|
2023-10-13 04:51:08 +02:00
|
|
|
name: "generate_gts_shared_report",
|
|
|
|
srcs: ["generate_gts_shared_report.py"],
|
2022-11-30 11:06:20 +01:00
|
|
|
}
|
2023-01-05 02:13:47 +01:00
|
|
|
|
2023-03-30 23:48:05 +02:00
|
|
|
python_binary_host {
|
|
|
|
name: "list_files",
|
|
|
|
main: "list_files.py",
|
|
|
|
srcs: [
|
|
|
|
"list_files.py",
|
|
|
|
],
|
2023-04-06 00:30:27 +02:00
|
|
|
version: {
|
2023-10-13 04:51:08 +02:00
|
|
|
py3: {
|
|
|
|
embedded_launcher: true,
|
|
|
|
}
|
|
|
|
}
|
2023-03-30 23:48:05 +02:00
|
|
|
}
|
2023-09-18 09:19:11 +02:00
|
|
|
|
|
|
|
python_test_host {
|
|
|
|
name: "auto_gen_test_config_test",
|
|
|
|
main: "auto_gen_test_config_test.py",
|
|
|
|
srcs: [
|
|
|
|
"auto_gen_test_config.py",
|
|
|
|
"auto_gen_test_config_test.py",
|
|
|
|
],
|
|
|
|
auto_gen_config: true,
|
|
|
|
test_suites: ["general-tests"],
|
|
|
|
test_options: {
|
|
|
|
unit_test: true,
|
|
|
|
},
|
|
|
|
}
|
2023-11-07 05:36:59 +01:00
|
|
|
|
|
|
|
python_binary_host {
|
|
|
|
name: "characteristics_rro_generator",
|
|
|
|
srcs: ["characteristics_rro_generator.py"],
|
|
|
|
version: {
|
|
|
|
py3: {
|
|
|
|
embedded_launcher: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|