terminal.print_clear()
tprint(line, newline=False, limit_to_line=True)
- def _get_output_dir(self, commit_upto):
+ def get_output_dir(self, commit_upto):
"""Get the name of the output directory for a commit number
The output directory is typically .../<branch>/<commit>.
commit_upto: Commit number to use (0..self.count-1)
target: Target name
"""
- output_dir = self._get_output_dir(commit_upto)
+ output_dir = self.get_output_dir(commit_upto)
if self.work_in_output:
return output_dir
return os.path.join(output_dir, target)
Figure out what needs to be deleted in the output directory before it
can be used. We only delete old buildman directories which have the
- expected name pattern. See _get_output_dir().
+ expected name pattern. See get_output_dir().
Returns:
List of full paths of directories to remove
return
dir_list = []
for commit_upto in range(self.commit_count):
- dir_list.append(self._get_output_dir(commit_upto))
+ dir_list.append(self.get_output_dir(commit_upto))
to_remove = []
for dirname in glob.glob(os.path.join(self.base_dir, '*')):
return
# Write the output and stderr
- output_dir = self.builder._get_output_dir(result.commit_upto)
+ output_dir = self.builder.get_output_dir(result.commit_upto)
mkdir(output_dir)
build_dir = self.builder.get_build_dir(result.commit_upto,
result.brd.target)
'sandbox']),
({'all': ['board4'], 'sandbox': ['board4']}, []))
def CheckDirs(self, build, dirname):
- self.assertEqual('base%s' % dirname, build._get_output_dir(1))
+ self.assertEqual('base%s' % dirname, build.get_output_dir(1))
self.assertEqual('base%s/fred' % dirname,
build.get_build_dir(1, 'fred'))
self.assertEqual('base%s/fred/done' % dirname,