You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
0 commit comments