Message ID | 20241211172648.2893097-30-berrange@redhat.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | tests/functional: various improvements wrt assets/scratch files | expand |
On 11/12/2024 18.26, Daniel P. Berrangé wrote: > All usage has been replaced by direct 'subprocess' helpers. > > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> > --- > tests/functional/qemu_test/__init__.py | 2 +- > tests/functional/qemu_test/cmd.py | 11 ----------- > 2 files changed, 1 insertion(+), 12 deletions(-) Reviewed-by: Thomas Huth <thuth@redhat.com>
diff --git a/tests/functional/qemu_test/__init__.py b/tests/functional/qemu_test/__init__.py index 3bd043e608..da1830286d 100644 --- a/tests/functional/qemu_test/__init__.py +++ b/tests/functional/qemu_test/__init__.py @@ -8,7 +8,7 @@ from .asset import Asset from .config import BUILD_DIR -from .cmd import run_cmd, is_readable_executable_file, \ +from .cmd import is_readable_executable_file, \ interrupt_interactive_console_until_pattern, wait_for_console_pattern, \ exec_command, exec_command_and_wait_for_pattern, get_qemu_img, which from .testcase import QemuBaseTest, QemuUserTest, QemuSystemTest diff --git a/tests/functional/qemu_test/cmd.py b/tests/functional/qemu_test/cmd.py index c8971de00a..dc5f422b77 100644 --- a/tests/functional/qemu_test/cmd.py +++ b/tests/functional/qemu_test/cmd.py @@ -14,7 +14,6 @@ import logging import os import os.path -import subprocess def which(tool): @@ -28,16 +27,6 @@ def which(tool): return p return None -def run_cmd(args): - subp = subprocess.Popen(args, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - universal_newlines=True) - stdout, stderr = subp.communicate() - ret = subp.returncode - - return (stdout, stderr, ret) - def is_readable_executable_file(path): return os.path.isfile(path) and os.access(path, os.R_OK | os.X_OK)
All usage has been replaced by direct 'subprocess' helpers. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> --- tests/functional/qemu_test/__init__.py | 2 +- tests/functional/qemu_test/cmd.py | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-)