mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
tests/functional: switch over to using self.scratch_file()
Replace any instances of os.path.join(self.workdir, ".../...") self.workdir + "/.../..." with self.scratch_file("...", "...") which is more compact and portable Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20241217155953.3950506-15-berrange@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
bd96e460d3
commit
beaf88c895
45 changed files with 118 additions and 139 deletions
|
@ -6,8 +6,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
import os
|
||||
|
||||
from qemu_test import LinuxKernelTest, Asset
|
||||
from qemu_test import exec_command_and_wait_for_pattern
|
||||
from zipfile import ZipFile
|
||||
|
@ -27,7 +25,7 @@ class AST1030Machine(LinuxKernelTest):
|
|||
kernel_name = "ast1030-evb-demo/zephyr.elf"
|
||||
with ZipFile(zip_file, 'r') as zf:
|
||||
zf.extract(kernel_name, path=self.workdir)
|
||||
kernel_file = os.path.join(self.workdir, kernel_name)
|
||||
kernel_file = self.scratch_file(kernel_name)
|
||||
|
||||
self.vm.set_console()
|
||||
self.vm.add_args('-kernel', kernel_file, '-nographic')
|
||||
|
@ -49,7 +47,7 @@ class AST1030Machine(LinuxKernelTest):
|
|||
kernel_name = "ast1030-evb-demo/zephyr.bin"
|
||||
with ZipFile(zip_file, 'r') as zf:
|
||||
zf.extract(kernel_name, path=self.workdir)
|
||||
kernel_file = os.path.join(self.workdir, kernel_name)
|
||||
kernel_file = self.scratch_file(kernel_name)
|
||||
|
||||
self.vm.set_console()
|
||||
self.vm.add_args('-kernel', kernel_file, '-nographic')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue