mirror of
https://git.yoctoproject.org/poky
synced 2026-02-20 08:29:42 +01:00
selftest/runqemu: reenable the nfs rootfs test
With the previous fixes the test can be run again, and it doesn't need all those extra steps. Runqemu takes care of everything automatically now. (From OE-Core rev: 99083d01bd576eee7c2c569c66042d064c193a9a) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
18fc5fb41a
commit
49d114e33e
@@ -199,22 +199,12 @@ class QemuTest(OESelftestTestCase):
|
||||
qemu_shutdown_succeeded = self._start_qemu_shutdown_check_if_shutdown_succeeded(qemu, shutdown_timeout)
|
||||
self.assertTrue(qemu_shutdown_succeeded, 'Failed: %s does not shutdown within timeout(%s)' % (self.machine, shutdown_timeout))
|
||||
|
||||
# Need to have portmap/rpcbind running to allow this test to work and
|
||||
# current autobuilder setup does not have this.
|
||||
def disabled_test_qemu_can_boot_nfs_and_shutdown(self):
|
||||
self.assertExists(self.qemuboot_conf)
|
||||
bitbake('meta-ide-support')
|
||||
def test_qemu_can_boot_nfs_and_shutdown(self):
|
||||
rootfs_tar = "%s-%s.tar.bz2" % (self.recipe, self.machine)
|
||||
rootfs_tar = os.path.join(self.deploy_dir_image, rootfs_tar)
|
||||
self.assertExists(rootfs_tar)
|
||||
tmpdir = tempfile.mkdtemp(prefix='qemu_nfs')
|
||||
tmpdir_nfs = os.path.join(tmpdir, 'nfs')
|
||||
cmd_extract_nfs = 'runqemu-extract-sdk %s %s' % (rootfs_tar, tmpdir_nfs)
|
||||
result = runCmd(cmd_extract_nfs)
|
||||
self.assertEqual(0, result.status, "runqemu-extract-sdk didn't run as expected. %s" % result.output)
|
||||
cmd = "%s nfs %s %s" % (self.cmd_common, self.qemuboot_conf, tmpdir_nfs)
|
||||
cmd = "%s %s" % (self.cmd_common, rootfs_tar)
|
||||
shutdown_timeout = 120
|
||||
with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu:
|
||||
qemu_shutdown_succeeded = self._start_qemu_shutdown_check_if_shutdown_succeeded(qemu, shutdown_timeout)
|
||||
self.assertTrue(qemu_shutdown_succeeded, 'Failed: %s does not shutdown within timeout(%s)' % (self.machine, shutdown_timeout))
|
||||
runCmd('rm -rf %s' % tmpdir)
|
||||
|
||||
Reference in New Issue
Block a user