[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 29/32] tests/functional: remove now unused 'run_cmd' helper
From: |
Daniel P . Berrangé |
Subject: |
[PATCH v3 29/32] tests/functional: remove now unused 'run_cmd' helper |
Date: |
Tue, 17 Dec 2024 15:59:50 +0000 |
All usage has been replaced by direct 'subprocess' helpers.
Reviewed-by: Thomas Huth <thuth@redhat.com>
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(-)
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)
--
2.46.0
- [PATCH v3 22/32] tests/functional: add 'archive_extract' to QemuBaseTest, (continued)
- [PATCH v3 22/32] tests/functional: add 'archive_extract' to QemuBaseTest, Daniel P . Berrangé, 2024/12/17
- [PATCH v3 23/32] tests/functional: convert tests to new archive_extract helper, Daniel P . Berrangé, 2024/12/17
- [PATCH v3 15/32] tests/functional: remove redundant 'rmtree' call, Daniel P . Berrangé, 2024/12/17
- [PATCH v3 19/32] tests/functional: add common deb_extract helper, Daniel P . Berrangé, 2024/12/17
- [PATCH v3 24/32] tests/functional: add a generalized uncompress helper, Daniel P . Berrangé, 2024/12/17
- [PATCH v3 21/32] tests/functional: add a generalized archive_extract, Daniel P . Berrangé, 2024/12/17
- [PATCH v3 25/32] tests/functional: add 'uncompress' to QemuBaseTest, Daniel P . Berrangé, 2024/12/17
- [PATCH v3 26/32] tests/functional: convert tests to new uncompress helper, Daniel P . Berrangé, 2024/12/17
- [PATCH v3 27/32] tests/functional: drop back compat imports from utils.py, Daniel P . Berrangé, 2024/12/17
- [PATCH v3 28/32] tests/functional: replace 'run_cmd' with subprocess helpers, Daniel P . Berrangé, 2024/12/17
- [PATCH v3 29/32] tests/functional: remove now unused 'run_cmd' helper,
Daniel P . Berrangé <=
- [PATCH v3 30/32] tests/functional: skip tests if assets are not available, Daniel P . Berrangé, 2024/12/17
- [PATCH v3 32/32] MAINTAINERS: add myself as reviewer for functional test suite, Daniel P . Berrangé, 2024/12/17
- [PATCH v3 31/32] tests/functional: ignore errors when caching assets, except for 404, Daniel P . Berrangé, 2024/12/17