Remove --noexperimental_platform_in_output_dir
This is a followup to aosp/2606989.
This flag is not necessary now that we're using one platform name
for all of mixed builds.
Also rename current_product to mixed_builds_product so that it's clear
that that this platform should only be used for mixed builds.
In addition, make the bazelrc files point to the named products again
instead of the mixed build product so that b builds will still have
qualified outputs, but mixed builds won't.
Test: Presubmit and kernel build tools abtd run
Change-Id: I7f764cf42cd1323f4b495d1320931f59a076ac63
diff --git a/tests/bp2build_bazel_test.sh b/tests/bp2build_bazel_test.sh
index 71e6af0..7878be6 100755
--- a/tests/bp2build_bazel_test.sh
+++ b/tests/bp2build_bazel_test.sh
@@ -382,4 +382,39 @@
run_bazel build --config=android --config=api_bp2build //foo:libfoo.contribution
}
+function test_bazel_standalone_output_paths_contain_product_name {
+ setup
+ mkdir -p a
+ cat > a/Android.bp <<EOF
+cc_object {
+ name: "qq",
+ srcs: ["qq.cc"],
+ bazel_module: {
+ bp2build_available: true,
+ },
+ stl: "none",
+ system_shared_libs: [],
+}
+EOF
+
+ cat > a/qq.cc <<EOF
+#include "qq.h"
+int qq() {
+ return QQ;
+}
+EOF
+
+ cat > a/qq.h <<EOF
+#define QQ 1
+EOF
+
+ export TARGET_PRODUCT=aosp_arm; run_soong bp2build
+ local -r output=$(run_bazel cquery //a:qq --output=files --config=android --config=bp2build --config=ci)
+ if [[ ! $(echo ${output} | grep "bazel-out/aosp_arm") ]]; then
+ fail "Did not find the product name '${TARGET_PRODUCT}' in the output path. This can cause " \
+ "unnecessary rebuilds when toggling between products as bazel outputs for different products will " \
+ "clobber each other. Output paths are: \n${output}"
+ fi
+}
+
scan_and_run_tests