From: Uladzimir Bely <ubely@ilbers.de>
To: isar-users@googlegroups.com
Subject: [PATCH 6/8] citest.py: Adapt tests to qemu reuse
Date: Fri, 18 Aug 2023 09:07:04 +0200 [thread overview]
Message-ID: <20230818070706.27913-7-ubely@ilbers.de> (raw)
In-Reply-To: <20230818070706.27913-1-ubely@ilbers.de>
Reusing the same qemu machine in several tests requires stopping
the VM by the last one.
Adapt testsuite top level to fit this requirement.
Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
---
testsuite/citest.py | 136 +++++++++++++++++++++++++-------------------
1 file changed, 79 insertions(+), 57 deletions(-)
diff --git a/testsuite/citest.py b/testsuite/citest.py
index 461b26c1..0cfb46ff 100755
--- a/testsuite/citest.py
+++ b/testsuite/citest.py
@@ -61,16 +61,18 @@ class DevTest(CIBaseTest):
def test_dev_run_amd64_bullseye(self):
self.init()
- self.vm_start('amd64', 'bullseye', \
- image='isar-image-ci')
+ self.vm_start('amd64', 'bullseye', image='isar-image-ci',
+ stop_vm=True)
def test_dev_run_arm64_bullseye(self):
self.init()
- self.vm_start('arm64', 'bullseye')
+ self.vm_start('arm64', 'bullseye',
+ stop_vm=True)
def test_dev_run_arm_bullseye(self):
self.init()
- self.vm_start('arm', 'bullseye', skip_modulecheck=True)
+ self.vm_start('arm', 'bullseye', skip_modulecheck=True,
+ stop_vm=True)
class ReproTest(CIBaseTest):
@@ -300,7 +302,9 @@ class SingleTest(CIBaseTest):
machine = self.params.get('machine', default='qemuamd64')
distro = self.params.get('distro', default='bullseye')
- self.vm_start(machine.removeprefix('qemu'), distro)
+ self.vm_start(machine.removeprefix('qemu'), distro,
+ stop_vm=True)
+
class VmBootTestFast(CIBaseTest):
@@ -309,50 +313,54 @@ class VmBootTestFast(CIBaseTest):
:avocado: tags=startvm,fast
"""
+
def test_arm_bullseye(self):
self.init()
- self.vm_start('arm','bullseye', \
- image='isar-image-ci')
+ self.vm_start('arm','bullseye', image='isar-image-ci')
def test_arm_bullseye_example_module(self):
self.init()
- self.vm_start('arm','bullseye', \
- image='isar-image-ci', cmd='lsmod | grep example_module')
+ self.vm_start('arm','bullseye', image='isar-image-ci',
+ cmd='lsmod | grep example_module')
def test_arm_bullseye_getty_target(self):
self.init()
- self.vm_start('arm','bullseye', \
- image='isar-image-ci', script='test_getty_target.sh')
+ self.vm_start('arm','bullseye', image='isar-image-ci',
+ script='test_getty_target.sh',
+ stop_vm=True)
+
def test_arm_buster(self):
self.init()
- self.vm_start('arm','buster', \
- image='isar-image-ci')
+ self.vm_start('arm','buster', image='isar-image-ci')
def test_arm_buster_getty_target(self):
self.init()
- self.vm_start('arm','buster', \
- image='isar-image-ci', cmd='systemctl is-active getty.target')
+ self.vm_start('arm','buster', image='isar-image-ci',
+ cmd='systemctl is-active getty.target')
def test_arm_buster_example_module(self):
self.init()
- self.vm_start('arm','buster', \
- image='isar-image-ci', script='test_example_module.sh')
+ self.vm_start('arm','buster', image='isar-image-ci',
+ script='test_example_module.sh',
+ stop_vm=True)
+
def test_arm_bookworm(self):
self.init()
- self.vm_start('arm','bookworm', \
- image='isar-image-ci')
+ self.vm_start('arm','bookworm', image='isar-image-ci')
def test_arm_bookworm_example_module(self):
self.init()
- self.vm_start('arm','bookworm', \
- image='isar-image-ci', cmd='lsmod | grep example_module')
+ self.vm_start('arm','bookworm', image='isar-image-ci',
+ cmd='lsmod | grep example_module')
def test_arm_bookworm_getty_target(self):
self.init()
- self.vm_start('arm','bookworm', \
- image='isar-image-ci', script='test_getty_target.sh')
+ self.vm_start('arm','bookworm', image='isar-image-ci',
+ script='test_getty_target.sh',
+ stop_vm=True)
+
class VmBootTestFull(CIBaseTest):
@@ -361,92 +369,106 @@ class VmBootTestFull(CIBaseTest):
:avocado: tags=startvm,full
"""
+
def test_arm_bullseye(self):
self.init()
- self.vm_start('arm','bullseye')
+ self.vm_start('arm','bullseye',
+ stop_vm=True)
+
def test_arm_buster(self):
self.init()
- self.vm_start('arm','buster', \
- image='isar-image-ci')
+ self.vm_start('arm','buster', image='isar-image-ci')
def test_arm_buster_example_module(self):
self.init()
- self.vm_start('arm','buster', \
- image='isar-image-ci', cmd='lsmod | grep example_module')
+ self.vm_start('arm','buster', image='isar-image-ci',
+ cmd='lsmod | grep example_module')
def test_arm_buster_getty_target(self):
self.init()
- self.vm_start('arm','buster', \
- image='isar-image-ci', script='test_getty_target.sh')
+ self.vm_start('arm','buster', image='isar-image-ci',
+ script='test_getty_target.sh',
+ stop_vm=True)
+
def test_arm64_bullseye(self):
self.init()
- self.vm_start('arm64','bullseye', \
- image='isar-image-ci')
+ self.vm_start('arm64','bullseye', image='isar-image-ci')
def test_arm64_bullseye_getty_target(self):
self.init()
- self.vm_start('arm64','bullseye', \
- image='isar-image-ci', cmd='systemctl is-active getty.target')
+ self.vm_start('arm64','bullseye', image='isar-image-ci',
+ cmd='systemctl is-active getty.target')
def test_arm64_bullseye_example_module(self):
self.init()
- self.vm_start('arm64','bullseye', \
- image='isar-image-ci', script='test_example_module.sh')
+ self.vm_start('arm64','bullseye', image='isar-image-ci',
+ script='test_example_module.sh',
+ stop_vm=True)
+
def test_i386_buster(self):
self.init()
- self.vm_start('i386','buster')
+ self.vm_start('i386','buster',
+ stop_vm=True)
+
def test_amd64_buster(self):
self.init()
# test efi boot
- self.vm_start('amd64','buster', \
- image='isar-image-ci')
+ self.vm_start('amd64','buster', image='isar-image-ci',
+ stop_vm=True)
# test pcbios boot
- self.vm_start('amd64', 'buster', True, \
- image='isar-image-ci')
+ self.vm_start('amd64', 'buster', True, image='isar-image-ci',
+ stop_vm=True)
+
def test_amd64_focal(self):
self.init()
- self.vm_start('amd64','focal', \
- image='isar-image-ci')
+ self.vm_start('amd64','focal', image='isar-image-ci')
def test_amd64_focal_example_module(self):
self.init()
- self.vm_start('amd64','focal', \
- image='isar-image-ci', cmd='lsmod | grep example_module')
+ self.vm_start('amd64','focal', image='isar-image-ci',
+ cmd='lsmod | grep example_module')
def test_amd64_focal_getty_target(self):
self.init()
- self.vm_start('amd64','focal', \
- image='isar-image-ci', script='test_getty_target.sh')
+ self.vm_start('amd64','focal', image='isar-image-ci',
+ script='test_getty_target.sh',
+ stop_vm=True)
+
def test_amd64_bookworm(self):
self.init()
- self.vm_start('amd64', 'bookworm', image='isar-image-ci')
+ self.vm_start('amd64', 'bookworm', image='isar-image-ci',
+ stop_vm=True)
+
def test_arm_bookworm(self):
self.init()
- self.vm_start('arm','bookworm', \
- image='isar-image-ci')
+ self.vm_start('arm','bookworm', image='isar-image-ci',
+ stop_vm=True)
+
def test_i386_bookworm(self):
self.init()
- self.vm_start('i386','bookworm')
+ self.vm_start('i386','bookworm',
+ stop_vm=True)
+
def test_mipsel_bookworm(self):
self.init()
- self.vm_start('mipsel','bookworm', \
- image='isar-image-ci')
+ self.vm_start('mipsel','bookworm', image='isar-image-ci')
def test_mipsel_bookworm_getty_target(self):
self.init()
- self.vm_start('mipsel','bookworm', \
- image='isar-image-ci', cmd='systemctl is-active getty.target')
+ self.vm_start('mipsel','bookworm', image='isar-image-ci',
+ cmd='systemctl is-active getty.target')
def test_mipsel_bookworm_example_module(self):
self.init()
- self.vm_start('mipsel','bookworm', \
- image='isar-image-ci', script='test_example_module.sh')
+ self.vm_start('mipsel','bookworm', image='isar-image-ci',
+ script='test_example_module.sh',
+ stop_vm=True)
--
2.20.1
next prev parent reply other threads:[~2023-08-18 7:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-18 7:06 [PATCH 0/8] Testsuite improvements for SSH-based tests Uladzimir Bely
2023-08-18 7:06 ` [PATCH 1/8] cibuilder.py: Support custom arguments passing to CI scripts Uladzimir Bely
2023-08-18 7:07 ` [PATCH 2/8] meta-isar: Add more extra space to qemu ext4 images Uladzimir Bely
2023-08-18 7:07 ` [PATCH 3/8] cibuilder.py: Split vm_start function to smaller subfunctions Uladzimir Bely
2023-08-18 7:07 ` [PATCH 4/8] cibuilder.py: Simplify remote_run command Uladzimir Bely
2023-08-18 7:07 ` [PATCH 5/8] cibuilder.py: Reuse the same qemu machine in ssh-based tests Uladzimir Bely
2023-08-18 7:07 ` Uladzimir Bely [this message]
2023-08-18 7:07 ` [PATCH 7/8] cibuilder.py: enable output from remote scripts Uladzimir Bely
2023-08-18 7:07 ` [PATCH 8/8] testsuite: Switch to remote scripts with arguments Uladzimir Bely
2023-08-24 15:34 ` [PATCH 0/8] Testsuite improvements for SSH-based tests Uladzimir Bely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230818070706.27913-7-ubely@ilbers.de \
--to=ubely@ilbers.de \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox