summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-02-16 17:43:45 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-02-20 16:45:25 +0000
commit95f236f668f641224144a527279e368e98e2e6bf (patch)
tree33b9226229a885ded1029c30a21770f1001a83ab
parent9ebd0a84e70294440445c8d2da382409f2dcadf9 (diff)
downloadpoky-95f236f668f641224144a527279e368e98e2e6bf.tar.gz
core-image-testmaster: Rename to core-image-testcontroller
Rename the image, the test controller class/code/module and the underlying image sentinel file to all match the controller terminology. (From OE-Core rev: f87b32833ac5327c4659ab8c06af34e7bda83f83) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/conf/distro/include/distro_alias.inc4
-rw-r--r--meta/conf/distro/include/maintainers.inc4
-rw-r--r--meta/lib/oeqa/controllers/controllerimage.py (renamed from meta/lib/oeqa/controllers/masterimage.py)44
-rw-r--r--meta/lib/oeqa/runtime/cases/ssh.py4
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh2
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install-testfs.sh2
-rw-r--r--meta/recipes-extended/images/core-image-testcontroller-initramfs.bb (renamed from meta/recipes-extended/images/core-image-testmaster-initramfs.bb)2
-rw-r--r--meta/recipes-extended/images/core-image-testcontroller.bb (renamed from meta/recipes-extended/images/core-image-testmaster.bb)4
8 files changed, 33 insertions, 33 deletions
diff --git a/meta/conf/distro/include/distro_alias.inc b/meta/conf/distro/include/distro_alias.inc
index 44bc3bf131..e43c0acd80 100644
--- a/meta/conf/distro/include/distro_alias.inc
+++ b/meta/conf/distro/include/distro_alias.inc
@@ -42,8 +42,8 @@ DISTRO_PN_ALIAS:pn-core-image-rt-sdk = "OE-Core"
42DISTRO_PN_ALIAS:pn-core-image-sato = "OE-Core" 42DISTRO_PN_ALIAS:pn-core-image-sato = "OE-Core"
43DISTRO_PN_ALIAS:pn-core-image-sato-dev = "OE-Core" 43DISTRO_PN_ALIAS:pn-core-image-sato-dev = "OE-Core"
44DISTRO_PN_ALIAS:pn-core-image-sato-sdk = "OE-Core" 44DISTRO_PN_ALIAS:pn-core-image-sato-sdk = "OE-Core"
45DISTRO_PN_ALIAS:pn-core-image-testmaster = "OE-Core" 45DISTRO_PN_ALIAS:pn-core-image-testcontroller = "OE-Core"
46DISTRO_PN_ALIAS:pn-core-image-testmaster-initramfs = "OE-Core" 46DISTRO_PN_ALIAS:pn-core-image-testcontroller-initramfs = "OE-Core"
47DISTRO_PN_ALIAS:pn-core-image-weston = "OE-Core" 47DISTRO_PN_ALIAS:pn-core-image-weston = "OE-Core"
48DISTRO_PN_ALIAS:pn-core-image-x11 = "OE-Core" 48DISTRO_PN_ALIAS:pn-core-image-x11 = "OE-Core"
49DISTRO_PN_ALIAS:pn-createrepo-c = "Fedora=createrepo_c Clear=createrepo_c" 49DISTRO_PN_ALIAS:pn-createrepo-c = "Fedora=createrepo_c Clear=createrepo_c"
diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
index 32ec391eb9..740e5fe55c 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -112,8 +112,8 @@ RECIPE_MAINTAINER:pn-core-image-ptest-all = "Richard Purdie <richard.purdie@linu
112RECIPE_MAINTAINER:pn-core-image-ptest-fast = "Richard Purdie <richard.purdie@linuxfoundation.org>" 112RECIPE_MAINTAINER:pn-core-image-ptest-fast = "Richard Purdie <richard.purdie@linuxfoundation.org>"
113RECIPE_MAINTAINER:pn-core-image-sato = "Richard Purdie <richard.purdie@linuxfoundation.org>" 113RECIPE_MAINTAINER:pn-core-image-sato = "Richard Purdie <richard.purdie@linuxfoundation.org>"
114RECIPE_MAINTAINER:pn-core-image-sato-sdk = "Richard Purdie <richard.purdie@linuxfoundation.org>" 114RECIPE_MAINTAINER:pn-core-image-sato-sdk = "Richard Purdie <richard.purdie@linuxfoundation.org>"
115RECIPE_MAINTAINER:pn-core-image-testmaster-initramfs = "Richard Purdie <richard.purdie@linuxfoundation.org>" 115RECIPE_MAINTAINER:pn-core-image-testcontroller-initramfs = "Richard Purdie <richard.purdie@linuxfoundation.org>"
116RECIPE_MAINTAINER:pn-core-image-testmaster = "Richard Purdie <richard.purdie@linuxfoundation.org>" 116RECIPE_MAINTAINER:pn-core-image-testcontroller = "Richard Purdie <richard.purdie@linuxfoundation.org>"
117RECIPE_MAINTAINER:pn-core-image-weston = "Richard Purdie <richard.purdie@linuxfoundation.org>" 117RECIPE_MAINTAINER:pn-core-image-weston = "Richard Purdie <richard.purdie@linuxfoundation.org>"
118RECIPE_MAINTAINER:pn-core-image-weston-sdk = "Richard Purdie <richard.purdie@linuxfoundation.org>" 118RECIPE_MAINTAINER:pn-core-image-weston-sdk = "Richard Purdie <richard.purdie@linuxfoundation.org>"
119RECIPE_MAINTAINER:pn-core-image-x11 = "Richard Purdie <richard.purdie@linuxfoundation.org>" 119RECIPE_MAINTAINER:pn-core-image-x11 = "Richard Purdie <richard.purdie@linuxfoundation.org>"
diff --git a/meta/lib/oeqa/controllers/masterimage.py b/meta/lib/oeqa/controllers/controllerimage.py
index 0bf5917e48..78a4aaff87 100644
--- a/meta/lib/oeqa/controllers/masterimage.py
+++ b/meta/lib/oeqa/controllers/controllerimage.py
@@ -3,13 +3,13 @@
3# SPDX-License-Identifier: MIT 3# SPDX-License-Identifier: MIT
4# 4#
5# This module adds support to testimage.bbclass to deploy images and run 5# This module adds support to testimage.bbclass to deploy images and run
6# tests using a "master image" - this is a "known good" image that is 6# tests using a "controller image" - this is a "known good" image that is
7# installed onto the device as part of initial setup and will be booted into 7# installed onto the device as part of initial setup and will be booted into
8# with no interaction; we can then use it to deploy the image to be tested 8# with no interaction; we can then use it to deploy the image to be tested
9# to a second partition before running the tests. 9# to a second partition before running the tests.
10# 10#
11# For an example master image, see core-image-testmaster 11# For an example controller image, see core-image-testcontroller
12# (meta/recipes-extended/images/core-image-testmaster.bb) 12# (meta/recipes-extended/images/core-image-testcontroller.bb)
13 13
14import os 14import os
15import bb 15import bb
@@ -24,12 +24,12 @@ from oeqa.utils import CommandError
24 24
25from abc import ABCMeta, abstractmethod 25from abc import ABCMeta, abstractmethod
26 26
27class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta): 27class ControllerImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta):
28 28
29 supported_image_fstypes = ['tar.gz', 'tar.bz2'] 29 supported_image_fstypes = ['tar.gz', 'tar.bz2']
30 30
31 def __init__(self, d): 31 def __init__(self, d):
32 super(MasterImageHardwareTarget, self).__init__(d) 32 super(ControllerImageHardwareTarget, self).__init__(d)
33 33
34 # target ip 34 # target ip
35 addr = d.getVar("TEST_TARGET_IP") or bb.fatal('Please set TEST_TARGET_IP with the IP address of the machine you want to run the tests on.') 35 addr = d.getVar("TEST_TARGET_IP") or bb.fatal('Please set TEST_TARGET_IP with the IP address of the machine you want to run the tests on.')
@@ -61,8 +61,8 @@ class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta
61 if not os.path.isfile(self.kernel): 61 if not os.path.isfile(self.kernel):
62 bb.fatal("No kernel found. Expected path: %s" % self.kernel) 62 bb.fatal("No kernel found. Expected path: %s" % self.kernel)
63 63
64 # master ssh connection 64 # controller ssh connection
65 self.master = None 65 self.controller = None
66 # if the user knows what they are doing, then by all means... 66 # if the user knows what they are doing, then by all means...
67 self.user_cmds = d.getVar("TEST_DEPLOY_CMDS") 67 self.user_cmds = d.getVar("TEST_DEPLOY_CMDS")
68 self.deploy_cmds = None 68 self.deploy_cmds = None
@@ -119,19 +119,19 @@ class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta
119 119
120 def deploy(self): 120 def deploy(self):
121 # base class just sets the ssh log file for us 121 # base class just sets the ssh log file for us
122 super(MasterImageHardwareTarget, self).deploy() 122 super(ControllerImageHardwareTarget, self).deploy()
123 self.master = sshcontrol.SSHControl(ip=self.ip, logfile=self.sshlog, timeout=600, port=self.port) 123 self.controller = sshcontrol.SSHControl(ip=self.ip, logfile=self.sshlog, timeout=600, port=self.port)
124 status, output = self.master.run("cat /etc/masterimage") 124 status, output = self.controller.run("cat /etc/controllerimage")
125 if status != 0: 125 if status != 0:
126 # We're not booted into the master image, so try rebooting 126 # We're not booted into the controller image, so try rebooting
127 bb.plain("%s - booting into the master image" % self.pn) 127 bb.plain("%s - booting into the controller image" % self.pn)
128 self.power_ctl("cycle") 128 self.power_ctl("cycle")
129 self._wait_until_booted() 129 self._wait_until_booted()
130 130
131 bb.plain("%s - deploying image on target" % self.pn) 131 bb.plain("%s - deploying image on target" % self.pn)
132 status, output = self.master.run("cat /etc/masterimage") 132 status, output = self.controller.run("cat /etc/controllerimage")
133 if status != 0: 133 if status != 0:
134 bb.fatal("No ssh connectivity or target isn't running a master image.\n%s" % output) 134 bb.fatal("No ssh connectivity or target isn't running a controller image.\n%s" % output)
135 if self.user_cmds: 135 if self.user_cmds:
136 self.deploy_cmds = self.user_cmds.split("\n") 136 self.deploy_cmds = self.user_cmds.split("\n")
137 try: 137 try:
@@ -156,10 +156,10 @@ class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta
156 156
157 def stop(self): 157 def stop(self):
158 bb.plain("%s - reboot/powercycle target" % self.pn) 158 bb.plain("%s - reboot/powercycle target" % self.pn)
159 self.power_cycle(self.master) 159 self.power_cycle(self.controller)
160 160
161 161
162class SystemdbootTarget(MasterImageHardwareTarget): 162class SystemdbootTarget(ControllerImageHardwareTarget):
163 163
164 def __init__(self, d): 164 def __init__(self, d):
165 super(SystemdbootTarget, self).__init__(d) 165 super(SystemdbootTarget, self).__init__(d)
@@ -184,16 +184,16 @@ class SystemdbootTarget(MasterImageHardwareTarget):
184 184
185 def _deploy(self): 185 def _deploy(self):
186 # make sure these aren't mounted 186 # make sure these aren't mounted
187 self.master.run("umount /boot; umount /mnt/testrootfs; umount /sys/firmware/efi/efivars;") 187 self.controller.run("umount /boot; umount /mnt/testrootfs; umount /sys/firmware/efi/efivars;")
188 # from now on, every deploy cmd should return 0 188 # from now on, every deploy cmd should return 0
189 # else an exception will be thrown by sshcontrol 189 # else an exception will be thrown by sshcontrol
190 self.master.ignore_status = False 190 self.controller.ignore_status = False
191 self.master.copy_to(self.rootfs, "~/test-rootfs." + self.image_fstype) 191 self.controller.copy_to(self.rootfs, "~/test-rootfs." + self.image_fstype)
192 self.master.copy_to(self.kernel, "~/test-kernel") 192 self.controller.copy_to(self.kernel, "~/test-kernel")
193 for cmd in self.deploy_cmds: 193 for cmd in self.deploy_cmds:
194 self.master.run(cmd) 194 self.controller.run(cmd)
195 195
196 def _start(self, params=None): 196 def _start(self, params=None):
197 self.power_cycle(self.master) 197 self.power_cycle(self.controller)
198 # there are better ways than a timeout but this should work for now 198 # there are better ways than a timeout but this should work for now
199 time.sleep(120) 199 time.sleep(120)
diff --git a/meta/lib/oeqa/runtime/cases/ssh.py b/meta/lib/oeqa/runtime/cases/ssh.py
index 60a5fbbfbf..e31224b3af 100644
--- a/meta/lib/oeqa/runtime/cases/ssh.py
+++ b/meta/lib/oeqa/runtime/cases/ssh.py
@@ -13,7 +13,7 @@ class SSHTest(OERuntimeTestCase):
13 def test_ssh(self): 13 def test_ssh(self):
14 (status, output) = self.target.run('uname -a') 14 (status, output) = self.target.run('uname -a')
15 self.assertEqual(status, 0, msg='SSH Test failed: %s' % output) 15 self.assertEqual(status, 0, msg='SSH Test failed: %s' % output)
16 (status, output) = self.target.run('cat /etc/masterimage') 16 (status, output) = self.target.run('cat /etc/controllerimage')
17 msg = "This isn't the right image - /etc/masterimage " \ 17 msg = "This isn't the right image - /etc/controllerimage " \
18 "shouldn't be here %s" % output 18 "shouldn't be here %s" % output
19 self.assertEqual(status, 1, msg=msg) 19 self.assertEqual(status, 1, msg=msg)
diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh b/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh
index b351985a61..1fcd29e54c 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh
@@ -133,7 +133,7 @@ mount -o rw,loop,noatime,nodiratime /run/media/$1/$2 /rootmnt
133echo "Copying rootfs files..." 133echo "Copying rootfs files..."
134cp -a /rootmnt/* /ssd 134cp -a /rootmnt/* /ssd
135 135
136touch /ssd/etc/masterimage 136touch /ssd/etc/controllerimage
137 137
138if [ -d /ssd/etc/ ] ; then 138if [ -d /ssd/etc/ ] ; then
139 # We dont want udev to mount our root device while we're booting... 139 # We dont want udev to mount our root device while we're booting...
diff --git a/meta/recipes-core/initrdscripts/files/init-install-testfs.sh b/meta/recipes-core/initrdscripts/files/init-install-testfs.sh
index ac62160528..7b49001659 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-testfs.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-testfs.sh
@@ -158,7 +158,7 @@ mount -o rw,loop,noatime,nodiratime /run/media/$1/$2 /src_root
158echo "Copying rootfs files..." 158echo "Copying rootfs files..."
159cp -a /src_root/* /tgt_root 159cp -a /src_root/* /tgt_root
160 160
161touch /tgt_root/etc/masterimage 161touch /tgt_root/etc/controllerimage
162 162
163if [ -d /tgt_root/etc/ ] ; then 163if [ -d /tgt_root/etc/ ] ; then
164 echo "$bootfs /boot ext3 defaults 1 2" >> /tgt_root/etc/fstab 164 echo "$bootfs /boot ext3 defaults 1 2" >> /tgt_root/etc/fstab
diff --git a/meta/recipes-extended/images/core-image-testmaster-initramfs.bb b/meta/recipes-extended/images/core-image-testcontroller-initramfs.bb
index 1a2e0af27b..2bc035a538 100644
--- a/meta/recipes-extended/images/core-image-testmaster-initramfs.bb
+++ b/meta/recipes-extended/images/core-image-testcontroller-initramfs.bb
@@ -7,7 +7,7 @@ PACKAGE_INSTALL = "initramfs-live-boot initramfs-live-install-testfs initramfs-l
7# Do not pollute the initrd image with rootfs features 7# Do not pollute the initrd image with rootfs features
8IMAGE_FEATURES = "" 8IMAGE_FEATURES = ""
9 9
10export IMAGE_BASENAME = "core-image-testmaster-initramfs" 10export IMAGE_BASENAME = "core-image-testcontroller-initramfs"
11IMAGE_NAME_SUFFIX ?= "" 11IMAGE_NAME_SUFFIX ?= ""
12IMAGE_LINGUAS = "" 12IMAGE_LINGUAS = ""
13 13
diff --git a/meta/recipes-extended/images/core-image-testmaster.bb b/meta/recipes-extended/images/core-image-testcontroller.bb
index 0faf18f5a4..20edbd5630 100644
--- a/meta/recipes-extended/images/core-image-testmaster.bb
+++ b/meta/recipes-extended/images/core-image-testcontroller.bb
@@ -1,4 +1,4 @@
1DESCRIPTION = "A master image to be deployed on a target useful for testing other images" 1DESCRIPTION = "A test controller image to be deployed on a target useful for testing other images using the OEQA runtime tests"
2 2
3IMAGE_FEATURES += "ssh-server-openssh package-management" 3IMAGE_FEATURES += "ssh-server-openssh package-management"
4 4
@@ -14,5 +14,5 @@ IMAGE_INSTALL += "\
14# we need a particular initramfs for live images 14# we need a particular initramfs for live images
15# that pulls custom install scripts which take 15# that pulls custom install scripts which take
16# care of partitioning for us 16# care of partitioning for us
17INITRD_IMAGE = "core-image-testmaster-initramfs" 17INITRD_IMAGE = "core-image-testcontroller-initramfs"
18 18