Jingwen Chen | 537242c | 2022-08-24 11:53:27 +0000 | [diff] [blame] | 1 | // Copyright 2022 Google Inc. All rights reserved. |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | package bp2build |
| 16 | |
| 17 | import ( |
| 18 | "fmt" |
| 19 | "testing" |
| 20 | |
| 21 | "android/soong/android" |
| 22 | "android/soong/cc" |
| 23 | "android/soong/genrule" |
| 24 | ) |
| 25 | |
| 26 | type ccTestBp2buildTestCase struct { |
| 27 | description string |
| 28 | blueprint string |
Kevin Dagostino | 32edd1a | 2022-12-04 11:16:42 +0000 | [diff] [blame] | 29 | filesystem map[string]string |
Jingwen Chen | 537242c | 2022-08-24 11:53:27 +0000 | [diff] [blame] | 30 | targets []testBazelTarget |
| 31 | } |
| 32 | |
| 33 | func registerCcTestModuleTypes(ctx android.RegistrationContext) { |
| 34 | cc.RegisterCCBuildComponents(ctx) |
| 35 | ctx.RegisterModuleType("cc_binary", cc.BinaryFactory) |
| 36 | ctx.RegisterModuleType("cc_library_static", cc.LibraryStaticFactory) |
| 37 | ctx.RegisterModuleType("cc_library", cc.LibraryFactory) |
| 38 | ctx.RegisterModuleType("cc_test_library", cc.TestLibraryFactory) |
| 39 | ctx.RegisterModuleType("genrule", genrule.GenRuleFactory) |
| 40 | } |
| 41 | |
| 42 | func runCcTestTestCase(t *testing.T, testCase ccTestBp2buildTestCase) { |
| 43 | t.Helper() |
| 44 | moduleTypeUnderTest := "cc_test" |
Jingwen Chen | 537242c | 2022-08-24 11:53:27 +0000 | [diff] [blame] | 45 | description := fmt.Sprintf("%s %s", moduleTypeUnderTest, testCase.description) |
| 46 | t.Run(description, func(t *testing.T) { |
| 47 | t.Helper() |
| 48 | RunBp2BuildTestCase(t, registerCcTestModuleTypes, Bp2buildTestCase{ |
| 49 | ExpectedBazelTargets: generateBazelTargetsForTest(testCase.targets, android.HostAndDeviceSupported), |
Kevin Dagostino | 32edd1a | 2022-12-04 11:16:42 +0000 | [diff] [blame] | 50 | Filesystem: testCase.filesystem, |
Jingwen Chen | 537242c | 2022-08-24 11:53:27 +0000 | [diff] [blame] | 51 | ModuleTypeUnderTest: moduleTypeUnderTest, |
| 52 | ModuleTypeUnderTestFactory: cc.TestFactory, |
| 53 | Description: description, |
| 54 | Blueprint: testCase.blueprint, |
| 55 | }) |
| 56 | }) |
| 57 | } |
| 58 | |
| 59 | func TestBasicCcTest(t *testing.T) { |
| 60 | runCcTestTestCase(t, ccTestBp2buildTestCase{ |
| 61 | description: "basic cc_test with commonly used attributes", |
| 62 | blueprint: ` |
| 63 | cc_test { |
| 64 | name: "mytest", |
| 65 | host_supported: true, |
| 66 | srcs: ["test.cpp"], |
| 67 | target: { |
| 68 | android: { |
| 69 | srcs: ["android.cpp"], |
| 70 | shared_libs: ["foolib"], |
| 71 | }, |
| 72 | linux: { |
| 73 | srcs: ["linux.cpp"], |
| 74 | }, |
| 75 | host: { |
| 76 | static_libs: ["hostlib"], |
| 77 | }, |
| 78 | }, |
Liz Kammer | efc51d9 | 2023-04-21 15:11:25 -0400 | [diff] [blame] | 79 | static_libs: ["cc_test_lib1"], |
| 80 | shared_libs: ["cc_test_lib2"], |
Jingwen Chen | 537242c | 2022-08-24 11:53:27 +0000 | [diff] [blame] | 81 | data: [":data_mod", "file.txt"], |
| 82 | data_bins: [":cc_bin"], |
| 83 | data_libs: [":cc_lib"], |
| 84 | cflags: ["-Wall"], |
| 85 | } |
Liz Kammer | efc51d9 | 2023-04-21 15:11:25 -0400 | [diff] [blame] | 86 | |
| 87 | cc_test_library { |
| 88 | name: "cc_test_lib1", |
| 89 | host_supported: true, |
| 90 | include_build_directory: false, |
| 91 | } |
Jingwen Chen | 537242c | 2022-08-24 11:53:27 +0000 | [diff] [blame] | 92 | ` + simpleModuleDoNotConvertBp2build("cc_library", "foolib") + |
| 93 | simpleModuleDoNotConvertBp2build("cc_library_static", "hostlib") + |
| 94 | simpleModuleDoNotConvertBp2build("genrule", "data_mod") + |
| 95 | simpleModuleDoNotConvertBp2build("cc_binary", "cc_bin") + |
Liz Kammer | efc51d9 | 2023-04-21 15:11:25 -0400 | [diff] [blame] | 96 | simpleModuleDoNotConvertBp2build("cc_library", "cc_lib") + |
Spandan Das | 651203d | 2023-07-21 22:55:32 +0000 | [diff] [blame] | 97 | simpleModuleDoNotConvertBp2build("cc_test_library", "cc_test_lib2") + |
| 98 | simpleModuleDoNotConvertBp2build("cc_library_static", "libgtest_main") + |
| 99 | simpleModuleDoNotConvertBp2build("cc_library_static", "libgtest"), |
Jingwen Chen | 537242c | 2022-08-24 11:53:27 +0000 | [diff] [blame] | 100 | targets: []testBazelTarget{ |
Liz Kammer | efc51d9 | 2023-04-21 15:11:25 -0400 | [diff] [blame] | 101 | {"cc_library_shared", "cc_test_lib1", AttrNameToString{}}, |
| 102 | {"cc_library_static", "cc_test_lib1_bp2build_cc_library_static", AttrNameToString{}}, |
Jingwen Chen | 537242c | 2022-08-24 11:53:27 +0000 | [diff] [blame] | 103 | {"cc_test", "mytest", AttrNameToString{ |
| 104 | "copts": `["-Wall"]`, |
| 105 | "data": `[ |
| 106 | ":data_mod", |
| 107 | "file.txt", |
| 108 | ":cc_bin", |
| 109 | ":cc_lib", |
| 110 | ]`, |
Spandan Das | 651203d | 2023-07-21 22:55:32 +0000 | [diff] [blame] | 111 | "deps": `[ |
| 112 | ":cc_test_lib1_bp2build_cc_library_static", |
| 113 | ":libgtest_main", |
| 114 | ":libgtest", |
| 115 | ] + select({ |
Jingwen Chen | 537242c | 2022-08-24 11:53:27 +0000 | [diff] [blame] | 116 | "//build/bazel/platforms/os:darwin": [":hostlib"], |
Jingwen Chen | 537242c | 2022-08-24 11:53:27 +0000 | [diff] [blame] | 117 | "//build/bazel/platforms/os:linux_bionic": [":hostlib"], |
Colin Cross | 133782e | 2022-12-20 15:29:31 -0800 | [diff] [blame] | 118 | "//build/bazel/platforms/os:linux_glibc": [":hostlib"], |
Jingwen Chen | 537242c | 2022-08-24 11:53:27 +0000 | [diff] [blame] | 119 | "//build/bazel/platforms/os:linux_musl": [":hostlib"], |
| 120 | "//build/bazel/platforms/os:windows": [":hostlib"], |
| 121 | "//conditions:default": [], |
| 122 | })`, |
Jingwen Chen | 537242c | 2022-08-24 11:53:27 +0000 | [diff] [blame] | 123 | "local_includes": `["."]`, |
Liz Kammer | efc51d9 | 2023-04-21 15:11:25 -0400 | [diff] [blame] | 124 | "dynamic_deps": `[":cc_test_lib2"] + select({ |
Jingwen Chen | 537242c | 2022-08-24 11:53:27 +0000 | [diff] [blame] | 125 | "//build/bazel/platforms/os:android": [":foolib"], |
| 126 | "//conditions:default": [], |
| 127 | })`, |
| 128 | "srcs": `["test.cpp"] + select({ |
| 129 | "//build/bazel/platforms/os:android": [ |
| 130 | "linux.cpp", |
| 131 | "android.cpp", |
| 132 | ], |
Jingwen Chen | 537242c | 2022-08-24 11:53:27 +0000 | [diff] [blame] | 133 | "//build/bazel/platforms/os:linux_bionic": ["linux.cpp"], |
Colin Cross | 133782e | 2022-12-20 15:29:31 -0800 | [diff] [blame] | 134 | "//build/bazel/platforms/os:linux_glibc": ["linux.cpp"], |
Jingwen Chen | 537242c | 2022-08-24 11:53:27 +0000 | [diff] [blame] | 135 | "//build/bazel/platforms/os:linux_musl": ["linux.cpp"], |
| 136 | "//conditions:default": [], |
| 137 | })`, |
yike | fdca7fe | 2023-08-17 01:03:37 +0000 | [diff] [blame^] | 138 | "runs_on": `[ |
| 139 | "host_without_device", |
| 140 | "device", |
| 141 | ]`, |
Jingwen Chen | 537242c | 2022-08-24 11:53:27 +0000 | [diff] [blame] | 142 | }, |
| 143 | }, |
| 144 | }, |
| 145 | }) |
| 146 | } |
| 147 | |
| 148 | func TestBasicCcTestGtestIsolatedDisabled(t *testing.T) { |
| 149 | runCcTestTestCase(t, ccTestBp2buildTestCase{ |
| 150 | description: "cc test with disabled gtest and isolated props", |
| 151 | blueprint: ` |
| 152 | cc_test { |
| 153 | name: "mytest", |
| 154 | host_supported: true, |
| 155 | srcs: ["test.cpp"], |
| 156 | gtest: false, |
| 157 | isolated: false, |
| 158 | } |
| 159 | `, |
| 160 | targets: []testBazelTarget{ |
| 161 | {"cc_test", "mytest", AttrNameToString{ |
| 162 | "gtest": "False", |
Jingwen Chen | 537242c | 2022-08-24 11:53:27 +0000 | [diff] [blame] | 163 | "local_includes": `["."]`, |
| 164 | "srcs": `["test.cpp"]`, |
yike | fdca7fe | 2023-08-17 01:03:37 +0000 | [diff] [blame^] | 165 | "runs_on": `[ |
| 166 | "host_without_device", |
| 167 | "device", |
| 168 | ]`, |
Jingwen Chen | 537242c | 2022-08-24 11:53:27 +0000 | [diff] [blame] | 169 | }, |
| 170 | }, |
| 171 | }, |
| 172 | }) |
| 173 | } |
Jingwen Chen | fbff97a | 2022-09-16 02:32:03 +0000 | [diff] [blame] | 174 | |
| 175 | func TestCcTest_TestOptions_Tags(t *testing.T) { |
| 176 | runCcTestTestCase(t, ccTestBp2buildTestCase{ |
| 177 | description: "cc test with test_options.tags converted to tags", |
| 178 | blueprint: ` |
| 179 | cc_test { |
| 180 | name: "mytest", |
| 181 | host_supported: true, |
| 182 | srcs: ["test.cpp"], |
| 183 | test_options: { tags: ["no-remote"] }, |
| 184 | } |
Spandan Das | 651203d | 2023-07-21 22:55:32 +0000 | [diff] [blame] | 185 | ` + simpleModuleDoNotConvertBp2build("cc_library_static", "libgtest_main") + |
| 186 | simpleModuleDoNotConvertBp2build("cc_library_static", "libgtest"), |
Jingwen Chen | fbff97a | 2022-09-16 02:32:03 +0000 | [diff] [blame] | 187 | targets: []testBazelTarget{ |
| 188 | {"cc_test", "mytest", AttrNameToString{ |
| 189 | "tags": `["no-remote"]`, |
| 190 | "local_includes": `["."]`, |
| 191 | "srcs": `["test.cpp"]`, |
Spandan Das | 651203d | 2023-07-21 22:55:32 +0000 | [diff] [blame] | 192 | "deps": `[ |
| 193 | ":libgtest_main", |
| 194 | ":libgtest", |
| 195 | ]`, |
yike | fdca7fe | 2023-08-17 01:03:37 +0000 | [diff] [blame^] | 196 | "runs_on": `[ |
| 197 | "host_without_device", |
| 198 | "device", |
| 199 | ]`, |
Jingwen Chen | fbff97a | 2022-09-16 02:32:03 +0000 | [diff] [blame] | 200 | }, |
| 201 | }, |
| 202 | }, |
| 203 | }) |
| 204 | } |
Kevin Dagostino | 32edd1a | 2022-12-04 11:16:42 +0000 | [diff] [blame] | 205 | |
| 206 | func TestCcTest_TestConfig(t *testing.T) { |
| 207 | runCcTestTestCase(t, ccTestBp2buildTestCase{ |
| 208 | description: "cc test that sets a test_config", |
| 209 | filesystem: map[string]string{ |
| 210 | "test_config.xml": "", |
| 211 | }, |
| 212 | blueprint: ` |
| 213 | cc_test { |
| 214 | name: "mytest", |
| 215 | srcs: ["test.cpp"], |
| 216 | test_config: "test_config.xml", |
| 217 | } |
Spandan Das | 651203d | 2023-07-21 22:55:32 +0000 | [diff] [blame] | 218 | ` + simpleModuleDoNotConvertBp2build("cc_library_static", "libgtest_main") + |
| 219 | simpleModuleDoNotConvertBp2build("cc_library_static", "libgtest"), |
Kevin Dagostino | 32edd1a | 2022-12-04 11:16:42 +0000 | [diff] [blame] | 220 | targets: []testBazelTarget{ |
| 221 | {"cc_test", "mytest", AttrNameToString{ |
Kevin Dagostino | 32edd1a | 2022-12-04 11:16:42 +0000 | [diff] [blame] | 222 | "local_includes": `["."]`, |
| 223 | "srcs": `["test.cpp"]`, |
| 224 | "target_compatible_with": `["//build/bazel/platforms/os:android"]`, |
| 225 | "test_config": `"test_config.xml"`, |
Spandan Das | 651203d | 2023-07-21 22:55:32 +0000 | [diff] [blame] | 226 | "deps": `[ |
| 227 | ":libgtest_main", |
| 228 | ":libgtest", |
| 229 | ]`, |
yike | fdca7fe | 2023-08-17 01:03:37 +0000 | [diff] [blame^] | 230 | "runs_on": `["device"]`, |
Kevin Dagostino | 32edd1a | 2022-12-04 11:16:42 +0000 | [diff] [blame] | 231 | }, |
| 232 | }, |
| 233 | }, |
| 234 | }) |
| 235 | } |
| 236 | |
| 237 | func TestCcTest_TestConfigAndroidTestXML(t *testing.T) { |
| 238 | runCcTestTestCase(t, ccTestBp2buildTestCase{ |
| 239 | description: "cc test that defaults to test config AndroidTest.xml", |
| 240 | filesystem: map[string]string{ |
| 241 | "AndroidTest.xml": "", |
| 242 | }, |
| 243 | blueprint: ` |
| 244 | cc_test { |
| 245 | name: "mytest", |
| 246 | srcs: ["test.cpp"], |
| 247 | } |
Spandan Das | 651203d | 2023-07-21 22:55:32 +0000 | [diff] [blame] | 248 | ` + simpleModuleDoNotConvertBp2build("cc_library_static", "libgtest_main") + |
| 249 | simpleModuleDoNotConvertBp2build("cc_library_static", "libgtest"), |
Kevin Dagostino | 32edd1a | 2022-12-04 11:16:42 +0000 | [diff] [blame] | 250 | targets: []testBazelTarget{ |
| 251 | {"cc_test", "mytest", AttrNameToString{ |
Kevin Dagostino | 32edd1a | 2022-12-04 11:16:42 +0000 | [diff] [blame] | 252 | "local_includes": `["."]`, |
| 253 | "srcs": `["test.cpp"]`, |
| 254 | "target_compatible_with": `["//build/bazel/platforms/os:android"]`, |
| 255 | "test_config": `"AndroidTest.xml"`, |
Spandan Das | 651203d | 2023-07-21 22:55:32 +0000 | [diff] [blame] | 256 | "deps": `[ |
| 257 | ":libgtest_main", |
| 258 | ":libgtest", |
| 259 | ]`, |
yike | fdca7fe | 2023-08-17 01:03:37 +0000 | [diff] [blame^] | 260 | "runs_on": `["device"]`, |
Kevin Dagostino | 32edd1a | 2022-12-04 11:16:42 +0000 | [diff] [blame] | 261 | }, |
| 262 | }, |
| 263 | }, |
| 264 | }) |
| 265 | } |
| 266 | |
| 267 | func TestCcTest_TestConfigTemplateOptions(t *testing.T) { |
| 268 | runCcTestTestCase(t, ccTestBp2buildTestCase{ |
| 269 | description: "cc test that sets test config template attributes", |
| 270 | filesystem: map[string]string{ |
| 271 | "test_config_template.xml": "", |
| 272 | }, |
| 273 | blueprint: ` |
| 274 | cc_test { |
| 275 | name: "mytest", |
| 276 | srcs: ["test.cpp"], |
| 277 | test_config_template: "test_config_template.xml", |
| 278 | auto_gen_config: true, |
Spandan Das | f5a8655 | 2023-07-22 03:16:53 +0000 | [diff] [blame] | 279 | isolated: true, |
Kevin Dagostino | 32edd1a | 2022-12-04 11:16:42 +0000 | [diff] [blame] | 280 | } |
Spandan Das | d1cd351 | 2023-07-22 02:19:42 +0000 | [diff] [blame] | 281 | ` + simpleModuleDoNotConvertBp2build("cc_library_static", "libgtest_isolated_main") + |
| 282 | simpleModuleDoNotConvertBp2build("cc_library", "liblog"), |
Kevin Dagostino | 32edd1a | 2022-12-04 11:16:42 +0000 | [diff] [blame] | 283 | targets: []testBazelTarget{ |
| 284 | {"cc_test", "mytest", AttrNameToString{ |
| 285 | "auto_generate_test_config": "True", |
Kevin Dagostino | 32edd1a | 2022-12-04 11:16:42 +0000 | [diff] [blame] | 286 | "local_includes": `["."]`, |
| 287 | "srcs": `["test.cpp"]`, |
| 288 | "target_compatible_with": `["//build/bazel/platforms/os:android"]`, |
| 289 | "template_configs": `[ |
| 290 | "'<target_preparer class=\"com.android.tradefed.targetprep.RootTargetPreparer\">\\n <option name=\"force-root\" value=\"false\" />\\n </target_preparer>'", |
| 291 | "'<option name=\"not-shardable\" value=\"true\" />'", |
| 292 | ]`, |
| 293 | "template_install_base": `"/data/local/tmp"`, |
| 294 | "template_test_config": `"test_config_template.xml"`, |
Spandan Das | d1cd351 | 2023-07-22 02:19:42 +0000 | [diff] [blame] | 295 | "deps": `[":libgtest_isolated_main"]`, |
| 296 | "dynamic_deps": `[":liblog"]`, |
yike | fdca7fe | 2023-08-17 01:03:37 +0000 | [diff] [blame^] | 297 | "runs_on": `["device"]`, |
Kevin Dagostino | 32edd1a | 2022-12-04 11:16:42 +0000 | [diff] [blame] | 298 | }, |
| 299 | }, |
| 300 | }, |
| 301 | }) |
| 302 | } |
Spandan Das | 651203d | 2023-07-21 22:55:32 +0000 | [diff] [blame] | 303 | |
| 304 | func TestCcTest_WithExplicitGTestDepInAndroidBp(t *testing.T) { |
| 305 | runCcTestTestCase(t, ccTestBp2buildTestCase{ |
| 306 | description: "cc test that lists libgtest in Android.bp should not have dups of libgtest in BUILD file", |
| 307 | blueprint: ` |
| 308 | cc_test { |
| 309 | name: "mytest", |
| 310 | srcs: ["test.cpp"], |
| 311 | static_libs: ["libgtest"], |
| 312 | } |
| 313 | ` + simpleModuleDoNotConvertBp2build("cc_library_static", "libgtest_main") + |
| 314 | simpleModuleDoNotConvertBp2build("cc_library_static", "libgtest"), |
| 315 | targets: []testBazelTarget{ |
| 316 | {"cc_test", "mytest", AttrNameToString{ |
Spandan Das | 651203d | 2023-07-21 22:55:32 +0000 | [diff] [blame] | 317 | "local_includes": `["."]`, |
| 318 | "srcs": `["test.cpp"]`, |
| 319 | "target_compatible_with": `["//build/bazel/platforms/os:android"]`, |
| 320 | "deps": `[ |
| 321 | ":libgtest", |
| 322 | ":libgtest_main", |
| 323 | ]`, |
yike | fdca7fe | 2023-08-17 01:03:37 +0000 | [diff] [blame^] | 324 | "runs_on": `["device"]`, |
Spandan Das | 651203d | 2023-07-21 22:55:32 +0000 | [diff] [blame] | 325 | }, |
| 326 | }, |
| 327 | }, |
| 328 | }) |
| 329 | |
| 330 | } |
Spandan Das | d1cd351 | 2023-07-22 02:19:42 +0000 | [diff] [blame] | 331 | |
| 332 | func TestCcTest_WithIsolatedTurnedOn(t *testing.T) { |
| 333 | runCcTestTestCase(t, ccTestBp2buildTestCase{ |
| 334 | description: "cc test that sets `isolated: true` should run with ligtest_isolated_main instead of libgtest_main", |
| 335 | blueprint: ` |
| 336 | cc_test { |
| 337 | name: "mytest", |
| 338 | srcs: ["test.cpp"], |
| 339 | isolated: true, |
| 340 | } |
| 341 | ` + simpleModuleDoNotConvertBp2build("cc_library_static", "libgtest_isolated_main") + |
| 342 | simpleModuleDoNotConvertBp2build("cc_library", "liblog"), |
| 343 | targets: []testBazelTarget{ |
| 344 | {"cc_test", "mytest", AttrNameToString{ |
Spandan Das | d1cd351 | 2023-07-22 02:19:42 +0000 | [diff] [blame] | 345 | "local_includes": `["."]`, |
| 346 | "srcs": `["test.cpp"]`, |
| 347 | "target_compatible_with": `["//build/bazel/platforms/os:android"]`, |
| 348 | "deps": `[":libgtest_isolated_main"]`, |
| 349 | "dynamic_deps": `[":liblog"]`, |
yike | fdca7fe | 2023-08-17 01:03:37 +0000 | [diff] [blame^] | 350 | "runs_on": `["device"]`, |
Spandan Das | d1cd351 | 2023-07-22 02:19:42 +0000 | [diff] [blame] | 351 | }, |
| 352 | }, |
| 353 | }, |
| 354 | }) |
| 355 | |
| 356 | } |
Spandan Das | e50fd11 | 2023-07-26 17:35:20 +0000 | [diff] [blame] | 357 | |
| 358 | func TestCcTest_GtestExplicitlySpecifiedInAndroidBp(t *testing.T) { |
| 359 | runCcTestTestCase(t, ccTestBp2buildTestCase{ |
| 360 | description: "If `gtest` is explicit in Android.bp, it should be explicit in BUILD files as well", |
| 361 | blueprint: ` |
| 362 | cc_test { |
| 363 | name: "mytest_with_gtest", |
| 364 | gtest: true, |
| 365 | } |
| 366 | cc_test { |
| 367 | name: "mytest_with_no_gtest", |
| 368 | gtest: false, |
| 369 | } |
| 370 | ` + simpleModuleDoNotConvertBp2build("cc_library_static", "libgtest_main") + |
| 371 | simpleModuleDoNotConvertBp2build("cc_library_static", "libgtest"), |
| 372 | targets: []testBazelTarget{ |
| 373 | {"cc_test", "mytest_with_gtest", AttrNameToString{ |
| 374 | "local_includes": `["."]`, |
| 375 | "deps": `[ |
| 376 | ":libgtest_main", |
| 377 | ":libgtest", |
| 378 | ]`, |
| 379 | "gtest": "True", |
| 380 | "target_compatible_with": `["//build/bazel/platforms/os:android"]`, |
yike | fdca7fe | 2023-08-17 01:03:37 +0000 | [diff] [blame^] | 381 | "runs_on": `["device"]`, |
Spandan Das | e50fd11 | 2023-07-26 17:35:20 +0000 | [diff] [blame] | 382 | }, |
| 383 | }, |
| 384 | {"cc_test", "mytest_with_no_gtest", AttrNameToString{ |
| 385 | "local_includes": `["."]`, |
| 386 | "gtest": "False", |
| 387 | "target_compatible_with": `["//build/bazel/platforms/os:android"]`, |
yike | fdca7fe | 2023-08-17 01:03:37 +0000 | [diff] [blame^] | 388 | "runs_on": `["device"]`, |
Spandan Das | e50fd11 | 2023-07-26 17:35:20 +0000 | [diff] [blame] | 389 | }, |
| 390 | }, |
| 391 | }, |
| 392 | }) |
| 393 | } |