Lines Matching refs:mbw
181 mbw = FakeMBW(win32=win32)
182 mbw.files.setdefault(mbw.default_config, TEST_CONFIG)
183 mbw.files.setdefault(
184 mbw.ToAbsPath('//testing/buildbot/gn_isolate_map.pyl'),
192 mbw.files.setdefault(
193 mbw.ToAbsPath('//build/args/bots/fake_master/fake_args_bot.gn'),
197 mbw.files[path] = contents
198 return mbw
200 def check(self, args, mbw=None, files=None, out=None, err=None, ret=None): argument
201 if not mbw:
202 mbw = self.fake_mbw(files)
204 actual_ret = mbw.Main(args)
208 self.assertEqual(mbw.out, out)
210 self.assertEqual(mbw.err, err)
211 return mbw
225 mbw = self.fake_mbw(files)
226 mbw.Call = lambda cmd, env=None, buffer_output=True: (0, '', '')
229 '/tmp/in.json', '/tmp/out.json'], mbw=mbw, ret=0)
230 out = json.loads(mbw.files['/tmp/out.json'])
249 mbw = self.fake_mbw(files)
250 mbw.Call = lambda cmd, env=None, buffer_output=True: (0, '', '')
253 '/tmp/in.json', '/tmp/out.json'], mbw=mbw, ret=0)
254 out = json.loads(mbw.files['/tmp/out.json'])
272 mbw = self.fake_mbw(files)
273 mbw.Call = lambda cmd, env=None, buffer_output=True: (0, '', '')
276 '/tmp/in.json', '/tmp/out.json'], mbw=mbw, ret=0)
277 out = json.loads(mbw.files['/tmp/out.json'])
299 mbw = self.fake_mbw(files)
300 mbw.Call = lambda cmd, env=None, buffer_output=True: (0, '', '')
303 '/tmp/in.json', '/tmp/out.json'], mbw=mbw, ret=0)
304 out = json.loads(mbw.files['/tmp/out.json'])
313 mbw = self.fake_mbw()
315 mbw=mbw, ret=0)
316 self.assertMultiLineEqual(mbw.files['/fake_src/out/Default/args.gn'],
322 self.assertIn('Writing """', mbw.out)
324 mbw.out)
326 mbw = self.fake_mbw(win32=True)
328 mbw=mbw, ret=0)
329 self.assertMultiLineEqual(mbw.files['c:\\fake_src\\out\\Debug\\args.gn'],
334 '--check\n', mbw.out)
336 mbw = self.fake_mbw()
339 mbw=mbw, ret=0)
341 mbw.files['/fake_src/out/Debug/args.gn'],
345 mbw = self.fake_mbw()
347 '//out/Debug'], mbw=mbw, ret=0)
350 mbw.files['/fake_src/out/Debug/args.gn'],
354 mbw = self.fake_mbw()
356 '//out/Debug'], mbw=mbw, ret=1)
359 mbw = self.fake_mbw()
360 mbw.Call = lambda cmd, env=None, buffer_output=True: (1, '', '')
361 self.check(['gen', '-c', 'debug_goma', '//out/Default'], mbw=mbw, ret=1)
377 mbw = self.fake_mbw(files)
381 '//out/Default'], mbw=mbw, ret=0)
383 mbw.files)
385 mbw.files)
402 mbw = self.fake_mbw(files=files, win32=True)
408 '//out/Default'], mbw=mbw, ret=0)
410 mbw.files)
412 mbw.files)
436 mbw = self.fake_mbw(files=files, win32=True)
444 '//out/Default'], mbw=mbw, ret=0)
446 mbw.files)
448 mbw.files)
472 mbw = self.fake_mbw(files=files, win32=True)
481 '//out/Default'], mbw=mbw, ret=1)
544 mbw = self.fake_mbw(files=files)
545 mbw.Run = run_stub
547 'base_unittests'], mbw=mbw, ret=0)
549 '//out/Default', 'base_unittests'], mbw=mbw, ret=0)
577 mbw = self.check(['lookup', '-m', 'fake_master', '-b', 'fake_multi_phase'],
579 self.assertIn('Must specify a build --phase', mbw.out)
582 mbw = self.check(['lookup', '-m', 'fake_master', '-b', 'fake_builder',
584 self.assertIn('Must not specify a build --phase', mbw.out)
587 mbw = self.check(['lookup', '-m', 'fake_master', '-b', 'fake_multi_phase',
589 self.assertIn('Phase wrong_phase doesn\'t exist', mbw.out)
592 mbw = self.check(['lookup', '-m', 'fake_master', '-b', 'fake_multi_phase',
594 self.assertIn('phase = 1', mbw.out)
596 mbw = self.check(['lookup', '-m', 'fake_master', '-b', 'fake_multi_phase',
598 self.assertIn('phase = 2', mbw.out)
601 mbw = self.fake_mbw()
602 self.check(['validate'], mbw=mbw, ret=0)
605 mbw = self.fake_mbw()
606 mbw.files[mbw.default_config] = TRYSERVER_CONFIG
607 self.check(['gerrit-buildbucket-config'], mbw=mbw,