示例#1
0
 def _candidate_owners(self, path):
   build_file = BuildFile(get_buildroot(), relpath=os.path.dirname(path), must_exist=False)
   if build_file.exists():
     yield build_file
   for sibling in build_file.siblings():
     yield sibling
   for ancestor in build_file.ancestors():
     yield ancestor
示例#2
0
 def _candidate_owners(self, path):
     build_file = BuildFile(get_buildroot(),
                            relpath=os.path.dirname(path),
                            must_exist=False)
     if build_file.exists():
         yield build_file
     for sibling in build_file.siblings():
         yield sibling
     for ancestor in build_file.ancestors():
         yield ancestor
示例#3
0
 def test_buildfile_with_dir_must_exist_false(self):
   # We should be able to create a BuildFile against a dir called BUILD if must_exist is false.
   # This is used in what_changed for example.
   buildfile = BuildFile(BuildFileTest.root_dir, 'grandparent/BUILD', must_exist=False)
   self.assertFalse(buildfile.exists())
示例#4
0
 def test_buildfile_with_dir_must_exist_false(self):
   # We should be able to create a BuildFile against a dir called BUILD if must_exist is false.
   # This is used in what_changed for example.
   buildfile = BuildFile(BuildFileTest.root_dir, 'grandparent/BUILD', must_exist=False)
   self.assertFalse(buildfile.exists())