gn2bp: Remove srcs from out/test
cc_library_static modules that build proto cc files directly specify
with //out/test path. But these files are generated by other genrule
modules and should be specified by the genrule name.
So, this commit removing files with //out/test path from the srcs.
Test: ./update_result.sh
Change-Id: I29373877b9d576a08596f283c0344ede86c4f278
diff --git a/tools/gn2bp/Android.bp.swp b/tools/gn2bp/Android.bp.swp
index 3a4ef7c..85c93e7 100644
--- a/tools/gn2bp/Android.bp.swp
+++ b/tools/gn2bp/Android.bp.swp
@@ -1963,9 +1963,6 @@
// GN: //net/cert:root_store_proto_full
cc_library_static {
name: "cronet_aml_net_cert_root_store_proto_full",
- srcs: [
- "out/test/clang_x64/gen/net/cert/root_store_proto_full/root_store.pb.cc",
- ],
static_libs: [
"cronet_aml_third_party_protobuf_protobuf_full",
],
@@ -2204,9 +2201,6 @@
// GN: //net:isolation_info_proto
cc_library_static {
name: "cronet_aml_net_isolation_info_proto",
- srcs: [
- "out/test/gen/net/base/isolation_info.pb.cc",
- ],
shared_libs: [
"liblog",
],
@@ -3015,7 +3009,6 @@
name: "cronet_aml_net_net_nqe_proto",
srcs: [
":cronet_aml_net_net_export_header",
- "out/test/gen/net/nqe/proto/network_id_proto.pb.cc",
],
shared_libs: [
"liblog",
@@ -3267,11 +3260,6 @@
// GN: //net/third_party/quiche:net_quic_proto
cc_library_static {
name: "cronet_aml_net_third_party_quiche_net_quic_proto",
- srcs: [
- "out/test/gen/net/third_party/quiche/src/quiche/quic/core/proto/cached_network_parameters.pb.cc",
- "out/test/gen/net/third_party/quiche/src/quiche/quic/core/proto/crypto_server_config.pb.cc",
- "out/test/gen/net/third_party/quiche/src/quiche/quic/core/proto/source_address_token.pb.cc",
- ],
shared_libs: [
"libandroid",
"liblog",
@@ -3405,7 +3393,6 @@
name: "cronet_aml_net_third_party_quiche_net_quic_test_tools_proto",
srcs: [
":cronet_aml_net_net_export_header",
- "out/test/gen/net/third_party/quiche/src/quiche/quic/test_tools/send_algorithm_test_result.pb.cc",
],
shared_libs: [
"liblog",
diff --git a/tools/gn2bp/gen_android_bp b/tools/gn2bp/gen_android_bp
index 5ff17ff..01410bb 100755
--- a/tools/gn2bp/gen_android_bp
+++ b/tools/gn2bp/gen_android_bp
@@ -1029,7 +1029,7 @@
module.srcs.update(
gn_utils.label_to_path(src)
for src in target.sources
- if is_supported_source_file(src))
+ if is_supported_source_file(src) and not src.startswith("//out/test"))
local_include_dirs_set = set()
if target.type in gn_utils.LINKER_UNIT_TYPES: