mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 20:33:54 -06:00
tests/functional: remove now unused 'run_cmd' helper
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> Message-ID: <20241217155953.3950506-30-berrange@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
37e9b19c34
commit
c5be9dd32f
2 changed files with 1 additions and 12 deletions
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
from .asset import Asset
|
from .asset import Asset
|
||||||
from .config import BUILD_DIR
|
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, \
|
interrupt_interactive_console_until_pattern, wait_for_console_pattern, \
|
||||||
exec_command, exec_command_and_wait_for_pattern, get_qemu_img, which
|
exec_command, exec_command_and_wait_for_pattern, get_qemu_img, which
|
||||||
from .testcase import QemuBaseTest, QemuUserTest, QemuSystemTest
|
from .testcase import QemuBaseTest, QemuUserTest, QemuSystemTest
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
import subprocess
|
|
||||||
|
|
||||||
|
|
||||||
def which(tool):
|
def which(tool):
|
||||||
|
@ -28,16 +27,6 @@ def which(tool):
|
||||||
return p
|
return p
|
||||||
return None
|
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):
|
def is_readable_executable_file(path):
|
||||||
return os.path.isfile(path) and os.access(path, os.R_OK | os.X_OK)
|
return os.path.isfile(path) and os.access(path, os.R_OK | os.X_OK)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue