diff options
Diffstat (limited to 'tools/buildman/builderthread.py')
-rw-r--r-- | tools/buildman/builderthread.py | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py index fc6e1ab25d..48fcd6cf7e 100644 --- a/tools/buildman/builderthread.py +++ b/tools/buildman/builderthread.py @@ -9,8 +9,8 @@ import shutil import sys import threading -import command -import gitutil +from patman import command +from patman import gitutil RETURN_CODE_RETRY = -1 @@ -280,8 +280,6 @@ class BuilderThread(threading.Thread): work_in_output: Use the output directory as the work directory and don't write to a separate output directory. """ - if work_in_output: - return # Fatal error if result.return_code < 0: return @@ -333,7 +331,7 @@ class BuilderThread(threading.Thread): # Write out the image and function size information and an objdump env = result.toolchain.MakeEnvironment(self.builder.full_path) - with open(os.path.join(build_dir, 'env'), 'w') as fd: + with open(os.path.join(build_dir, 'out-env'), 'w') as fd: for var in sorted(env.keys()): print('%s="%s"' % (var, env[var]), file=fd) lines = [] @@ -379,7 +377,8 @@ class BuilderThread(threading.Thread): capture_stderr=True, cwd=result.out_dir, raise_on_error=False, env=env) ubootenv = os.path.join(result.out_dir, 'uboot.env') - self.CopyFiles(result.out_dir, build_dir, '', ['uboot.env']) + if not work_in_output: + self.CopyFiles(result.out_dir, build_dir, '', ['uboot.env']) # Write out the image sizes file. This is similar to the output # of binutil's 'size' utility, but it omits the header line and @@ -391,17 +390,21 @@ class BuilderThread(threading.Thread): with open(sizes, 'w') as fd: print('\n'.join(lines), file=fd) - # Write out the configuration files, with a special case for SPL - for dirname in ['', 'spl', 'tpl']: - self.CopyFiles(result.out_dir, build_dir, dirname, ['u-boot.cfg', - 'spl/u-boot-spl.cfg', 'tpl/u-boot-tpl.cfg', '.config', - 'include/autoconf.mk', 'include/generated/autoconf.h']) - - # Now write the actual build output - if keep_outputs: - self.CopyFiles(result.out_dir, build_dir, '', ['u-boot*', '*.bin', - '*.map', '*.img', 'MLO', 'SPL', 'include/autoconf.mk', - 'spl/u-boot-spl*']) + if not work_in_output: + # Write out the configuration files, with a special case for SPL + for dirname in ['', 'spl', 'tpl']: + self.CopyFiles( + result.out_dir, build_dir, dirname, + ['u-boot.cfg', 'spl/u-boot-spl.cfg', 'tpl/u-boot-tpl.cfg', + '.config', 'include/autoconf.mk', + 'include/generated/autoconf.h']) + + # Now write the actual build output + if keep_outputs: + self.CopyFiles( + result.out_dir, build_dir, '', + ['u-boot*', '*.bin', '*.map', '*.img', 'MLO', 'SPL', + 'include/autoconf.mk', 'spl/u-boot-spl*']) def CopyFiles(self, out_dir, build_dir, dirname, patterns): """Copy files from the build directory to the output. |