Skip to content

Commit 0c95938

Browse files
Googlera-maurice
authored andcommitted
Create C++ and Unity testapp file groups for the testapp builders.
NOTE: This CL changes a large number of files. The small but potentially dangerous change that needs to be reviewed carefully is to //depot/google3/firebase/app/client/cpp/testapp/firebase_unity_sample_package.bzl, since an error here could break a release. This was tested by running blaze query with and without exoblaze to ensure the modified macro was producing the right targets in each case. Currently the testapp builders have a runtime dependency on google3. Specifically, they need to access the testapp code. This makes running them on MacOS and especially Windows more difficult, as it's necessary to setup e.g. bagpipe to get access to google3 files. In order to remove this dependency, we can add all the testapp files as data dependencies to the testapp builder rules. This will allow the tool to be built on Linux and run on MacOS or Windows without setting up exoblaze, bagpipe, etc. In order to get all the testapp files automatically, filegroup with glob is used. Glob's ** wildcard will ignore subpackages (i.e. subdirectories with a BUILD file) so it's necessary to put the filegroup at the lowest testapp packages. e.g. analytics/firebase/client/unity/testapp/BUILD, not analytics/firebase/client/unity/BUILD. This particular directory ran into an issue caused by firebase_unity_sample_package.bzl being used in the same BUILD file. This macro uses pkg_library, which has no exoblaze implementation. Depending on the filegroup would result in this macro being evaluated, and causing a build error, if using the exoblaze runtime. To fix this, this CL turns firebase_unity_sample_package.bzl into a no-op if native.pkg_library does not exist, i.e. on exoblaze. A separate, forthcoming CL will change the testapp builders to use these filegroups. PiperOrigin-RevId: 243273444
1 parent 8163e83 commit 0c95938

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

analytics/generate_constants.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,9 @@
112112
r'\1FirebaseAnalytics.Parameter'),
113113
]
114114

115+
115116
def main(unused_argv):
116-
"""Convert the the specified Objective-C header to C++."""
117+
"""Convert the specified Objective-C header to C++."""
117118
cpp_header_basename = os.path.basename(FLAGS.cpp_header)
118119
replacements = list(DOC_STRING_LINE_REPLACEMENTS)
119120
replacements.insert(0, (r'FIR.*\.h', cpp_header_basename))

0 commit comments

Comments
 (0)