From: Khem Raj <raj.khem@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: [RFC][meta-oe][PATCH 2/3] testlab.bbclass: Delete
Date: Mon, 16 Jul 2012 10:38:35 -0700 [thread overview]
Message-ID: <1342460316-5489-2-git-send-email-raj.khem@gmail.com> (raw)
In-Reply-To: <1342460316-5489-1-git-send-email-raj.khem@gmail.com>
This functionality is now provided by buildhistory as well.
so lets remove it in favor of that
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta-oe/classes/testlab.bbclass | 114 ---------------------------------------
1 file changed, 114 deletions(-)
delete mode 100644 meta-oe/classes/testlab.bbclass
diff --git a/meta-oe/classes/testlab.bbclass b/meta-oe/classes/testlab.bbclass
deleted file mode 100644
index c097e9e..0000000
--- a/meta-oe/classes/testlab.bbclass
+++ /dev/null
@@ -1,114 +0,0 @@
-#
-# Performs various tests and analysises on images
-#
-# Copyright (C) 2007, 2008 Koen Kooi <koen@openembedded.org>
-
-# The current features are:
-# 1) dump a list of installed packages
-# 2) dump a list of sizes of installed packages
-# 3) dependency graphs of installed packages
-
-# See
-# * http://dominion.thruhere.net/koen/cms/the-testlab-strikes-again
-# * http://dominion.thruhere.net/koen/cms/package-relations-inside-images
-# for use cases
-
-# TODO:
-# * log information to a server for safekeeping
-# * use git notes to record this info into the scm
-# * add test suite to run on the target device
-
-
-# Needs 'dot', 'opkg-cl'
-
-do_testlab() {
-if [ -e ${IMAGE_ROOTFS}/etc/opkg ] && [ "${ONLINE_PACKAGE_MANAGEMENT}" = "full" ] ; then
-
- IPKG_TMP_DIR="${IMAGE_ROOTFS}-tmp"
- IPKG_ARGS="-f ${STAGING_ETCDIR_NATIVE}/opkg.conf -o ${IMAGE_ROOTFS} -t ${IPKG_TMP_DIR}"
-
- TESTLAB_DIR="${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}-testlab"
- mkdir -p ${TESTLAB_DIR}/
- mkdir -p ${IPKG_TMP_DIR}/
- ls -laR ${IMAGE_ROOTFS} > ${TESTLAB_DIR}/files-in-image.txt
-
- echo > ${TESTLAB_DIR}/installed-packages.txt
- echo -e "digraph depends {\n node [shape=plaintext]" > ${TESTLAB_DIR}/depends.dot
-
- for pkg in $(opkg-cl ${IPKG_ARGS} list_installed | awk '{print $1}') ; do
- name=`opkg-cl ${IPKG_ARGS} info $pkg | grep -B 7 -A 7 "^Status.* \(\(installed\)\|\(unpacked\)\)" | awk '/^Package/ {printf $2"_"}'`
- name=$name`opkg-cl ${IPKG_ARGS} info $pkg | grep -B 7 -A 7 "^Status.* \(\(installed\)\|\(unpacked\)\)" | awk -F: '/^Version/ {printf $NF"_"}' | sed 's/^\s*//g'`
- name=$name`opkg-cl ${IPKG_ARGS} info $pkg | grep -B 7 -A 7 "^Status.* \(\(installed\)\|\(unpacked\)\)" | awk '/^Archi/ {print $2".ipk"}'`
- echo $name >>${TESTLAB_DIR}/installed-packages.txt
-
- for depends in $(opkg-cl ${IPKG_ARGS} info $pkg | grep ^Depends) ; do
- echo "$pkg OPP $depends;" | grep -v "(" | grep -v ")" | grep -v "$pkg OPP Depends" | sed -e 's:,::g' -e 's:-:_:g' -e 's:\.:_:g' -e 's:+::g' |sed 's:OPP:->:g' >> ${TESTLAB_DIR}/depends.dot
- done
-
- for recommends in $(opkg-cl ${IPKG_ARGS} info $pkg | grep ^Recom) ; do
- echo "$pkg OPP $recommends [style=dotted];" | grep -v "(" | grep -v ")" | grep -v "$pkg OPP Recom" | sed -e 's:,::g' -e 's:-:_:g' -e 's:\.:_:g' -e 's:+::g' |sed 's:OPP:->:g' >> ${TESTLAB_DIR}/depends.dot
- done
- done
-
- echo "}" >> ${TESTLAB_DIR}/depends.dot
- rm -rf ${IPKG_TMP_DIR}
-
- grep -v kernel_2 ${TESTLAB_DIR}/depends.dot | grep -v kernel_image > ${TESTLAB_DIR}/depends-nokernel.dot
- grep -v libc6 ${TESTLAB_DIR}/depends-nokernel.dot | grep -v libgcc > ${TESTLAB_DIR}/depends-nokernel-nolibc.dot
- grep -v update_ ${TESTLAB_DIR}/depends-nokernel-nolibc.dot > ${TESTLAB_DIR}/depends-nokernel-nolibc-noupdate.dot
- grep -v kernel_module ${TESTLAB_DIR}/depends-nokernel-nolibc-noupdate.dot > ${TESTLAB_DIR}/depends-nokernel-nolibc-noupdate-nomodules.dot
-
- #dot has some library troubles when run under fakeroot, uncomment at your own risk
- #dot -Tpng -o ${TESTLAB_DIR}/image-dependencies.png ${TESTLAB_DIR}/depends.dot
- #dot -Tpng -o ${TESTLAB_DIR}/image-dependencies-nokernel-nolibc.png ${TESTLAB_DIR}/depends-nokernel-nolibc.dot
- #dot -Tpng -o ${TESTLAB_DIR}/image-dependencies-nokernel-nolibc-noupdate.png ${TESTLAB_DIR}/depends-nokernel-nolibc-noupdate.dot
- #dot -Tpng -o ${TESTLAB_DIR}/image-dependencies-nokernel-nolibc-noupdate-nomodules.png ${TESTLAB_DIR}/depends-nokernel-nolibc-noupdate-nomodules.dot
-
- for file in $(cat ${TESTLAB_DIR}/installed-packages.txt) ; do
- du -k $(find ${DEPLOY_DIR_IPK} -name "$file") | head -n1
- done | grep "\.ipk" | sed -e s:${DEPLOY_DIR_IPK}::g | sort -n -r | awk '{print $1 "\tKiB " $2}' > ${TESTLAB_DIR}/installed-package-sizes.txt
-
- for file in $(cat ${TESTLAB_DIR}/installed-packages.txt) ; do
- echo "`find ${DEPLOY_DIR_IPK} -name "$file" | xargs opkg-list-fields | grep ^License | sed -e 's/^.*:[ \t]*//g'`" '=' $(echo $file | awk -F_ '{print $1}')
- done | awk -F= '{printf("%50s:%s\n", $1, $2)}' > ${TESTLAB_DIR}/installed-package-licenses.txt
- # Log results to a git controlled directory structure than can be pushed to a remote location
- if [ "${TESTLABLOG}" = "remote" ] && [ -n "${TESTLABREMOTEDIR}" ] ; then
- TESTLABLOGDIR="${MACHINE_ARCH}/${TCLIBC}/${IMAGE_BASENAME}"
- mkdir -p ${TESTLABREMOTEDIR}/${TESTLABLOGDIR}
- cp ${TESTLAB_DIR}/*package* ${TESTLAB_DIR}/depends.dot ${TESTLABREMOTEDIR}/${TESTLABLOGDIR}
- # force change to record builds where the testlab contents didn't change, but other things (e.g. git rev) did
- echo "${MACHINE}: ${IMAGE_BASENAME} configured for ${DISTRO} ${DISTRO_VERSION}" > ${TESTLABREMOTEDIR}/${TESTLABLOGDIR}/build-id
- echo "${@testlab_get_layers(bb, d)}" >> ${TESTLABREMOTEDIR}/${TESTLABLOGDIR}/build-id
- # This runs inside fakeroot, so the git author is listed as root (or whatever root configured it to be) :(
- ( cd ${TESTLABREMOTEDIR}/
- git add ${TESTLABLOGDIR}/*
- git commit ${TESTLABLOGDIR}/ -m "${MACHINE}: ${IMAGE_BASENAME} configured for ${DISTRO} ${DISTRO_VERSION} using branch ${METADATA_BRANCH} and revision ${METADATA_REVISION}" --author "testlab <testlab@${DISTRO}>" || true)
- fi
-fi
-}
-
-IMAGE_POSTPROCESS_COMMAND += " do_testlab ;"
-
-def testlab_get_layers(bb, d):
- layers = (bb.data.getVar("BBLAYERS", d, 1) or "").split()
- layers_branch_rev = ["%-17s = \"%s:%s\"" % (os.path.basename(i), \
- base_get_metadata_git_branch(i, None).strip().strip('()'), \
- base_get_metadata_git_revision(i, None)) \
- for i in layers]
- i = len(layers_branch_rev)-1
- p1 = layers_branch_rev[i].find("=")
- s1= layers_branch_rev[i][p1:]
- while i > 0:
- p2 = layers_branch_rev[i-1].find("=")
- s2= layers_branch_rev[i-1][p2:]
- if s1 == s2:
- layers_branch_rev[i-1] = layers_branch_rev[i-1][0:p2]
- i -= 1
- else:
- i -= 1
- p1 = layers_branch_rev[i].find("=")
- s1= layers_branch_rev[i][p1:]
-
- layertext = "Configured Openembedded layers:\n%s\n" % '\n'.join(layers_branch_rev)
- return layertext
-
--
1.7.9.5
next prev parent reply other threads:[~2012-07-16 17:50 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-16 17:38 [RFC][meta-oe][PATCH 1/3] kernel.bbclass: Rename to machine_kernel_pr.bbclass which provides added functionality Khem Raj
2012-07-16 17:38 ` Khem Raj [this message]
2012-07-16 17:38 ` [RFC][meta-oe][PATCH 3/3] blacklist.bbclass: Move to meta-angstrom Khem Raj
2012-07-16 17:46 ` Martin Jansa
2012-07-16 17:50 ` Khem Raj
2012-07-16 17:58 ` Martin Jansa
2012-07-16 18:00 ` Khem Raj
2012-07-16 18:04 ` Martin Jansa
2012-07-18 11:25 ` Martin Jansa
2012-07-16 17:50 ` [RFC][meta-oe][PATCH 1/3] kernel.bbclass: Rename to machine_kernel_pr.bbclass which provides added functionality Martin Jansa
2012-07-16 17:55 ` Khem Raj
2012-07-17 12:39 ` Martin Jansa
2012-07-17 12:37 ` [meta-oe][PATCH 1/7] kernel: save $kerndir/tools and $kerndir/lib from pruning Martin Jansa
2012-07-17 12:37 ` [meta-oe][PATCH 2/7] recipes-kernel: make perf a standalone package Martin Jansa
2012-07-17 12:37 ` [meta-oe][PATCH 3/7] kernel: Add kernel headers to kernel-dev package Martin Jansa
2012-07-17 12:37 ` [meta-oe][PATCH 4/7] kernel.bbclass: add non-santized kernel provides Martin Jansa
2012-07-17 12:37 ` [meta-oe][PATCH 5/7] kernel.bbclass: Dont package kxgettext.o Martin Jansa
2012-07-17 12:37 ` [meta-oe][PATCH 6/7] kernel.bbclass: add deploy link to KERNEL_IMAGETYPE Martin Jansa
2012-07-17 12:38 ` [meta-oe][PATCH 7/7] kernel.bbclass: replace os.system with subprocess.call Martin Jansa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1342460316-5489-2-git-send-email-raj.khem@gmail.com \
--to=raj.khem@gmail.com \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.