cros_build_lib: rename RunCommand to run
This aligns with the new subprocess.run API.
RunCommand -> run.
SudoRunCommand -> sudo_run.
DebugRunCommand -> dbg_run.
BUG=chromium:1006587
TEST=`./run_tests` passes
Change-Id: I78ebd4e08176d7874b3d3fe537b6ceb292b0241b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/1818782
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Chris McDonald <cjmcdonald@chromium.org>
diff --git a/api/controller/test.py b/api/controller/test.py
index dc58e6e..2a115d7 100644
--- a/api/controller/test.py
+++ b/api/controller/test.py
@@ -104,7 +104,7 @@
def ChromiteUnitTest(_input_proto, _output_proto, _config):
"""Run the chromite unit tests."""
cmd = [os.path.join(constants.CHROMITE_DIR, 'scripts', 'run_tests')]
- result = cros_build_lib.RunCommand(cmd, error_code_ok=True)
+ result = cros_build_lib.run(cmd, error_code_ok=True)
if result.returncode == 0:
return controller.RETURN_CODE_SUCCESS
else:
@@ -142,7 +142,7 @@
with osutils.TempDir(prefix='vm-test-results.') as results_dir:
cmd.extend(['--results-dir', results_dir])
- cros_build_lib.RunCommand(cmd, kill_timeout=10 * 60)
+ cros_build_lib.run(cmd, kill_timeout=10 * 60)
@faux.all_empty
@@ -189,6 +189,6 @@
"""Run the cros-signing unit tests."""
test_runner = os.path.join(constants.SOURCE_ROOT, 'cros-signing', 'signer',
'run_tests.py')
- result = cros_build_lib.RunCommand([test_runner], error_code_ok=True)
+ result = cros_build_lib.run([test_runner], error_code_ok=True)
return result.returncode