[OE-core] [PATCH] Install Python test suite and run it as ptest.

Paul Eggleton paul.eggleton at linux.intel.com
Thu Jul 18 09:51:20 UTC 2013


Hi Tudor,

On Wednesday 17 July 2013 02:09:32 Tudor Florea wrote:
>...
> +++ b/meta/recipes-devtools/python/python/run-ptest
> @@ -0,0 +1,5 @@
> +#!/bin/sh
> +#
> +#This script is used to run python test suites
> +
> +make -f /usr/lib/python/ptest/Makefile -k runtest-TESTS
> srcdir=/usr/lib/python2.7 TESTPROG=/usr/lib/python2.7/test/regrtest.py |
> sed -e '/\.\.\. ok/ s/^/PASS: /g' -e '/\.\.\. [ERROR|FAIL]/ s/^/FAIL: /g'
> -e '/\.\.\. skipped/ s/^/SKIP: /g' -e 's/ \.\.\. ok//g' -e 's/ \.\.\.
> ERROR//g' -e 's/ \.\.\. FAIL//g' -e 's/ \.\.\. skipped//g' 

The run-ptest script here has hardcoded /usr/lib/ for ${libdir} (which can and 
is changed in some distro configurations), we should ideally avoid this e.g. 
through use of sed in do_install after installing the file.

>...
> +RDEPENDS_${PN}-ptest = "${PN}-json ${PN}-crypt ${PN}-unittest ${PN}-difflib
> ${PN}-pprint ${PN}-shell ${PN}-tests ${PN}-misc ${PN}-netclient
> ${PN}-mailbox ${PN}-pkgutil ${PN}-profile ${PN}-compile ${PN}-pydoc
> ${PN}-robotparser ${PN}-netserver ${PN}-datetime ${PN}-compression
> ${PN}-mime ${PN}-audio ${PN}-db ${PN}-resource ${PN}-image ${PN}-subprocess
> ${PN}-doctest ${PN}-numbers ${PN}-html ${PN}-email ${PN}-distutils
> ${PN}-hotshot ${PN}-2to3 ${PN}-mmap ${PN}-terminal ${PN}-xmlrpc ${PN}-smtpd
> ${PN}-unixadmin ${PN}-compiler" 

Could the ptest package simply depend on ${PN}-modules rather than having an 
additional hardcoded list of modules packages? It looks like this could be 
replaced by:

RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-misc"

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



More information about the Openembedded-core mailing list