From 6134211c2d76dc10b6239ee9568dc4aea68f800b Mon Sep 17 00:00:00 2001 From: Jingwen Chen Date: Tue, 11 Apr 2023 08:49:01 +0000 Subject: [PATCH] Revert^2 "Re-land test tzdata apex with bazel builds." fb8b1a69e9b3a57b136de5ee6cb2999223cfb42b Change-Id: Id5c0edd1cd4aacbb75a8019e0a5ada4e608fbf09 --- android/allowlists/allowlists.go | 3 +++ bp2build/conversion.go | 2 ++ bp2build/conversion_test.go | 8 ++++++++ 3 files changed, 13 insertions(+) diff --git a/android/allowlists/allowlists.go b/android/allowlists/allowlists.go index 1ece9fa7d..7f3dd2dbe 100644 --- a/android/allowlists/allowlists.go +++ b/android/allowlists/allowlists.go @@ -365,6 +365,8 @@ var ( "system/testing/gtest_extras": Bp2BuildDefaultTrueRecursively, "system/timezone/apex": Bp2BuildDefaultTrueRecursively, "system/timezone/output_data": Bp2BuildDefaultTrueRecursively, + "system/timezone/testdata": Bp2BuildDefaultTrueRecursively, + "system/timezone/testing": Bp2BuildDefaultTrueRecursively, "system/tools/aidl/build/tests_bp2build": Bp2BuildDefaultTrue, "system/tools/aidl/metadata": Bp2BuildDefaultTrue, "system/tools/hidl/metadata": Bp2BuildDefaultTrue, @@ -1471,6 +1473,7 @@ var ( // M5: tzdata launch "com.android.tzdata", "test1_com.android.tzdata", + "test3_com.android.tzdata", // M7: adbd launch "com.android.adbd", "test_com.android.adbd", diff --git a/bp2build/conversion.go b/bp2build/conversion.go index 6a39e256a..5c118760d 100644 --- a/bp2build/conversion.go +++ b/bp2build/conversion.go @@ -48,7 +48,9 @@ func soongInjectionFiles(cfg android.Config, metrics CodegenMetrics) ([]BazelFil if err != nil { panic(err) } + files = append(files, newFile("metrics", GeneratedBuildFileName, "")) // Creates a //metrics package. files = append(files, newFile("metrics", "converted_modules_path_map.json", string(convertedModulePathMap))) + files = append(files, newFile("metrics", "converted_modules_path_map.bzl", "modules = "+strings.ReplaceAll(string(convertedModulePathMap), "\\", "\\\\"))) files = append(files, newFile("product_config", "soong_config_variables.bzl", cfg.Bp2buildSoongConfigDefinitions.String())) diff --git a/bp2build/conversion_test.go b/bp2build/conversion_test.go index 8c1d2ae5b..966f6e76c 100644 --- a/bp2build/conversion_test.go +++ b/bp2build/conversion_test.go @@ -129,10 +129,18 @@ func TestCreateBazelFiles_Bp2Build_CreatesDefaultFiles(t *testing.T) { dir: "metrics", basename: "converted_modules.txt", }, + { + dir: "metrics", + basename: "BUILD.bazel", + }, { dir: "metrics", basename: "converted_modules_path_map.json", }, + { + dir: "metrics", + basename: "converted_modules_path_map.bzl", + }, { dir: "product_config", basename: "soong_config_variables.bzl",