buildman: Write output files when using -w
At present buildman does not write its own output files (err, done, the
environment) when using -w. However this is useful for when the build is
run with -s to check it.
In fact ProduceResultSummary() reads the result from those files rather
than using the 'result' info directly. So ProcessResult() does not work
with -w at present. It does not print any output.
Fix this by writing output files even when -w is used.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py
index 30ebe1d..1b61e3a 100644
--- a/tools/buildman/builder.py
+++ b/tools/buildman/builder.py
@@ -479,6 +479,9 @@
Args:
commit_upto: Commit number to use (0..self.count-1)
"""
+ if self.work_in_output:
+ return self._working_dir
+
commit_dir = None
if self.commits:
commit = self.commits[commit_upto]
@@ -502,6 +505,8 @@
target: Target name
"""
output_dir = self._GetOutputDir(commit_upto)
+ if self.work_in_output:
+ return output_dir
return os.path.join(output_dir, target)
def GetDoneFile(self, commit_upto, target):