diff options
author | Björn Stenberg <bjst@enea.com> | 2013-03-06 10:41:08 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-03-07 11:14:39 +0000 |
commit | bb498369b8393a88968eaad2714b18afd29c0d1e (patch) | |
tree | d9aaa34bf53cadc61207322986e5fb0fdad203f9 /meta/classes | |
parent | 9ed59a5d1897354e9d4a6d1179db50c1e04435a3 (diff) | |
download | poky-bb498369b8393a88968eaad2714b18afd29c0d1e.tar.gz |
ptest: Move ptest checks from recipes to ptest.bbclass
This patch cleans up ptest implementation in recipes by moving ptest
specific code parts into dedicated *_ptest functions.
(From OE-Core rev: 1e4d267a3cbd2135a5de10519814087050b766b7)
Signed-off-by: Björn Stenberg <bjst@enea.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/ptest.bbclass | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/meta/classes/ptest.bbclass b/meta/classes/ptest.bbclass index 131af7b0ef..6ab5ee411f 100644 --- a/meta/classes/ptest.bbclass +++ b/meta/classes/ptest.bbclass | |||
@@ -23,13 +23,36 @@ FILES_${PN}-dbg += "${PTEST_PATH}/.debug \ | |||
23 | ${PTEST_PATH}/*/*/*/*/.debug \ | 23 | ${PTEST_PATH}/*/*/*/*/.debug \ |
24 | " | 24 | " |
25 | 25 | ||
26 | ptest_do_install() { | 26 | do_configure_ptest_base() { |
27 | if [ "${PN}" = "${BPN}" -a ${PTEST_ENABLED} = "1" ]; then | 27 | if [ ${PTEST_ENABLED} = 1 ]; then |
28 | install -D ${WORKDIR}/run-ptest ${D}${PTEST_PATH}/run-ptest | 28 | if [ type -t do_configure_ptest = function ]; then |
29 | if grep -q install-ptest: Makefile; then | 29 | do_configure_ptest |
30 | oe_runmake DESTDIR=${D}${PTEST_PATH} install-ptest | ||
31 | fi | 30 | fi |
32 | fi | 31 | fi |
33 | } | 32 | } |
34 | 33 | ||
35 | EXPORT_FUNCTIONS ptest_do_install | 34 | do_compile_ptest_base() { |
35 | if [ ${PTEST_ENABLED} = 1 ]; then | ||
36 | if [ type -t do_compile_ptest = function ]; then | ||
37 | do_compile_ptest | ||
38 | fi | ||
39 | fi | ||
40 | } | ||
41 | |||
42 | do_install_ptest_base() { | ||
43 | if [ ${PTEST_ENABLED} = 1 ]; then | ||
44 | if [ -f ${WORKDIR}/run-ptest ]; then | ||
45 | install -D ${WORKDIR}/run-ptest ${D}${PTEST_PATH}/run-ptest | ||
46 | if grep -q install-ptest: Makefile; then | ||
47 | oe_runmake DESTDIR=${D}${PTEST_PATH} install-ptest | ||
48 | fi | ||
49 | if [ type -t do_install_ptest = function ]; then | ||
50 | do_install_ptest | ||
51 | fi | ||
52 | fi | ||
53 | fi | ||
54 | } | ||
55 | |||
56 | addtask configure_ptest_base after do_configure before do_compile | ||
57 | addtask compile_ptest_base after do_compile before do_install | ||
58 | addtask install_ptest_base after do_install before do_package | ||