MCPcopy Index your code
hub / github.com/nodejs/node / test_analyze

Method test_analyze

deps/v8/tools/mb/mb_test.py:231–262  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

229 return mbw
230
231 def test_analyze(self):
232 files = {
233 '/tmp/in.json':
234 '''{\
235 "files": ["foo/foo_unittest.cc"],
236 "test_targets": ["foo_unittests"],
237 "additional_compile_targets": ["all"]
238 }''',
239 '/tmp/out.json.gn':
240 '''{\
241 "status": "Found dependency",
242 "compile_targets": ["//foo:foo_unittests"],
243 "test_targets": ["//foo:foo_unittests"]
244 }'''
245 }
246
247 mbw = self.fake_mbw(files)
248 mbw.Call = lambda cmd, env=None, buffer_output=True: (0, '', '')
249
250 self.check([
251 'analyze', '-c', 'debug_remoteexec', '//out/Default', '/tmp/in.json',
252 '/tmp/out.json'
253 ],
254 mbw=mbw,
255 ret=0)
256 out = json.loads(mbw.files['/tmp/out.json'])
257 self.assertEqual(
258 out, {
259 'status': 'Found dependency',
260 'compile_targets': ['foo:foo_unittests'],
261 'test_targets': ['foo_unittests']
262 })
263
264 def test_analyze_optimizes_compile_for_all(self):
265 files = {

Callers

nothing calls this directly

Calls 2

fake_mbwMethod · 0.95
checkMethod · 0.95

Tested by

no test coverage detected