Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1 | inherit ptest |
| 2 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 3 | FILESEXTRAPATHS:prepend := "${COREBASE}/meta/files:" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 4 | |
| 5 | SRC_URI += "file://ptest-perl/run-ptest" |
| 6 | |
| 7 | do_install_ptest_perl() { |
| 8 | install -d ${D}${PTEST_PATH} |
| 9 | if [ ! -f ${D}${PTEST_PATH}/run-ptest ]; then |
| 10 | install -m 0755 ${WORKDIR}/ptest-perl/run-ptest ${D}${PTEST_PATH} |
| 11 | fi |
| 12 | cp -r ${B}/t ${D}${PTEST_PATH} |
| 13 | chown -R root:root ${D}${PTEST_PATH} |
| 14 | } |
| 15 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 16 | FILES:${PN}-ptest:prepend = "${PTEST_PATH}/t/* ${PTEST_PATH}/run-ptest " |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 17 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 18 | RDEPENDS:${PN}-ptest:prepend = "perl " |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 19 | |
| 20 | addtask install_ptest_perl after do_install_ptest_base before do_package |
| 21 | |
| 22 | python () { |
| 23 | if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d): |
| 24 | d.setVarFlag('do_install_ptest_perl', 'fakeroot', '1') |
| 25 | |
| 26 | # Remove all '*ptest_perl' tasks when ptest is not enabled |
| 27 | if not(d.getVar('PTEST_ENABLED') == "1"): |
| 28 | for i in ['do_install_ptest_perl']: |
| 29 | bb.build.deltask(i, d) |
| 30 | } |