ptest-perl.bbclass 904 B

123456789101112131415161718192021222324252627282930
  1. inherit ptest
  2. FILESEXTRAPATHS_prepend := "${COREBASE}/meta/files:"
  3. SRC_URI += "file://ptest-perl/run-ptest"
  4. do_install_ptest_perl() {
  5. install -d ${D}${PTEST_PATH}
  6. if [ ! -f ${D}${PTEST_PATH}/run-ptest ]; then
  7. install -m 0755 ${WORKDIR}/ptest-perl/run-ptest ${D}${PTEST_PATH}
  8. fi
  9. cp -r ${B}/t ${D}${PTEST_PATH}
  10. chown -R root:root ${D}${PTEST_PATH}
  11. }
  12. FILES_${PN}-ptest_prepend = "${PTEST_PATH}/t/* ${PTEST_PATH}/run-ptest "
  13. RDEPENDS_${PN}-ptest_prepend = "perl "
  14. addtask install_ptest_perl after do_install_ptest_base before do_package
  15. python () {
  16. if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d):
  17. d.setVarFlag('do_install_ptest_perl', 'fakeroot', '1')
  18. # Remove all '*ptest_perl' tasks when ptest is not enabled
  19. if not(d.getVar('PTEST_ENABLED') == "1"):
  20. for i in ['do_install_ptest_perl']:
  21. bb.build.deltask(i, d)
  22. }