| 361 | self.assertEqual(['all', 'foo_unittests'], out['compile_targets']) |
| 362 | |
| 363 | def test_gen(self): |
| 364 | mbw = self.fake_mbw() |
| 365 | self.check(['gen', '-c', 'debug_remoteexec', '//out/Default'], |
| 366 | mbw=mbw, |
| 367 | ret=0) |
| 368 | self.assertMultiLineEqual(mbw.files['/fake_src/out/Default/args.gn'], |
| 369 | ('is_debug = true\n' |
| 370 | 'use_remoteexec = true\n')) |
| 371 | |
| 372 | # Make sure we log both what is written to args.gn and the command line. |
| 373 | self.assertIn('Writing """', mbw.out) |
| 374 | self.assertIn('/fake_src/buildtools/linux64/gn gen //out/Default --check', |
| 375 | mbw.out) |
| 376 | |
| 377 | mbw = self.fake_mbw(win32=True) |
| 378 | self.check(['gen', '-c', 'debug_remoteexec', '//out/Debug'], mbw=mbw, ret=0) |
| 379 | self.assertMultiLineEqual(mbw.files['c:\\fake_src\\out\\Debug\\args.gn'], |
| 380 | ('is_debug = true\n' |
| 381 | 'use_remoteexec = true\n')) |
| 382 | self.assertIn( |
| 383 | 'c:\\fake_src\\buildtools\\win\\gn.exe gen //out/Debug ' |
| 384 | '--check\n', mbw.out) |
| 385 | |
| 386 | mbw = self.fake_mbw() |
| 387 | self.check([ |
| 388 | 'gen', '-m', 'fake_builder_group', '-b', 'fake_args_bot', '//out/Debug' |
| 389 | ], |
| 390 | mbw=mbw, |
| 391 | ret=0) |
| 392 | # TODO(almuthanna): disable test temporarily to |
| 393 | # solve this issue https://crbug.com/v8/11102 |
| 394 | # self.assertEqual( |
| 395 | # mbw.files['/fake_src/out/Debug/args.gn'], |
| 396 | # 'import("//build/args/bots/fake_builder_group/fake_args_bot.gn")\n') |
| 397 | |
| 398 | def test_gen_args_file_mixins(self): |
| 399 | mbw = self.fake_mbw() |