]> code.ossystems Code Review - openembedded-core.git/commitdiff
core-image-testmaster: Rename to core-image-testcontroller
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 16 Feb 2022 17:43:45 +0000 (17:43 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 20 Feb 2022 16:43:38 +0000 (16:43 +0000)
Rename the image, the test controller class/code/module and the underlying
image sentinel file to all match the controller terminology.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/conf/distro/include/distro_alias.inc
meta/conf/distro/include/maintainers.inc
meta/lib/oeqa/controllers/controllerimage.py [moved from meta/lib/oeqa/controllers/masterimage.py with 84% similarity]
meta/lib/oeqa/runtime/cases/ssh.py
meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh
meta/recipes-core/initrdscripts/files/init-install-testfs.sh
meta/recipes-extended/images/core-image-testcontroller-initramfs.bb [moved from meta/recipes-extended/images/core-image-testmaster-initramfs.bb with 92% similarity]
meta/recipes-extended/images/core-image-testcontroller.bb [moved from meta/recipes-extended/images/core-image-testmaster.bb with 70% similarity]

index 44bc3bf131574ebea8fe13dd1e4989ed68caeecc..e43c0acd80c080cfeb9a230abeebfec2ca28327d 100644 (file)
@@ -42,8 +42,8 @@ DISTRO_PN_ALIAS:pn-core-image-rt-sdk = "OE-Core"
 DISTRO_PN_ALIAS:pn-core-image-sato = "OE-Core"
 DISTRO_PN_ALIAS:pn-core-image-sato-dev = "OE-Core"
 DISTRO_PN_ALIAS:pn-core-image-sato-sdk = "OE-Core"
-DISTRO_PN_ALIAS:pn-core-image-testmaster = "OE-Core"
-DISTRO_PN_ALIAS:pn-core-image-testmaster-initramfs = "OE-Core"
+DISTRO_PN_ALIAS:pn-core-image-testcontroller = "OE-Core"
+DISTRO_PN_ALIAS:pn-core-image-testcontroller-initramfs = "OE-Core"
 DISTRO_PN_ALIAS:pn-core-image-weston = "OE-Core"
 DISTRO_PN_ALIAS:pn-core-image-x11 = "OE-Core"
 DISTRO_PN_ALIAS:pn-createrepo-c = "Fedora=createrepo_c Clear=createrepo_c"
index 32ec391eb9ea922fdcb75b71a85d14886970092a..740e5fe55c41bd472b7a4abc15cd5cee41fbf4e4 100644 (file)
@@ -112,8 +112,8 @@ RECIPE_MAINTAINER:pn-core-image-ptest-all = "Richard Purdie <richard.purdie@linu
 RECIPE_MAINTAINER:pn-core-image-ptest-fast = "Richard Purdie <richard.purdie@linuxfoundation.org>"
 RECIPE_MAINTAINER:pn-core-image-sato = "Richard Purdie <richard.purdie@linuxfoundation.org>"
 RECIPE_MAINTAINER:pn-core-image-sato-sdk = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER:pn-core-image-testmaster-initramfs = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER:pn-core-image-testmaster = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER:pn-core-image-testcontroller-initramfs = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER:pn-core-image-testcontroller = "Richard Purdie <richard.purdie@linuxfoundation.org>"
 RECIPE_MAINTAINER:pn-core-image-weston = "Richard Purdie <richard.purdie@linuxfoundation.org>"
 RECIPE_MAINTAINER:pn-core-image-weston-sdk = "Richard Purdie <richard.purdie@linuxfoundation.org>"
 RECIPE_MAINTAINER:pn-core-image-x11 = "Richard Purdie <richard.purdie@linuxfoundation.org>"
similarity index 84%
rename from meta/lib/oeqa/controllers/masterimage.py
rename to meta/lib/oeqa/controllers/controllerimage.py
index 0bf5917e481dd6b98b2a07bee374ac6d90639c20..78a4aaff873bfd50683d07552292bcbc0088f3a3 100644 (file)
@@ -3,13 +3,13 @@
 # SPDX-License-Identifier: MIT
 #
 # This module adds support to testimage.bbclass to deploy images and run
-# tests using a "master image" - this is a "known good" image that is
+# tests using a "controller image" - this is a "known good" image that is
 # installed onto the device as part of initial setup and will be booted into
 # with no interaction; we can then use it to deploy the image to be tested
 # to a second partition before running the tests.
 #
-# For an example master image, see core-image-testmaster
-# (meta/recipes-extended/images/core-image-testmaster.bb)
+# For an example controller image, see core-image-testcontroller
+# (meta/recipes-extended/images/core-image-testcontroller.bb)
 
 import os
 import bb
@@ -24,12 +24,12 @@ from oeqa.utils import CommandError
 
 from abc import ABCMeta, abstractmethod
 
-class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta):
+class ControllerImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta):
 
     supported_image_fstypes = ['tar.gz', 'tar.bz2']
 
     def __init__(self, d):
-        super(MasterImageHardwareTarget, self).__init__(d)
+        super(ControllerImageHardwareTarget, self).__init__(d)
 
         # target ip
         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
         if not os.path.isfile(self.kernel):
             bb.fatal("No kernel found. Expected path: %s" % self.kernel)
 
-        # master ssh connection
-        self.master = None
+        # controller ssh connection
+        self.controller = None
         # if the user knows what they are doing, then by all means...
         self.user_cmds = d.getVar("TEST_DEPLOY_CMDS")
         self.deploy_cmds = None
@@ -119,19 +119,19 @@ class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta
 
     def deploy(self):
         # base class just sets the ssh log file for us
-        super(MasterImageHardwareTarget, self).deploy()
-        self.master = sshcontrol.SSHControl(ip=self.ip, logfile=self.sshlog, timeout=600, port=self.port)
-        status, output = self.master.run("cat /etc/masterimage")
+        super(ControllerImageHardwareTarget, self).deploy()
+        self.controller = sshcontrol.SSHControl(ip=self.ip, logfile=self.sshlog, timeout=600, port=self.port)
+        status, output = self.controller.run("cat /etc/controllerimage")
         if status != 0:
-            # We're not booted into the master image, so try rebooting
-            bb.plain("%s - booting into the master image" % self.pn)
+            # We're not booted into the controller image, so try rebooting
+            bb.plain("%s - booting into the controller image" % self.pn)
             self.power_ctl("cycle")
             self._wait_until_booted()
 
         bb.plain("%s - deploying image on target" % self.pn)
-        status, output = self.master.run("cat /etc/masterimage")
+        status, output = self.controller.run("cat /etc/controllerimage")
         if status != 0:
-            bb.fatal("No ssh connectivity or target isn't running a master image.\n%s" % output)
+            bb.fatal("No ssh connectivity or target isn't running a controller image.\n%s" % output)
         if self.user_cmds:
             self.deploy_cmds = self.user_cmds.split("\n")
         try:
@@ -156,10 +156,10 @@ class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta
 
     def stop(self):
         bb.plain("%s - reboot/powercycle target" % self.pn)
-        self.power_cycle(self.master)
+        self.power_cycle(self.controller)
 
 
-class SystemdbootTarget(MasterImageHardwareTarget):
+class SystemdbootTarget(ControllerImageHardwareTarget):
 
     def __init__(self, d):
         super(SystemdbootTarget, self).__init__(d)
@@ -184,16 +184,16 @@ class SystemdbootTarget(MasterImageHardwareTarget):
 
     def _deploy(self):
         # make sure these aren't mounted
-        self.master.run("umount /boot; umount /mnt/testrootfs; umount /sys/firmware/efi/efivars;")
+        self.controller.run("umount /boot; umount /mnt/testrootfs; umount /sys/firmware/efi/efivars;")
         # from now on, every deploy cmd should return 0
         # else an exception will be thrown by sshcontrol
-        self.master.ignore_status = False
-        self.master.copy_to(self.rootfs, "~/test-rootfs." + self.image_fstype)
-        self.master.copy_to(self.kernel, "~/test-kernel")
+        self.controller.ignore_status = False
+        self.controller.copy_to(self.rootfs, "~/test-rootfs." + self.image_fstype)
+        self.controller.copy_to(self.kernel, "~/test-kernel")
         for cmd in self.deploy_cmds:
-            self.master.run(cmd)
+            self.controller.run(cmd)
 
     def _start(self, params=None):
-        self.power_cycle(self.master)
+        self.power_cycle(self.controller)
         # there are better ways than a timeout but this should work for now
         time.sleep(120)
index 60a5fbbfbfdb37b48658fcacbccdb0f7e158604c..e31224b3afddb99097ea0c61442342111d0e3b3b 100644 (file)
@@ -13,7 +13,7 @@ class SSHTest(OERuntimeTestCase):
     def test_ssh(self):
         (status, output) = self.target.run('uname -a')
         self.assertEqual(status, 0, msg='SSH Test failed: %s' % output)
-        (status, output) = self.target.run('cat /etc/masterimage')
-        msg = "This isn't the right image  - /etc/masterimage " \
+        (status, output) = self.target.run('cat /etc/controllerimage')
+        msg = "This isn't the right image  - /etc/controllerimage " \
               "shouldn't be here %s" % output
         self.assertEqual(status, 1, msg=msg)
index b351985a61c1f44a554bd9b9c9c885ab4ea332b1..1fcd29e54ce9a86dec816f3011b2adc37a34c2a2 100644 (file)
@@ -133,7 +133,7 @@ mount -o rw,loop,noatime,nodiratime /run/media/$1/$2 /rootmnt
 echo "Copying rootfs files..."
 cp -a /rootmnt/* /ssd
 
-touch /ssd/etc/masterimage
+touch /ssd/etc/controllerimage
 
 if [ -d /ssd/etc/ ] ; then
     # We dont want udev to mount our root device while we're booting...
index ac621605287a383749c166514041cdd42662c38a..7b49001659d0607d36626bfc3639b05733a2eb9f 100644 (file)
@@ -158,7 +158,7 @@ mount -o rw,loop,noatime,nodiratime /run/media/$1/$2 /src_root
 echo "Copying rootfs files..."
 cp -a /src_root/* /tgt_root
 
-touch /tgt_root/etc/masterimage
+touch /tgt_root/etc/controllerimage
 
 if [ -d /tgt_root/etc/ ] ; then
     echo "$bootfs              /boot            ext3       defaults              1  2" >> /tgt_root/etc/fstab
similarity index 92%
rename from meta/recipes-extended/images/core-image-testmaster-initramfs.bb
rename to meta/recipes-extended/images/core-image-testcontroller-initramfs.bb
index 1a2e0af27bab6b02ca9b212b0203d76e439ebe84..2bc035a538d61d2f512491ff30c62c3c017923b8 100644 (file)
@@ -7,7 +7,7 @@ PACKAGE_INSTALL = "initramfs-live-boot initramfs-live-install-testfs initramfs-l
 # Do not pollute the initrd image with rootfs features
 IMAGE_FEATURES = ""
 
-export IMAGE_BASENAME = "core-image-testmaster-initramfs"
+export IMAGE_BASENAME = "core-image-testcontroller-initramfs"
 IMAGE_NAME_SUFFIX ?= ""
 IMAGE_LINGUAS = ""
 
similarity index 70%
rename from meta/recipes-extended/images/core-image-testmaster.bb
rename to meta/recipes-extended/images/core-image-testcontroller.bb
index 0faf18f5a4e53c1e185b775eeeac18035f2f6738..20edbd5630c68b890da2661b50ba781a0f8139f8 100644 (file)
@@ -1,4 +1,4 @@
-DESCRIPTION = "A master image to be deployed on a target useful for testing other images"
+DESCRIPTION = "A test controller image to be deployed on a target useful for testing other images using the OEQA runtime tests"
 
 IMAGE_FEATURES += "ssh-server-openssh package-management"
 
@@ -14,5 +14,5 @@ IMAGE_INSTALL += "\
 # we need a particular initramfs for live images
 # that pulls custom install scripts which take
 # care of partitioning for us
-INITRD_IMAGE = "core-image-testmaster-initramfs"
+INITRD_IMAGE = "core-image-testcontroller-initramfs"