aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>2017-01-30 20:03:53 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-13 09:43:21 +0000
commit749a496d273f9fd378588e309cf976294584ca5f (patch)
tree934850affbf6869c8069033b92e60e8c591a8614 /meta/classes
parent8f331db8136c8bf28ceea7f8ae410eb9d83225ad (diff)
downloadopenembedded-core-contrib-749a496d273f9fd378588e309cf976294584ca5f.tar.gz
openembedded-core-contrib-749a496d273f9fd378588e309cf976294584ca5f.tar.bz2
openembedded-core-contrib-749a496d273f9fd378588e309cf976294584ca5f.zip
testimage.bbclass: fix runtime test for rpm, port smart tests to dnf
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/testimage.bbclass25
1 files changed, 10 insertions, 15 deletions
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 8d8443ca84..07744aff92 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -35,7 +35,7 @@ TEST_NEEDED_PACKAGES_DIR ?= "${WORKDIR}/testimage/packages"
TEST_EXTRACTED_DIR ?= "${TEST_NEEDED_PACKAGES_DIR}/extracted"
TEST_PACKAGED_DIR ?= "${TEST_NEEDED_PACKAGES_DIR}/packaged"
-RPMTESTSUITE = "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'smart rpm', '', d)}"
+RPMTESTSUITE = "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'dnf rpm', '', d)}"
SYSTEMDSUITE = "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
MINTESTSUITE = "ping"
NETTESTSUITE = "${MINTESTSUITE} ssh df date scp oe_syslog ${SYSTEMDSUITE}"
@@ -74,12 +74,11 @@ TESTIMAGEDEPENDS = ""
TESTIMAGEDEPENDS_qemuall = "qemu-native:do_populate_sysroot qemu-helper-native:do_populate_sysroot"
TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'cpio-native:do_populate_sysroot', '', d)}"
TESTIMAGEDEPENDS_qemuall += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'cpio-native:do_populate_sysroot', '', d)}"
-TESTIMAGEDEPENDS_qemuall += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'createrepo-native:do_populate_sysroot', '', d)}"
-TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'python-smartpm-native:do_populate_sysroot', '', d)}"
+TESTIMAGEDEPENDS_qemuall += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'createrepo-c-native:do_populate_sysroot', '', d)}"
+TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'dnf-native:do_populate_sysroot', '', d)}"
TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'ipk', 'opkg-utils-native:do_populate_sysroot', '', d)}"
TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'deb', 'apt-native:do_populate_sysroot', '', d)}"
-TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'python-smartpm-native:do_populate_sysroot', '', d)}"
-TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'createrepo-native:do_populate_sysroot', '', d)}"
+TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'createrepo-c-native:do_populate_sysroot', '', d)}"
TESTIMAGELOCK = "${TMPDIR}/testimage.lock"
TESTIMAGELOCK_qemuall = ""
@@ -120,7 +119,7 @@ python do_testimage() {
testimage_sanity(d)
if (d.getVar('IMAGE_PKGTYPE') == 'rpm'
- and 'smart' in d.getVar('TEST_SUITES')):
+ and 'dnf' in d.getVar('TEST_SUITES')):
create_rpm_index(d)
testimage_main(d)
@@ -324,30 +323,26 @@ def create_index(arg):
def create_rpm_index(d):
# Index RPMs
- rpm_createrepo = bb.utils.which(os.getenv('PATH'), "createrepo")
+ rpm_createrepo = bb.utils.which(os.getenv('PATH'), "createrepo_c")
index_cmds = []
archs = (d.getVar('ALL_MULTILIB_PACKAGE_ARCHS') or '').replace('-', '_')
for arch in archs.split():
rpm_dir = os.path.join(d.getVar('DEPLOY_DIR_RPM'), arch)
- idx_path = os.path.join(d.getVar('WORKDIR'), 'rpm', arch)
- db_path = os.path.join(d.getVar('WORKDIR'), 'rpmdb', arch)
+ idx_path = os.path.join(d.getVar('WORKDIR'), 'oe-testimage-repo', arch)
if not os.path.isdir(rpm_dir):
continue
- if os.path.exists(db_path):
- bb.utils.remove(dbpath, True)
lockfilename = os.path.join(d.getVar('DEPLOY_DIR_RPM'), 'rpm.lock')
lf = bb.utils.lockfile(lockfilename, False)
oe.path.copyhardlinktree(rpm_dir, idx_path)
# Full indexes overload a 256MB image so reduce the number of rpms
- # in the feed. Filter to p* since we use the psplash packages and
+ # in the feed. Filter to r* since we use the run-postinst packages and
# this leaves some allarch and machine arch packages too.
- bb.utils.remove(idx_path + "*/[a-oq-z]*.rpm")
+ bb.utils.remove(idx_path + "*/[a-qs-z]*.rpm")
bb.utils.unlockfile(lf)
- cmd = '%s --dbpath %s --update -q %s' % (rpm_createrepo,
- db_path, idx_path)
+ cmd = '%s --update -q %s' % (rpm_createrepo, idx_path)
# Create repodata
result = create_index(cmd)