summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest
diff options
context:
space:
mode:
authorJoshua Lock <joshua.g.lock@intel.com>2016-03-14 14:37:00 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-20 23:12:30 +0000
commit10ef68f0f0c146dde825a3042cfd3b447173319e (patch)
tree2e4fb6fb546af247b8e25759e3a842e03f9204fb /meta/lib/oeqa/selftest
parentd915965117e9ca1007183268b46be6bb6fca80cf (diff)
downloadpoky-10ef68f0f0c146dde825a3042cfd3b447173319e.tar.gz
oeqa: remove RPM 4 self test
We're dropping RPM 4 as it's not well maintained, therefore remove a selftest which tests RPM 4 availability. (From OE-Core rev: ed005dd51c121c27a89a878bfc6abfca496bf51c) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest')
-rw-r--r--meta/lib/oeqa/selftest/imagefeatures.py60
1 files changed, 0 insertions, 60 deletions
diff --git a/meta/lib/oeqa/selftest/imagefeatures.py b/meta/lib/oeqa/selftest/imagefeatures.py
index ac8c5ae410..8a53899c7d 100644
--- a/meta/lib/oeqa/selftest/imagefeatures.py
+++ b/meta/lib/oeqa/selftest/imagefeatures.py
@@ -67,66 +67,6 @@ class ImageFeatures(oeSelfTest):
67 self.assertEqual(status, 0, 'ssh to user tester failed with %s' % output) 67 self.assertEqual(status, 0, 'ssh to user tester failed with %s' % output)
68 68
69 69
70 @testcase(1114)
71 def test_rpm_version_4_support_on_image(self):
72 """
73 Summary: Check rpm version 4 support on image
74 Expected: Rpm version must be 4.x
75 Product: oe-core
76 Author: Ionut Chisanovici <ionutx.chisanovici@intel.com>
77 AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
78 """
79
80 features = 'PREFERRED_VERSION_rpm = "4.%"\n'
81 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
83 features += 'IMAGE_INSTALL_append = " openssh"\n'
84 features += 'EXTRA_IMAGE_FEATURES = "empty-root-password allow-empty-password package-management"\n'
85 features += 'RPMROOTFSDEPENDS_remove = "rpmresolve-native:do_populate_sysroot"'
86 self.write_config(features)
87
88 # Build a core-image-minimal
89 bitbake('core-image-minimal')
90
91 # Check the native version of rpm is correct
92 native_bindir = get_bb_var('STAGING_BINDIR_NATIVE')
93 result = runCmd(os.path.join(native_bindir, 'rpm') + ' --version')
94 self.assertIn('version 4.', result.output)
95
96 # Check manifest for the rpm package
97 deploydir = get_bb_var('DEPLOY_DIR_IMAGE')
98 imgname = get_bb_var('IMAGE_LINK_NAME', 'core-image-minimal')
99 with open(os.path.join(deploydir, imgname) + '.manifest', 'r') as f:
100 for line in f:
101 splitline = line.split()
102 if len(splitline) > 2:
103 rpm_version = splitline[2]
104 if splitline[0] == 'rpm':
105 if not rpm_version.startswith('4.'):
106 self.fail('rpm version %s found in image, expected 4.x' % rpm_version)
107 break
108 else:
109 self.fail('No rpm package found in image')
110
111 # Now do a couple of runtime tests
112 with runqemu("core-image-minimal") as qemu:
113 command = "rpm --version"
114 status, output = qemu.run(command)
115 self.assertEqual(0, status, 'Failed to run command "%s": %s' % (command, output))
116 found_rpm_version = output.strip()
117
118 # Make sure the retrieved rpm version is the expected one
119 if rpm_version not in found_rpm_version:
120 self.fail('RPM version is not {}, found instead {}.'.format(rpm_version, found_rpm_version))
121
122 # Test that the rpm database is there and working
123 command = "rpm -qa"
124 status, output = qemu.run(command)
125 self.assertEqual(0, status, 'Failed to run command "%s": %s' % (command, output))
126 self.assertIn('packagegroup-core-boot', output)
127 self.assertIn('busybox', output)
128
129
130 @testcase(1116) 70 @testcase(1116)
131 def test_clutter_image_can_be_built(self): 71 def test_clutter_image_can_be_built(self):
132 """ 72 """