-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hans Henry von Tresckow schreef:
| Please add testlab.bbclass to the stable branch

That's a good idea, but we don't have opkg in the stable branch. I'll
commit the version the autobuilder is currently using.

regards,

KOen

|
| mtn log output for classes/testlab.bbclass:
|
|
| -----------------------------------------------------------------
| Revision: 552396a9dfe973c66350f15cdf75d1b55fc16adb
| Ancestor: 57372f444947f67038159885de1edb5a39da6613
| Author: [EMAIL PROTECTED]
| Date: 2008-03-19T08:35:14
| Branch: org.openembedded.dev
|
| Modified files:
|         classes/testlab.bbclass
|
| ChangeLog:
|
| testlab: remove bashism, spotted by XorA
|
|
| ============================================================
| --- classes/testlab.bbclass    77a433449ede680d28026380c4121e957fac45cc
| +++ classes/testlab.bbclass    c3d610ac3c54bb4174b19e9905964f8a4064cc07
| @@ -26,7 +26,7 @@ if [ -e  ${IMAGE_ROOTFS}/etc/opkg ] ; th
|
|      TESTLAB_DIR="${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}-testlab"
|          mkdir -p ${TESTLAB_DIR}/
| -    ls -laR ${IMAGE_ROOTFS} >& ${TESTLAB_DIR}/files-in-image.txt
| +    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
| -----------------------------------------------------------------
| Revision: d2a4a9595d83de2200e237e0a4a45a1c0f7722aa
| Ancestor: 79bff7df1e9d050419ad89d4e515f264e3858e85
| Author: [EMAIL PROTECTED]
| Date: 2008-03-18T21:58:41
| Branch: org.openembedded.dev
|
| Modified files:
|         classes/image.bbclass classes/package_ipk.bbclass
|         classes/packaged-staging.bbclass classes/rootfs_deb.bbclass
|         classes/rootfs_ipk.bbclass classes/testlab.bbclass
|         conf/distro/angstrom-2008.1.conf
|         conf/distro/include/sane-srcrevs.inc
|         packages/angstrom/angstrom-feed-configs.bb
|         packages/meta/meta-toolchain.bb packages/tasks/task-base.bb
|
| ChangeLog:
|
| various: move over to opkg, as discussed on the mailinglist
| * death to ipkg!
|
|
| ============================================================
| --- classes/testlab.bbclass    d124569b52125dfee4e161d881acec0658577a55
| +++ classes/testlab.bbclass    77a433449ede680d28026380c4121e957fac45cc
| @@ -19,10 +19,10 @@
|  # * add test suite to run on the target device
|
|
| -# Needs 'dot', 'ipkg-cl'
| +# Needs 'dot', 'opkg-cl'
|
|  do_testlab() {
| -if [ -e  ${IMAGE_ROOTFS}/etc/ipkg ] ; then
| +if [ -e  ${IMAGE_ROOTFS}/etc/opkg ] ; then
|
|      TESTLAB_DIR="${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}-testlab"
|          mkdir -p ${TESTLAB_DIR}/
| @@ -31,14 +31,14 @@ if [ -e  ${IMAGE_ROOTFS}/etc/ipkg ] ; th
|      echo > ${TESTLAB_DIR}/installed-packages.txt
|      echo -e "digraph depends {\n    node [shape=plaintext]" >
| ${TESTLAB_DIR}/depends.dot
|
| -    for pkg in $(ipkg-cl -f ${IMAGE_ROOTFS}/etc/ipkg -o ${IMAGE_ROOTFS}
| list_installed | awk '{print $1}') ; do
| -            ipkg-cl -f ${IMAGE_ROOTFS}/etc/ipkg -o ${IMAGE_ROOTFS} info
| $pkg | grep Filename | awk -F: '{print $2}'  >> ${TESTLAB_DIR}/installed-
| packages.txt
| +    for pkg in $(opkg-cl -f ${IMAGE_ROOTFS}/etc/opkg -o ${IMAGE_ROOTFS}
| list_installed | awk '{print $1}') ; do
| +            opkg-cl -f ${IMAGE_ROOTFS}/etc/opkg -o ${IMAGE_ROOTFS} info
| $pkg | grep Filename | awk -F: '{print $2}'  >> ${TESTLAB_DIR}/installed-
| packages.txt
|
| -            for depends in $(ipkg-cl -f ${IMAGE_ROOTFS}/etc/ipkg -o
| ${IMAGE_ROOTFS} info $pkg | grep Depends) ; do
| +            for depends in $(opkg-cl -f ${IMAGE_ROOTFS}/etc/opkg -o
| ${IMAGE_ROOTFS} info $pkg | grep Depends) ; do
|                  echo "$pkg OPP $depends;" | grep -v "(" | grep -v ")" |
| grep -v 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 $(ipkg-cl -f ${IMAGE_ROOTFS}/etc/ipkg -o
| ${IMAGE_ROOTFS} info $pkg | grep Recom) ; do
| +        for recommends in $(opkg-cl -f ${IMAGE_ROOTFS}/etc/opkg -o
| ${IMAGE_ROOTFS} info $pkg | grep Recom) ; do
|                  echo "$pkg OPP $recommends [style=dotted];" | grep -v
"(" |
| grep -v ")" | grep -v Recom | sed -e 's:,::g' -e 's:-:_:g' -e
's:\.:_:g' -e
| 's:+::g' |sed 's:OPP:->:g' >> ${TESTLAB_DIR}/depends.dot
|              done
|      done
| -----------------------------------------------------------------
| Revision: 7712d9178e2d4268d697de3c404c8853aa202089
| Ancestor: aaab4fbcf959241c3fb19d2b48c1df3e7da52a90
| Author: [EMAIL PROTECTED]
| Date: 2008-03-03T23:49:00
| Branch: org.openembedded.dev
|
| Added files:
|         classes/testlab.bbclass
|
| ChangeLog:
|
| testlab bbclass: add class that dumps a bunch of statistical data from
your
| images, usefull for people doing regression testing
|
| details at:
|
| * http://dominion.thruhere.net/koen/cms/the-testlab-strikes-again
| * http://dominion.thruhere.net/koen/cms/package-relations-inside-images
|
|
| ============================================================
| --- classes/testlab.bbclass    d124569b52125dfee4e161d881acec0658577a55
| +++ classes/testlab.bbclass    d124569b52125dfee4e161d881acec0658577a55
| @@ -0,0 +1,65 @@
| +#
| +# Performs various tests and analysises on images
| +#
| +# Copyright (C) 2007, 2008 Koen Kooi
<[EMAIL PROTECTED]>
| +
| +# 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 mtn certs to record this info into the scm
| +# * add test suite to run on the target device
| +
| +
| +# Needs 'dot', 'ipkg-cl'
| +
| +do_testlab() {
| +if [ -e  ${IMAGE_ROOTFS}/etc/ipkg ] ; then
| +
| +    TESTLAB_DIR="${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}-testlab"
| +        mkdir -p ${TESTLAB_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 $(ipkg-cl -f ${IMAGE_ROOTFS}/etc/ipkg -o ${IMAGE_ROOTFS}
| list_installed | awk '{print $1}') ; do
| +            ipkg-cl -f ${IMAGE_ROOTFS}/etc/ipkg -o ${IMAGE_ROOTFS} info
| $pkg | grep Filename | awk -F: '{print $2}'  >> ${TESTLAB_DIR}/installed-
| packages.txt
| +
| +            for depends in $(ipkg-cl -f ${IMAGE_ROOTFS}/etc/ipkg -o
| ${IMAGE_ROOTFS} info $pkg | grep Depends) ; do
| +                echo "$pkg OPP $depends;" | grep -v "(" | grep -v ")" |
| grep -v 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 $(ipkg-cl -f ${IMAGE_ROOTFS}/etc/ipkg -o
| ${IMAGE_ROOTFS} info $pkg | grep Recom) ; do
| +                echo "$pkg OPP $recommends [style=dotted];" | grep -v
"(" |
| grep -v ")" | grep -v 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
| +
| +    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")
| +    done | grep "\.ipk" | sed -e s:${DEPLOY_DIR_IPK}::g | sort -n -r
| awk
| '{print $1 "\tKiB " $2}' > ${TESTLAB_DIR}/installed-package-sizes.txt
| +fi
| +}
| +
| +IMAGE_POSTPROCESS_COMMAND += "  do_testlab ;"
|
|

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFH6hHjMkyGM64RGpERAhxPAKCyT0KFfu0K1LaiENT0QGQCQ3fUjACfdf0l
XaCN4xA6BbYmJbBClJdZfYs=
=pIsr
-----END PGP SIGNATURE-----


_______________________________________________
Angstrom-distro-devel mailing list
Angstrom-distro-devel@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/angstrom-distro-devel

Reply via email to