Andrew Geissler | a2681d9 | 2020-10-16 10:17:07 -0500 | [diff] [blame] | 1 | DESCRIPTION = "cmocka is an elegant unit testing framework for C with support for mock \ |
| 2 | objects. It only requires the standard C library, works on a range of computing \ |
| 3 | platforms (including embedded) and with different compilers." |
| 4 | HOMEPAGE = "https://cmocka.org/" |
| 5 | |
| 6 | LICENSE = "Apache-2.0" |
| 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57" |
| 8 | |
| 9 | SRCREV = "56eb3a183fc222120f86d0c54fd033992c30135e" |
| 10 | SRC_URI = "git://git.cryptomilk.org/projects/cmocka.git \ |
| 11 | file://run-ptest \ |
| 12 | file://cmocka-uintptr_t.patch \ |
| 13 | " |
| 14 | |
| 15 | S = "${WORKDIR}/git" |
| 16 | |
| 17 | inherit cmake ptest |
| 18 | |
| 19 | EXTRA_OECMAKE = "${@bb.utils.contains('PTEST_ENABLED', '1', '-DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=ON', '', d)}" |
| 20 | |
| 21 | do_install_append () { |
| 22 | install -d ${D}${datadir}/${BPN}/example |
| 23 | install -d ${D}${datadir}/${BPN}/example/mock/chef_wrap |
| 24 | install -d ${D}${datadir}/${BPN}/example/mock/uptime |
| 25 | |
| 26 | install -m 0755 ${B}/example/*_test ${D}/${datadir}/${BPN}/example |
| 27 | install -m 0755 ${B}/example/mock/chef_wrap/waiter_test_wrap ${D}/${datadir}/${BPN}/example/mock/chef_wrap |
| 28 | install -m 0755 ${B}/example/mock/uptime/uptime ${D}/${datadir}/${BPN}/example/mock/uptime |
| 29 | install -m 0755 ${B}/example/mock/uptime/test_uptime ${D}/${datadir}/${BPN}/example/mock/uptime |
| 30 | } |
| 31 | |
| 32 | do_install_ptest () { |
| 33 | install -d ${D}${PTEST_PATH}/tests |
| 34 | install -m 0755 ${B}/tests/test_* ${D}${PTEST_PATH}/tests |
| 35 | } |
| 36 | |
| 37 | PACKAGE_BEFORE_PN += "${PN}-examples" |
| 38 | |
| 39 | FILES_${PN}-examples = "${datadir}/${BPN}/example" |