diff options
-rw-r--r-- | meta/lib/oeqa/selftest/imagefeatures.py | 60 |
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 | """ |