summaryrefslogtreecommitdiff
path: root/tools/buildman/builderthread.py
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2014-09-09 20:02:43 -0400
committerTom Rini <trini@ti.com>2014-09-09 20:02:43 -0400
commit5935408a4092a1a132ff1ce866374ab1ed555bcd (patch)
tree232412fb1d28582fc261a23d04f866c795e72d19 /tools/buildman/builderthread.py
parent8c9c74e4c69b43cd50a1f04b34cfc141ed21654c (diff)
parentd0ea61d9caf85e4285d5c2da508db9fac70e4aba (diff)
Merge branch 'buildman' of git://git.denx.de/u-boot-x86
Diffstat (limited to 'tools/buildman/builderthread.py')
-rw-r--r--tools/buildman/builderthread.py22
1 files changed, 13 insertions, 9 deletions
diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py
index 0246375bfad..a9cf68a8016 100644
--- a/tools/buildman/builderthread.py
+++ b/tools/buildman/builderthread.py
@@ -12,14 +12,17 @@ import threading
import command
import gitutil
-def Mkdir(dirname):
+def Mkdir(dirname, parents = False):
"""Make a directory if it doesn't already exist.
Args:
dirname: Directory to create
"""
try:
- os.mkdir(dirname)
+ if parents:
+ os.makedirs(dirname)
+ else:
+ os.mkdir(dirname)
except OSError as err:
if err.errno == errno.EEXIST:
pass
@@ -138,16 +141,17 @@ class BuilderThread(threading.Thread):
result.already_done = os.path.exists(done_file)
will_build = (force_build or force_build_failures or
not result.already_done)
- if result.already_done and will_build:
+ if result.already_done:
# Get the return code from that build and use it
with open(done_file, 'r') as fd:
result.return_code = int(fd.readline())
- err_file = self.builder.GetErrFile(commit_upto, brd.target)
- if os.path.exists(err_file) and os.stat(err_file).st_size:
- result.stderr = 'bad'
- elif not force_build:
- # The build passed, so no need to build it again
- will_build = False
+ if will_build:
+ err_file = self.builder.GetErrFile(commit_upto, brd.target)
+ if os.path.exists(err_file) and os.stat(err_file).st_size:
+ result.stderr = 'bad'
+ elif not force_build:
+ # The build passed, so no need to build it again
+ will_build = False
if will_build:
# We are going to have to build it. First, get a toolchain