aboutsummaryrefslogtreecommitdiff
path: root/tools/buildman
diff options
context:
space:
mode:
authorSimon Glass2023-07-19 17:49:10 -0600
committerSimon Glass2023-07-24 09:34:11 -0600
commit4a7419bfbbeae2838422b13fce06d83f30491d70 (patch)
tree83bb29428c61eeaee6ac9de16e5dcc412392c940 /tools/buildman
parent606e54357ff2fd590a55a916093bb6d1b8ed67e1 (diff)
buildman: Export _get_output_dir() to avoid warnings
Make this a public memory since it is used outside the class. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/buildman')
-rw-r--r--tools/buildman/builder.py8
-rw-r--r--tools/buildman/builderthread.py2
-rw-r--r--tools/buildman/test.py2
3 files changed, 6 insertions, 6 deletions
diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py
index 4cc266ff304..ecbd368c47a 100644
--- a/tools/buildman/builder.py
+++ b/tools/buildman/builder.py
@@ -565,7 +565,7 @@ class Builder:
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>.
@@ -598,7 +598,7 @@ class Builder:
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)
@@ -1717,7 +1717,7 @@ class Builder:
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
@@ -1726,7 +1726,7 @@ class Builder:
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, '*')):
diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py
index 179fc477c00..45ae6edf9f4 100644
--- a/tools/buildman/builderthread.py
+++ b/tools/buildman/builderthread.py
@@ -351,7 +351,7 @@ class BuilderThread(threading.Thread):
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)
diff --git a/tools/buildman/test.py b/tools/buildman/test.py
index 7ac67260c33..bdd3d84158a 100644
--- a/tools/buildman/test.py
+++ b/tools/buildman/test.py
@@ -528,7 +528,7 @@ class TestBuild(unittest.TestCase):
'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,