aosp/3019827 does not handle the case where integration_tests might be
run from an unlunched-terminal. In this scenario, the ninja file will be
generated at out/soong/build.ninja.
To support running integration tests with/without lunch as well for
consistency of tests across different setups (users/CI etc.), pin the
TARGET_PRODUCT to a default value (aosp_arm for now)
Test: build/soong/tests/run_integration_tests.sh without running lunch
Change-Id: I1197923867643986ed3736cfc284632aa82dca13
This script runs some useful integration tests, but is currently broken
at ToT. This CL enables us to rerun this script successfully.
Details
1. Remove the scripts related to bp2build/b/mixed_builds. These modes
have been/are on the verge of deletion from soong
2. Remove the comparisision scripts for soong and bazel built artifcats,
for the same reason
3. Add a TARGET_RELEASE to androidmk_test.sh
4. Add a TARGET_PRODUCT to o/s/build.ninja, since the generated .ninja files
now have a product-specific suffix.
5. Remove a test that checks that globs are not generated in the first
clean run. We always generate the glob file now (aosp/2893286)
Test: build/soong/tests/run_integration_tests.sh
Change-Id: I39f6706ab2a81a7b1b2e90d43195bc3e2c7a5c08
Do the sandboxed and non-sandboxed builds in two separate directories.
This allows us to keep the directories around so you can compare diffs
afterwards, and allows us to run the builds in parallel. It also means
that analysis isn't rerun twice every time you run the script.
Bug: 307824623
Test: Using it for the past few genrules I've fixed
Change-Id: Ib3be394f233b383c1bba41d31ada6c9af94e755b
Revert submission 2794133-revert-2782270-genrule_sandboxing_by_default-JMQJWWORHR
Reason for revert: Reapplying now that ag/25093969 and ag/25107100 are in
Reverted changes: /q/submissionid:2794133-revert-2782270-genrule_sandboxing_by_default-JMQJWWORHR
Change-Id: Ibb7dd6a0f925d043ab8df2f79cbcb9d30c3be458
Revert submission 2782270-genrule_sandboxing_by_default
Reason for revert: Potential culprit for b/305851039 and many other build breakages - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Reverted changes: /q/submissionid:2782270-genrule_sandboxing_by_default
Change-Id: I7b47a92e1b315add65c8018500d9ffbd58f8f1dd
This reverts commit aa5cc2cd6a.
Reason for revert: Fixed the bug in the original draft.
There was an error in how we compared the file's MTime to the
file's contents.
Bug: 300288299
Test: presubmits
Test: build/soong/tests/run_integration_tests.sh
Change-Id: I9e53432c0842c0b9fc13fe20d30ce9af37640c7f
When TOP dir changes and we reuse the same output between the old and new checkouts, we need to rewrite all the symlinks used by Bazel and other tools in the out-directory to point to the new top directory. Otherwise, if the old source dir is deleted, the build will fail.
I used the OUT_DIR/soong/soong.environment.available file to find out the previous PWD.
Tested:
1. Create source dir 1, run build, create source dir 2, remote source dir 1, reuse out dir and rerun build => build succeeded with this change.
2. m libc after moving build TOP. Only the analysis phase was rerun, the actual build was not rerun.
Bug: b/300498226
Change-Id: I196625baa1f4efe7a4734accfa1f0be7c98a7920
Also remove existing symlink_forest_version functionality.
This remedies issues pertaining to b/300122962 - symlinks not
clearing after a revert
Timing wise - this doesn't present a performance regression
on a clean build. When soong_build changes, it's considerably longer
but no different from the time when symlink_forest_version is changed.
Bug: 300288299
Test: build/soong/tests/symlink_forest_rerun_test.sh
Change-Id: I0e95aac315dfea7ea3b8bb9a3eb0c6408300bd3b
Also add script to remove the Bazel output base.
This will assist with supporting movable checkouts alongside
mixed builds.
Bug: 259191764
Test: m && (move topic and prepare_moved_top.sh) && m
Test: m && prepare_moved_top.sh && m
Test: build/soong/tests/relative_symlinks_test.sh
Change-Id: I0f53da8d99f752fad496cf3ac61b01f001b7296d
This feature is obsolete.
This makes a large number of codepaths "dead code" (such as
module-specific implementations of ApiBp2build functionality). These
will be deleted in a followup CL.
Bug: 284029211
Test: Presubmits
Change-Id: Ib53b99f1fe8c24380d219caf44e9bb3b96724fa0
aosp/2709668 registers Bazel repos using these directories so we need to symlink them for soong integration tests to pass.
Test: build/soong/tests/bp2build_bazel_test.sh
Change-Id: I8ee7e5c702bd0bfa24eb3778371f497a67bf815a
This fixes breakage currently on CI.
Bug: 296628826
Test: build/soong/tests/bp2build_bazel_test.sh
Change-Id: Ibfcd2bc5d2b107879281075ab994f1e9a8f5da0e
Also explicitely ignore some diffs that were ignored because of "-I /bin".
Bug: 272358980
Test: build/soong/tests/sbom_test.sh
Change-Id: I8a19fdaa89c9f6b4a11c107df98bca647323db26
The test case calculates package verification code of package product according to the SPDX spec and compare it to the one in SBOM file which should have the same SHA1 hash value. This helps verify the python logic of generating it in SBOM files.
Bug: 293304694
Test: build/soong/tests/sbom_test.sh
Change-Id: I37c96d90a1990fbeb786f1bd4e8dc87102e0f0cd
So that things can be allowlisted that aren't in all branches, or
that aren't present in tests.
Then remove the example partition from the soong integration tests
so that we don't need to pull all of the tools needed to build
partitions into that test.
Bug: 265127181
Fixes: 294220392
Test: ./build/soong/tests/run_integration_tests.sh and m bazel_sandwich
Change-Id: I66fb1ad1c2eee815bfb9700595a26e74e54c6214
rbc_dashboard.py is an alternative implementation of
rbc_regression_test.sh. These tests both run soong 2 times with
starlark product config enabled/disabled and diff the resulting ninja
files. However, the shell script test runs the soong invications in
series and the python one runs them in parallel, meaning the python
one is faster. On my computer the shell one takes ~7 minutes and the
python one takes ~4 minutes.
Bug: 291548757
Test: Presubmits
Change-Id: I20fd6ca09f47dd0547f2681fbd78ba70991493b0
product SBOM of cuttlefish devices, ignore these diffs for now in the
SBOM integration test to fix the CI breakage.
Bug: 291073898
Test: build/soong/tests/sbom_test.sh
Change-Id: Idf5569f67642784ee422847301c59dddc8ff0907
In preparation for adding the ability to check all genrules in the tree.
Bug: 290816499
Test: ./build/soong/tests/genrule_sandbox_test.py extensions_db.pb
Change-Id: I6454be7e88a876a2ab1105c04f5ecda03ecd7771