I call "compinit -i" in my .zshrc, to allow loading autocompletion from
"unsafe" locations. envsetup.sh breaks that. Change behavior to only
call compinit if bash-style completion is not already enabled.
This is a minimal fix; an alternative would be to rely on the user
to call 'bashcompinit' in their .zshrc instead, and just skip all
autocomplete functionality if they don't.
Test: manual - source ./envsetup.sh in {bash, zsh, zsh -f} and test
completion for lunch
Change-Id: Ibb10eb68a96d69c19b9db9b21e0546fe8ae299b2
Only enforce whitelist entries are unused if the enforcement variable
is set to "true" or "strict". If set to something else (e.g. "relaxed"),
allow redundant whitelist entries.
This also enables adding wildcard entries, which were previously
considered unused.
Test: downstream
Bug: 117637311
Bug: 80410283
Change-Id: I67a84f8ecfad5fa68c21ee728f1e3085ef89fbcf
common.RunAndCheckOutput() checks the exit code and will raise on errors.
Test: python -m unittest test_ota_from_target_files
Test: Call ota_from_target_files.py with aosp_marlin target_files zip
Test: Inject an error to the command. Repeat the call without verbose
flag. It dumps the stack trace on error.
Change-Id: I85b765a33b9087bcbcb0571d6e632a07bb86c65c
This prepares for upcoming changes that refactor verity-related
functions into classes.
This CL makes minimal changes to the moved functions, by creating a new
BuildVerityImageError class in verity_utils.py replacing the former
BuildImageError that's specific to build_image.py. As part of the
change, it also moves the tests for AVBCalcMinPartitionSize into
test_verity_utils.py.
Test: python -m unittest test_verity_utils
Test: `m dist` with aosp_marlin-userdebug (Verified Boot 1.0)
Test: `m dist` with aosp_taimen-userdebug (Verified Boot 2.0)
Change-Id: I19b52714d8980705ea1f9484ac03eb0af9483240
This avoids building errors in branches that don't include such projects
(e.g. external/avb or system/update_engine). Note that although it
won't actually build otatools in such branches, it fails while parsing
the Makefile.
Bug: 112293933
Test: Rename external/avb. `m otatools` passes.
Change-Id: I334239fb23b1795ec77049ba9b81b288d2b4e2da
Fixes a bug where system_other/ paths are considered part of
the "system" path.
Test: lunch mainline_arm64; m nothing
Change-Id: Id7aad41ea285f545260289f59e55c251677bdc38
otatools.zip is required to sign GSI.
Bug: 112293933
Test: lunch aosp_arm64-userdebug && make otatools-package
Test: lunch aosp_arm64-userdebug && make otapackage will fail
Change-Id: Iae9f9af5cc8b98c05a66219779ce35592d3321bd
All the releasetools unittests extend the common base class of
test_utils.ReleaseToolsTestCase. Define tearDown() in the base class to
do the clean-up works.
Test: `pylint --rcfile=pylintrc test_*.py`
Test: `python -m unittest discover .`
Change-Id: I51775d964ef032dcdf3bb89c55e1a31371cde708
Scudo is now compatible with the -fsanitize-minimal-runtime, and offers a new
dynamic library that doesn't bundle UBSan.
This patch adds support for this new library in make, preferring it over the
full one, unless a diagnostic dependency is found.
Test: aosp compiled with m -j
Test: local test enabling Scudo for mediaextractor
Change-Id: I99ac0d410b1619de09783f5009476c1ea2995f98
There's a naming convention between the testcase and the class/method
being tested.
Also remove VerifiedBootVersion2HashtreeInfoGenerator as it's merely a
placeholder without telling anything much (e.g. whether it's to be
implemented or working as intended).
Test: python -m unittest test_verity_utils
Change-Id: Ieb156765c865aa551e3882f381e3a6db2cac4cbc
This commit adds LOCAL_ADDITIONAL_DEPENDENCIES to soong_cc_prebuilt.mk
so that ABI dump and diff files can be generated and checked.
Test: make -j && find out -name '*.abidiff'
Change-Id: If12ec9a321f42efe4f8dc938568e8911400cc053
When LOCAL_SANITIZE := never is given for an executable, skip
building the binary in the ASAN build stage.
Bug: 117579123
Test: Build ASAN image with a never-sanitized executable
Change-Id: I6495fc857678ca9b46527c7d60ee71112004266d
build_image.RunCommand and common.Run are essentially doing the same
work, but with different interfaces and return values. This CL
consolidates them by moving build_image.RunCommand into common.py as
common.RunAndCheckOutput, with the former calling common.Run internally.
common.RunAndCheckOutput checks the exit code: it returns the output
string on success, or raises common.ExternalError otherwise.
Test: `m dist` with aosp_marlin-userdebug
Test: python -m unittest test_build_image
Test: python -m unittest test_common
Change-Id: I3cd0e9301c576572194618eba8dc00db06c3c35f
Add ANS to telephony systems
Bug: 114793357
Test: verified it using developer options
Change-Id: Id31be8524934b47345ba95954636822eb59264ac
Merged-In: Id31be8524934b47345ba95954636822eb59264ac
Most of the 6 nested conditionals are independent and can be
evaluated individually. This has a slight change in behavior,
disabling preopt for a module in the product will now override
LOCAL_DEX_PREOPT, but that seems preferable.
Test: m
Change-Id: I6a4060a78df729c34bbf6978c84993859a947bf7
When "PRODUCT_DEX_PREOPT_GENERATE_DM_FILES := true" and
"PRODUCT_DEX_PREOPT_DEFAULT_COMPILER_FILTER := verify" are set,
boot jar may wrongly refer to previous module's variables such as
my_generate_dm, my_built_dm and my_installed_dm. And then cause
unexpected files installed along with this boot jar.
So initialize my_generate_dm to empty at first.
Bug: 117526952
Test: make out/target/product/generic/module-info.json
Test: cat out/target/product/generic/module-info.json | grep '"apache-xml":'
Change-Id: Iaa851f4fb530b3446de3dbcb1f54e545938830ce
This reverts commit 039bb48f72.
This is no longer needed. Depending on the setting of REMOVE_OAHL_FROM_BCP the org.apache.http.legacy library is now either on the bootclasspath or a standalone library, it cannot be both.
Bug: 18027885
Bug: 72167111
Change-Id: I88eb24f8a4324e206fd384cd8adf79acd6fc0858
Merged-In: I88eb24f8a4324e206fd384cd8adf79acd6fc0858
Test: make with and without REMOVE_OAHL_FROM_BCP=true
(cherry picked from commit 9390268746)
If an APK specifies LOCAL_PREBUILT_JNI_LIBS embedded in the prebuilt
APK, remove any that aren't listed. Restores the behavior from before
I82dd3aa441712772a1d1ddd6aaf5f41179facaa7.
Bug: 69500920
Test: m checkbuild
Change-Id: I971a9c4206604c172d77144df4c0ed9a8b1c5dd0