def test_zircon_tool(self): # If a build tree is available, try using a zircon tool for "real". host = Host() try: host.set_build_dir(host.find_build_dir()) except Host.ConfigError: return with self.assertRaises(Host.ConfigError): host.zircon_tool(['no_such_tool']) path = os.path.abspath(__file__) line = host.zircon_tool(['merkleroot', path]) self.assertRegexpMatches(line, r'[0-9a-f]* - ' + path)
def test_zircon_tool(self): mock = MockHost() mock.zircon_tool(['mock_tool', 'mock_arg']) self.assertIn('mock/out/default.zircon/tools/mock_tool mock_arg', mock.history) # If a build tree is available, try using a zircon tool for "real". host = Host() try: host.set_build_dir(host.find_build_dir()) except Host.ConfigError: return with self.assertRaises(Host.ConfigError): host.zircon_tool(['no_such_tool']) path = os.path.abspath(__file__) line = host.zircon_tool(['merkleroot', path]) self.assertRegexpMatches(line, r'[0-9a-f]* - ' + path)