def test_repo(): return filesystem_mock.MockFileSystem(files={ '/DEPS' : '', '/OWNERS': owners_file(owners.EVERYONE), '/base/vlog.h': '', '/chrome/OWNERS': owners_file(ben, brett), '/chrome/browser/OWNERS': owners_file(brett), '/chrome/browser/defaults.h': '', '/chrome/gpu/OWNERS': owners_file(ken), '/chrome/gpu/gpu_channel.h': '', '/chrome/renderer/OWNERS': owners_file(peter), '/chrome/renderer/gpu/gpu_channel_host.h': '', '/chrome/renderer/safe_browsing/scorer.h': '', '/content/OWNERS': owners_file(john, darin, comment='foo', noparent=True), '/content/content.gyp': '', '/content/bar/foo.cc': '', '/content/baz/OWNERS': owners_file(brett), '/content/baz/froboz.h': '', '/content/baz/ugly.cc': '', '/content/baz/ugly.h': '', '/content/garply/OWNERS': owners_file(file='test/OWNERS'), '/content/garply/foo.cc': '', '/content/garply/test/OWNERS': owners_file(peter), '/content/qux/OWNERS': owners_file(peter, file='//content/baz/OWNERS'), '/content/qux/foo.cc': '', '/content/views/OWNERS': owners_file(ben, john, owners.EVERYONE, noparent=True), '/content/views/pie.h': '', })
def setUp(self): self.repo = filesystem_mock.MockFileSystem( files={ '/OWNERS': '\n'.join([ 'per-file [email protected]', 'per-file [email protected]', '*****@*****.**', ]), '/approved.cc': '', '/reviewed.h': '', '/bar/insufficient_reviewers.py': '', '/bar/everyone/OWNERS': '*', '/bar/everyone/foo.txt': '', }) self.root = '/' self.fopen = self.repo.open_for_reading mock.patch('owners_client.DepotToolsClient._GetOriginalOwnersFiles', return_value={}).start() self.addCleanup(mock.patch.stopall) self.client = owners_client.DepotToolsClient('host', '/', 'branch', self.fopen, self.repo)
def arc_test_repo(): return filesystem_mock.MockFileSystem( files={ '/OWNERS': owners_file(hamaji, yusuke, comment='misc'), '/mods/android/random.c': '', '/src/build/cts/OWNERS': owners_file(lloyd, lines=['per-file cts_run_configuration.py=*']), '/src/build/cts/cts_run_configuration.py': '', '/src/build/cts/random.c': '', '/src/ndk_translation/OWNERS': owners_file(evgeny, nikolay), '/src/packaging/OWNERS': owners_file(elijah, comment='packaging'), '/src/packaging/runtime/filesystem.js': '', '/src/plugin/OWNERS': owners_file(ken), '/src/plugin/file_system_manager.cc': '', '/src/posix_translation/OWNERS': owners_file(satoru), '/src/posix_translation/external_file.cc': '' })
def test_repo(): return filesystem_mock.MockFileSystem( files={ '/DEPS': '', '/OWNERS': owners_file(owners.EVERYONE), '/base/vlog.h': '', '/chrome/OWNERS': owners_file(ben, brett), '/chrome/gpu/OWNERS': owners_file(ken), '/chrome/gpu/gpu_channel.h': '', '/chrome/renderer/OWNERS': owners_file(peter), '/chrome/renderer/gpu/gpu_channel_host.h': '', '/chrome/renderer/safe_browsing/scorer.h': '', '/content/OWNERS': owners_file(john, darin, comment='foo', noparent=True), '/content/content.gyp': '', '/content/views/OWNERS': owners_file(ben, john, owners.EVERYONE, noparent=True), })
def test_repo(): return filesystem_mock.MockFileSystem(files={ '/DEPS': '', '/OWNERS': owners_file(ken, peter, tom, comment='OWNERS_STATUS = build/OWNERS.status'), '/build/OWNERS.status': '%s: bar' % jochen, '/base/vlog.h': '', '/chrome/OWNERS': owners_file(ben, brett), '/chrome/browser/OWNERS': owners_file(brett), '/chrome/browser/defaults.h': '', '/chrome/gpu/OWNERS': owners_file(ken), '/chrome/gpu/gpu_channel.h': '', '/chrome/renderer/OWNERS': owners_file(peter), '/chrome/renderer/gpu/gpu_channel_host.h': '', '/chrome/renderer/safe_browsing/scorer.h': '', '/content/OWNERS': owners_file(john, darin, comment='foo', noparent=True), '/content/content.gyp': '', '/content/bar/foo.cc': '', '/content/baz/OWNERS': owners_file(brett), '/content/baz/froboz.h': '', '/content/baz/ugly.cc': '', '/content/baz/ugly.h': '', '/content/common/OWNERS': owners_file(jochen), '/content/common/common.cc': '', '/content/foo/OWNERS': owners_file(jochen, comment='foo'), '/content/foo/foo.cc': '', '/content/views/OWNERS': owners_file(ben, john, owners.EVERYONE, noparent=True), '/content/views/pie.h': '', })