summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorDaniel Istrate <daniel.alexandrux.istrate@intel.com>2015-12-18 17:12:16 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-12-28 09:25:17 +0000
commitab792876882116baf0216ba93b9f90fafbe75ed6 (patch)
tree12ddd98c3cb7427c5920774471afcd59e07f3bbf /meta
parentb09080dc8a81bd76c473f8937d224830eb4626c0 (diff)
downloadpoky-ab792876882116baf0216ba93b9f90fafbe75ed6.tar.gz
selftest: Added MACHINE = "qemux86" to tests that use runqemu
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. (From OE-Core rev: 169e1eaa4fc5ed03e2307b68686a7f5b1db37a36) Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oeqa/selftest/devtool.py7
-rw-r--r--meta/lib/oeqa/selftest/imagefeatures.py9
2 files changed, 10 insertions, 6 deletions
diff --git a/meta/lib/oeqa/selftest/devtool.py b/meta/lib/oeqa/selftest/devtool.py
index 955379bad5..6f76ce7b84 100644
--- a/meta/lib/oeqa/selftest/devtool.py
+++ b/meta/lib/oeqa/selftest/devtool.py
@@ -929,10 +929,11 @@ class DevtoolTests(DevtoolBase):
929 # Additionally we are testing build-time functionality as well, so 929 # Additionally we are testing build-time functionality as well, so
930 # really this has to be done as an oe-selftest test. 930 # really this has to be done as an oe-selftest test.
931 # 931 #
932
933 features = 'MACHINE = "qemux86"\n'
934 self.write_config(features)
935
932 # Check preconditions 936 # Check preconditions
933 machine = get_bb_var('MACHINE')
934 if not machine.startswith('qemu'):
935 self.skipTest('This test only works with qemu machines')
936 if not os.path.exists('/etc/runqemu-nosudo'): 937 if not os.path.exists('/etc/runqemu-nosudo'):
937 self.skipTest('You must set up tap devices with scripts/runqemu-gen-tapdevs before running this test') 938 self.skipTest('You must set up tap devices with scripts/runqemu-gen-tapdevs before running this test')
938 result = runCmd('PATH="$PATH:/sbin:/usr/sbin" ip tuntap show', ignore_status=True) 939 result = runCmd('PATH="$PATH:/sbin:/usr/sbin" ip tuntap show', ignore_status=True)
diff --git a/meta/lib/oeqa/selftest/imagefeatures.py b/meta/lib/oeqa/selftest/imagefeatures.py
index 4efb0d92a3..62ddc52bcc 100644
--- a/meta/lib/oeqa/selftest/imagefeatures.py
+++ b/meta/lib/oeqa/selftest/imagefeatures.py
@@ -22,7 +22,8 @@ class ImageFeatures(oeSelfTest):
22 AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com> 22 AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
23 """ 23 """
24 24
25 features = 'EXTRA_IMAGE_FEATURES = "ssh-server-openssh empty-root-password allow-empty-password"\n' 25 features = 'MACHINE = "qemux86"\n'
26 features += 'EXTRA_IMAGE_FEATURES = "ssh-server-openssh empty-root-password allow-empty-password"\n'
26 features += 'INHERIT += "extrausers"\n' 27 features += 'INHERIT += "extrausers"\n'
27 features += 'EXTRA_USERS_PARAMS = "useradd -p \'\' {}; usermod -s /bin/sh {};"'.format(self.test_user, self.test_user) 28 features += 'EXTRA_USERS_PARAMS = "useradd -p \'\' {}; usermod -s /bin/sh {};"'.format(self.test_user, self.test_user)
28 self.write_config(features) 29 self.write_config(features)
@@ -48,7 +49,8 @@ class ImageFeatures(oeSelfTest):
48 AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com> 49 AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
49 """ 50 """
50 51
51 features = 'EXTRA_IMAGE_FEATURES = "ssh-server-openssh allow-empty-password"\n' 52 features = 'MACHINE = "qemux86"\n'
53 features += 'EXTRA_IMAGE_FEATURES = "ssh-server-openssh allow-empty-password"\n'
52 features += 'INHERIT += "extrausers"\n' 54 features += 'INHERIT += "extrausers"\n'
53 features += 'EXTRA_USERS_PARAMS = "useradd -p \'\' {}; usermod -s /bin/sh {};"'.format(self.test_user, self.test_user) 55 features += 'EXTRA_USERS_PARAMS = "useradd -p \'\' {}; usermod -s /bin/sh {};"'.format(self.test_user, self.test_user)
54 self.write_config(features) 56 self.write_config(features)
@@ -77,7 +79,8 @@ class ImageFeatures(oeSelfTest):
77 AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com> 79 AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
78 """ 80 """
79 81
80 features = 'PREFERRED_VERSION_rpm = "4.%"\n' 82 features = 'MACHINE = "qemux86"\n'
83 features += 'PREFERRED_VERSION_rpm = "4.%"\n'
81 features += 'PREFERRED_VERSION_rpm-native = "4.%"\n' 84 features += 'PREFERRED_VERSION_rpm-native = "4.%"\n'
82 # Use openssh in IMAGE_INSTALL instead of ssh-server-openssh in EXTRA_IMAGE_FEATURES as a workaround for bug 8047 85 # Use openssh in IMAGE_INSTALL instead of ssh-server-openssh in EXTRA_IMAGE_FEATURES as a workaround for bug 8047
83 features += 'IMAGE_INSTALL_append = " openssh"\n' 86 features += 'IMAGE_INSTALL_append = " openssh"\n'