diff options
Diffstat (limited to 'meta-oe/recipes-test/cmocka/cmocka_2.0.2.bb')
| -rw-r--r-- | meta-oe/recipes-test/cmocka/cmocka_2.0.2.bb | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/meta-oe/recipes-test/cmocka/cmocka_2.0.2.bb b/meta-oe/recipes-test/cmocka/cmocka_2.0.2.bb new file mode 100644 index 0000000000..11e8db87d8 --- /dev/null +++ b/meta-oe/recipes-test/cmocka/cmocka_2.0.2.bb | |||
| @@ -0,0 +1,40 @@ | |||
| 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://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" | ||
| 8 | |||
| 9 | SRCREV = "fefa2b8a023121f7235e18ed17249e4012dd144f" | ||
| 10 | SRC_URI = "git://git.cryptomilk.org/projects/cmocka.git;protocol=https;branch=stable-2.0;tag=cmocka-${PV} \ | ||
| 11 | file://run-ptest \ | ||
| 12 | " | ||
| 13 | |||
| 14 | |||
| 15 | inherit cmake ptest | ||
| 16 | |||
| 17 | EXTRA_OECMAKE += "${@bb.utils.contains('PTEST_ENABLED', '1', '-DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=ON', '', d)}" | ||
| 18 | # Use -Wl,wrap linker flag, which does not work with LTO | ||
| 19 | LTO = "" | ||
| 20 | |||
| 21 | do_install:append () { | ||
| 22 | install -d ${D}${libdir}/${BPN}/example | ||
| 23 | install -d ${D}${libdir}/${BPN}/example/mock/chef_wrap | ||
| 24 | install -d ${D}${libdir}/${BPN}/example/mock/uptime | ||
| 25 | |||
| 26 | install -m 0755 ${B}/example/*_test ${D}/${libdir}/${BPN}/example | ||
| 27 | install -m 0755 ${B}/example/mock/chef_wrap/waiter_test_wrap ${D}/${libdir}/${BPN}/example/mock/chef_wrap | ||
| 28 | install -m 0755 ${B}/example/mock/uptime/uptime ${D}/${libdir}/${BPN}/example/mock/uptime | ||
| 29 | install -m 0755 ${B}/example/mock/uptime/test_uptime ${D}/${libdir}/${BPN}/example/mock/uptime | ||
| 30 | install -m 0644 ${B}/example/mock/uptime/libproc_uptime.so ${D}/${libdir}/${BPN}/example/mock/libproc_uptime.so | ||
| 31 | } | ||
| 32 | |||
| 33 | do_install_ptest () { | ||
| 34 | install -d ${D}${PTEST_PATH}/tests | ||
| 35 | install -m 0755 ${B}/tests/test_* ${D}${PTEST_PATH}/tests | ||
| 36 | } | ||
| 37 | |||
| 38 | PACKAGE_BEFORE_PN += "${PN}-examples" | ||
| 39 | |||
| 40 | FILES:${PN}-examples = "${libdir}/${BPN}/example" | ||
