]> code.ossystems Code Review - openembedded-core.git/commitdiff
selftest: Added MACHINE = "qemux86" to tests that use runqemu
authorDaniel Istrate <daniel.alexandrux.istrate@intel.com>
Fri, 18 Dec 2015 15:12:16 +0000 (17:12 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 27 Dec 2015 11:26:59 +0000 (11:26 +0000)
It makes sense for tests that use runqemu to have MACHINE set as qemu.
This also avoid issues when running oe-selftest with --arch random/all
option.

Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/lib/oeqa/selftest/devtool.py
meta/lib/oeqa/selftest/imagefeatures.py

index 955379bad53a0e41f98f5a3d86b2e807f44dbf43..6f76ce7b848d1b8f9da0be37a9dc4a99b4554688 100644 (file)
@@ -929,10 +929,11 @@ class DevtoolTests(DevtoolBase):
         # Additionally we are testing build-time functionality as well, so
         # really this has to be done as an oe-selftest test.
         #
+
+        features = 'MACHINE = "qemux86"\n'
+        self.write_config(features)
+
         # Check preconditions
-        machine = get_bb_var('MACHINE')
-        if not machine.startswith('qemu'):
-            self.skipTest('This test only works with qemu machines')
         if not os.path.exists('/etc/runqemu-nosudo'):
             self.skipTest('You must set up tap devices with scripts/runqemu-gen-tapdevs before running this test')
         result = runCmd('PATH="$PATH:/sbin:/usr/sbin" ip tuntap show', ignore_status=True)
index 4efb0d92a36083a1b03484f13e7e825cb9dd561b..62ddc52bcc4d84db16b86acdf80033e039e2a551 100644 (file)
@@ -22,7 +22,8 @@ class ImageFeatures(oeSelfTest):
         AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
         """
 
-        features = 'EXTRA_IMAGE_FEATURES = "ssh-server-openssh empty-root-password allow-empty-password"\n'
+        features = 'MACHINE = "qemux86"\n'
+        features += 'EXTRA_IMAGE_FEATURES = "ssh-server-openssh empty-root-password allow-empty-password"\n'
         features += 'INHERIT += "extrausers"\n'
         features += 'EXTRA_USERS_PARAMS = "useradd -p \'\' {}; usermod -s /bin/sh {};"'.format(self.test_user, self.test_user)
         self.write_config(features)
@@ -48,7 +49,8 @@ class ImageFeatures(oeSelfTest):
         AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
         """
 
-        features = 'EXTRA_IMAGE_FEATURES = "ssh-server-openssh allow-empty-password"\n'
+        features = 'MACHINE = "qemux86"\n'
+        features += 'EXTRA_IMAGE_FEATURES = "ssh-server-openssh allow-empty-password"\n'
         features += 'INHERIT += "extrausers"\n'
         features += 'EXTRA_USERS_PARAMS = "useradd -p \'\' {}; usermod -s /bin/sh {};"'.format(self.test_user, self.test_user)
         self.write_config(features)
@@ -77,7 +79,8 @@ class ImageFeatures(oeSelfTest):
         AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
         """
 
-        features = 'PREFERRED_VERSION_rpm = "4.%"\n'
+        features = 'MACHINE = "qemux86"\n'
+        features += 'PREFERRED_VERSION_rpm = "4.%"\n'
         features += 'PREFERRED_VERSION_rpm-native = "4.%"\n'
         # Use openssh in IMAGE_INSTALL instead of ssh-server-openssh in EXTRA_IMAGE_FEATURES as a workaround for bug 8047
         features += 'IMAGE_INSTALL_append = " openssh"\n'