* changes:
Migrate etc package to a per test build directory
Migrate genrule package to a per test build directory
Use test specific build dir when needed
These tests rely on files provided by javaMockFS() so have been
converted to test fixtures to allow them to remove that dependency
which will allow javaMockFS() to be removed.
Bug: 182638834
Test: m nothing
Change-Id: Ifd4069a74fcf67e555f998ddbc4de3fde26b2aae
These tests rely on files provided by javaMockFS() so need to are being
converted to test fixtures to allow them to remove that dependency
which will allow javaMockFS() to be removed.
Bug: 182638834
Test: m nothing
Change-Id: If736b95d134fe73c0a0ccd438ec31e93568fb929
If a FixtureFactory was created with a nil buildDirSupplier then this
change will cause it to create a test specific directory instead. This
will allow packages whose tests have been fully converted to the test
fixture model to remove the need for the package level buildDir
variable.
Bug: 182885307
Test: m nothing
Change-Id: Ifa70acadbd90356fadbe39675bac3214d925aa2f
The existing NormalizePathForTesting function does not handle make
install paths very well, as it returns a relative path with a leading
"../" which is very confusing. It also does not clearly differentiate
between the different paths.
These functions return paths that are basically what are seen in a
normal developer build, i.e.
* <source path>
* out/soong/<soong output path>
* out/<make output path>
That makes tests that use them easier to understand.
Follow up changes will clean up the existing usages of the
Normalize... functions.
Bug: 182885307
Test: m nothing
Change-Id: I17ddc996bef5bbbf4a62da8334ea6ce29e306109
The end goal of this exercise is to remove all mutable global state so
that multiple Blueprint instances can be run in the same process.
Test: Presubmit.
Change-Id: Idb34b0920f2c7d92efb9328ce8a78b7306f89571
The module type is to create vbmeta image out of other partitions.
Bug: 180676957
Test: m microdroid_vbmeta microdroid_vbmeta_system
Inspect the built image using `avbtool info_image --image <image>`
Change-Id: Iac92e9ab1640dcd488af69842e09850a91262bf1
Fix the shadowed err variable so that it is visible to the defer
function that removes the partial zip file on error.
Bug: 182761771
Test: manual
Change-Id: Ia67ac4bca5ef0107466edf25a76c74d70c243d3f
As this test is the only test in the apex package to use the
platform_compat_config module type it does not make sense to include
that in all the tests so instead this converts the test to use fixtures
so it can easily customize it with the additional module type.
Bug: 181070625
Test: m nothing
Change-Id: I56fda772ee336db6cfb677143aa28b1a18911bff
Adds general support for generating a set of prebuilt apis for a set of
releases and modules. Plus some wrappers for common use cases.
This temporarily will delete any existing conflicting files and replace
them so that it can be used in tests without first removing
javaMockFS(). The future update that removes javaMockFS() will also
remove that workaround.
Bug: 182638834
Test: m nothing
Change-Id: If4e2118f2384b9866cf3f85a5afec1e2e4f9ac95
If both bp2build_available and label are specified, label will be
preferred.
Initially, we copy the entire BUILD.bazel file. Eventually we may move
this to use bazel query for a more accurate result.
Test: go test *
Test: build/bazel/scripts/milestone-2/demo.sh full
Test: GENERATE_BAZEL_FILES=true m nothing
edit bionic/libc/tools/BUILD.bazel
GENERATE_BAZEL_FILES=true m nothing and verify changes picked up
Bug: 180516554
Change-Id: I43025583300e6b10d2c18032cd4a76237b578d59
Previously, bootimg signed the image using avbtool. This didn't work
because avbtool always requires that the partition size is given via
'--partition_size' parameter. The partition size is hard to estimate
especially when the image is not for a real physical partition, but for
a logical partition in a composite image.
With this change, the signing of bootimg is done by verity_utils.py
which internally uses avbtool. The python script is capable of
calculating the minimum required partition size when the partition size
is not given.
In addition, this change adds 'partition_name' property to the
`android_filesystem` module type so that we can customize the partition
name field in the vbmeta descriptor.
Bug: 180676957
Test: m microdroid-boot-5.10
Change-Id: I2e4aa626cf06a2177b4a8d90ff9b9006d2927ae4
Previously there were two different scripts that did similar things:
1) build/soong/scripts/manifest_check.py
2) build/make/core/verify_uses_libraries.sh
Both scripts extracted <uses-library> tags and `targetSdkVersion` from
the manifests of Java modules, but 1) worked for XML manifests, and 2)
worked for APKs. This CL reimplements the functionality from 2) in 1),
so that one script can handle both XML manifests and APKs.
Bug: 132357300
Test: lunch cf_x86_64_phone-userdebug && m && launch_cvd \
adb wait-for-device && adb root && adb logcat \
| grep -E 'ClassLoaderContext [a-z ]+ mismatch'
# empty grep output, no errors
Change-Id: Id1b66e4f3f30f307dba70cb111c7571762cb546a
__ANDROID_VNDK__ is defined for the modules that are able to use the
VNDK libraries. As both product and vendor variants define
__ANDROID_VNDK__, we don't know if a module is built for vendor or
product on build time.
__ANDROID_VENDOR__ and __ANDROID_PRODUCT__ macros can be used to
specify the image-variant-dependent codes.
Bug: 180646847
Test: m nothing
Change-Id: Id6c3e1e3d47deaf3684c0c02964718658cf2fec5
This variable is required by rust-analyzer to correctly process crates
that uses the include!(concat!(env!("OUT_DIR"), ...)) pattern.
Adds an initialize method to baseCompiler to save the computed path for
this directory. It is not possible to use the BeginMutator as the
BaseModuleContext does not contain enough information to use
PathForModuleOut.
Bug: 175004835
Test: SOONG_GEN_RUST_PROJECT=1 m nothing; inspect rust-project.json
Change-Id: If47b3832d3cca5712ae87773c174a61f5ee27bf8
Previously, testAppConfig added some extra files to the mock filesystem
before passing them to testConfig. However, those files are only needed
for TestApp so this converts TestApp to use test fixtures and populates
the mock filesystem with the extra files.
Without those extra files testApp and testAppConfig are equivalent to
testJava and testConfig respectively.
Bug: 181070625
Test: m nothing
Change-Id: I1d8a51223adde5b656948725bc4bc91040533625
This change is in preparation for removing testing.T from TestResult.
Bug: 181070625
Test: m nothing
Change-Id: Iac627cc3c9f922ec4a41ce657442e4139fe7defb