diff options
author | Simon Glass <sjg@chromium.org> | 2022-01-30 00:14:05 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2022-02-09 22:26:12 +0300 |
commit | d98006997c342435f906317758292fe97c520b47 (patch) | |
tree | f2ce4ee3b9e37f5a1b0b1f6ec09056a2d68c9437 /tools/buildman | |
parent | c1aa66e75dbfcacab1fbca0e3e19c09e08d932d5 (diff) | |
download | u-boot-d98006997c342435f906317758292fe97c520b47.tar.xz |
patman: Convert camel case in command.py
Convert this file to snake case and update all files which use it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/buildman')
-rw-r--r-- | tools/buildman/builder.py | 4 | ||||
-rw-r--r-- | tools/buildman/builderthread.py | 10 | ||||
-rw-r--r-- | tools/buildman/control.py | 2 | ||||
-rw-r--r-- | tools/buildman/func_test.py | 4 | ||||
-rw-r--r-- | tools/buildman/toolchain.py | 6 |
5 files changed, 13 insertions, 13 deletions
diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py index 720bbb2cf4..94f843e2a9 100644 --- a/tools/buildman/builder.py +++ b/tools/buildman/builder.py @@ -453,7 +453,7 @@ class Builder: stage: Stage that we are at (mrproper, config, build) cwd: Directory where make should be run args: Arguments to pass to make - kwargs: Arguments to pass to command.RunPipe() + kwargs: Arguments to pass to command.run_pipe() """ def check_output(stream, data): @@ -476,7 +476,7 @@ class Builder: self._restarting_config = False self._terminated = False cmd = [self.gnu_make] + list(args) - result = command.RunPipe([cmd], capture=True, capture_stderr=True, + result = command.run_pipe([cmd], capture=True, capture_stderr=True, cwd=cwd, raise_on_error=False, infile='/dev/null', output_func=check_output, **kwargs) diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py index ecb285c0bf..90099eee04 100644 --- a/tools/buildman/builderthread.py +++ b/tools/buildman/builderthread.py @@ -122,7 +122,7 @@ class BuilderThread(threading.Thread): config - called to configure for a board build - the main make invocation - it does the build args: A list of arguments to pass to 'make' - kwargs: A list of keyword arguments to pass to command.RunPipe() + kwargs: A list of keyword arguments to pass to command.run_pipe() Returns: CommandResult object @@ -375,7 +375,7 @@ class BuilderThread(threading.Thread): lines = [] for fname in BASE_ELF_FILENAMES: cmd = ['%snm' % self.toolchain.cross, '--size-sort', fname] - nm_result = command.RunPipe([cmd], capture=True, + nm_result = command.run_pipe([cmd], capture=True, capture_stderr=True, cwd=result.out_dir, raise_on_error=False, env=env) if nm_result.stdout: @@ -385,7 +385,7 @@ class BuilderThread(threading.Thread): print(nm_result.stdout, end=' ', file=fd) cmd = ['%sobjdump' % self.toolchain.cross, '-h', fname] - dump_result = command.RunPipe([cmd], capture=True, + dump_result = command.run_pipe([cmd], capture=True, capture_stderr=True, cwd=result.out_dir, raise_on_error=False, env=env) rodata_size = '' @@ -400,7 +400,7 @@ class BuilderThread(threading.Thread): rodata_size = fields[2] cmd = ['%ssize' % self.toolchain.cross, fname] - size_result = command.RunPipe([cmd], capture=True, + size_result = command.run_pipe([cmd], capture=True, capture_stderr=True, cwd=result.out_dir, raise_on_error=False, env=env) if size_result.stdout: @@ -411,7 +411,7 @@ class BuilderThread(threading.Thread): cmd = ['%sobjcopy' % self.toolchain.cross, '-O', 'binary', '-j', '.rodata.default_environment', 'env/built-in.o', 'uboot.env'] - command.RunPipe([cmd], capture=True, + command.run_pipe([cmd], capture=True, capture_stderr=True, cwd=result.out_dir, raise_on_error=False, env=env) ubootenv = os.path.join(result.out_dir, 'uboot.env') diff --git a/tools/buildman/control.py b/tools/buildman/control.py index e8a531eed4..ebab126adf 100644 --- a/tools/buildman/control.py +++ b/tools/buildman/control.py @@ -307,7 +307,7 @@ def DoBuildman(options, args, toolchains=None, make_func=None, boards=None, if not options.step: options.step = len(series.commits) - 1 - gnu_make = command.Output(os.path.join(options.git, + gnu_make = command.output(os.path.join(options.git, 'scripts/show-gnu-make'), raise_on_error=False).rstrip() if not gnu_make: sys.exit('GNU Make not found') diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py index b92081863e..4beca8aa7d 100644 --- a/tools/buildman/func_test.py +++ b/tools/buildman/func_test.py @@ -217,7 +217,7 @@ class TestFunctional(unittest.TestCase): self._toolchains.Add('gcc', test=False) def _RunBuildman(self, *args): - return command.RunPipe([[self._buildman_pathname] + list(args)], + return command.run_pipe([[self._buildman_pathname] + list(args)], capture=True, capture_stderr=True) def _RunControl(self, *args, boards=None, clean_dir=False, @@ -407,7 +407,7 @@ class TestFunctional(unittest.TestCase): stage: Stage that we are at (mrproper, config, build) cwd: Directory where make should be run args: Arguments to pass to make - kwargs: Arguments to pass to command.RunPipe() + kwargs: Arguments to pass to command.run_pipe() """ self._make_calls += 1 if stage == 'mrproper': diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py index d88c155b5f..3442d998ab 100644 --- a/tools/buildman/toolchain.py +++ b/tools/buildman/toolchain.py @@ -99,7 +99,7 @@ class Toolchain: else: self.priority = priority if test: - result = command.RunPipe([cmd], capture=True, env=env, + result = command.run_pipe([cmd], capture=True, env=env, raise_on_error=False) self.ok = result.return_code == 0 if verbose: @@ -494,7 +494,7 @@ class Toolchains: else URL containing this toolchain, if avaialble, else None """ - arch = command.OutputOneLine('uname', '-m') + arch = command.output_one_line('uname', '-m') if arch == 'aarch64': arch = 'arm64' base = 'https://www.kernel.org/pub/tools/crosstool/files/bin' @@ -525,7 +525,7 @@ class Toolchains: Directory name of the first entry in the archive, without the trailing / """ - stdout = command.Output('tar', 'xvfJ', fname, '-C', dest) + stdout = command.output('tar', 'xvfJ', fname, '-C', dest) dirs = stdout.splitlines()[1].split('/')[:2] return '/'.join(dirs) |