diff options
| -rw-r--r-- | meta-oe/recipes-extended/libyang/libyang/run-ptest | 29 | ||||
| -rw-r--r-- | meta-oe/recipes-extended/libyang/libyang_2.0.194.bb | 24 |
2 files changed, 41 insertions, 12 deletions
diff --git a/meta-oe/recipes-extended/libyang/libyang/run-ptest b/meta-oe/recipes-extended/libyang/libyang/run-ptest index 1c9f8f47f7..4517725b49 100644 --- a/meta-oe/recipes-extended/libyang/libyang/run-ptest +++ b/meta-oe/recipes-extended/libyang/libyang/run-ptest | |||
| @@ -2,28 +2,55 @@ | |||
| 2 | # Valid tests to run | 2 | # Valid tests to run |
| 3 | tests="utest_binary \ | 3 | tests="utest_binary \ |
| 4 | utest_bits \ | 4 | utest_bits \ |
| 5 | utest_boolean \ | ||
| 5 | utest_common \ | 6 | utest_common \ |
| 7 | utest_decimal64 \ | ||
| 8 | utest_diff \ | ||
| 9 | utest_empty \ | ||
| 10 | utest_enumeration \ | ||
| 6 | utest_hash_table \ | 11 | utest_hash_table \ |
| 12 | utest_identityref \ | ||
| 7 | utest_inet_types \ | 13 | utest_inet_types \ |
| 14 | utest_inout \ | ||
| 15 | utest_instanceid \ | ||
| 16 | utest_int16 \ | ||
| 17 | utest_int32 \ | ||
| 18 | utest_int64 \ | ||
| 8 | utest_int8 \ | 19 | utest_int8 \ |
| 9 | utest_json \ | 20 | utest_json \ |
| 21 | utest_leafref \ | ||
| 10 | utest_list \ | 22 | utest_list \ |
| 23 | utest_lyb \ | ||
| 11 | utest_merge \ | 24 | utest_merge \ |
| 12 | utest_metadata \ | 25 | utest_metadata \ |
| 26 | utest_nacm \ | ||
| 27 | utest_new \ | ||
| 28 | utest_parser_json \ | ||
| 29 | utest_parser_xml \ | ||
| 13 | utest_parser_yang \ | 30 | utest_parser_yang \ |
| 14 | utest_parser_yin \ | 31 | utest_parser_yin \ |
| 15 | utest_pattern \ | 32 | utest_pattern \ |
| 33 | utest_printer_tree \ | ||
| 34 | utest_printer_xml \ | ||
| 16 | utest_printer_yang \ | 35 | utest_printer_yang \ |
| 17 | utest_printer_yin \ | 36 | utest_printer_yin \ |
| 37 | utest_plugins \ | ||
| 18 | utest_range \ | 38 | utest_range \ |
| 19 | utest_schema \ | 39 | utest_schema \ |
| 40 | utest_schema_mount \ | ||
| 20 | utest_set \ | 41 | utest_set \ |
| 21 | utest_string \ | 42 | utest_string \ |
| 22 | utest_tree_data \ | 43 | utest_tree_data \ |
| 23 | utest_tree_schema_compile \ | 44 | utest_tree_schema_compile \ |
| 24 | utest_types \ | 45 | utest_uint16 \ |
| 46 | utest_uint32 \ | ||
| 47 | utest_uint64 \ | ||
| 48 | utest_uint8 \ | ||
| 49 | utest_union \ | ||
| 50 | utest_validation \ | ||
| 25 | utest_xml \ | 51 | utest_xml \ |
| 26 | utest_xpath \ | 52 | utest_xpath \ |
| 53 | utest_yangdata \ | ||
| 27 | utest_yang_types \ | 54 | utest_yang_types \ |
| 28 | utest_yanglib" | 55 | utest_yanglib" |
| 29 | 56 | ||
diff --git a/meta-oe/recipes-extended/libyang/libyang_2.0.194.bb b/meta-oe/recipes-extended/libyang/libyang_2.0.194.bb index 548dcdd2f5..16630a7150 100644 --- a/meta-oe/recipes-extended/libyang/libyang_2.0.194.bb +++ b/meta-oe/recipes-extended/libyang/libyang_2.0.194.bb | |||
| @@ -15,23 +15,25 @@ SRC_URI = "git://github.com/CESNET/libyang.git;branch=master;protocol=https \ | |||
| 15 | 15 | ||
| 16 | S = "${WORKDIR}/git" | 16 | S = "${WORKDIR}/git" |
| 17 | 17 | ||
| 18 | # Due to valgrind not supported on these arches: | ||
| 19 | COMPATIBLE_HOST:riscv32 = "null" | ||
| 20 | COMPATIBLE_HOST:armv5 = "null" | ||
| 21 | COMPATIBLE_HOST:riscv64 = "null" | ||
| 22 | |||
| 23 | # Main dependencies | 18 | # Main dependencies |
| 24 | inherit cmake pkgconfig lib_package ptest | 19 | inherit cmake pkgconfig lib_package ptest |
| 25 | DEPENDS = "libpcre2" | 20 | DEPENDS = "libpcre2" |
| 26 | DEPENDS += "${@bb.utils.contains('PTEST_ENABLED', '1', 'cmocka', '', d)}" | 21 | DEPENDS += "${@bb.utils.contains('PTEST_ENABLED', '1', 'cmocka', '', d)}" |
| 27 | 22 | ||
| 28 | # Ptest dependencies | ||
| 29 | RDEPENDS:${PN}-ptest += "valgrind" | ||
| 30 | |||
| 31 | EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release" | 23 | EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release" |
| 32 | EXTRA_OECMAKE += " ${@bb.utils.contains('PTEST_ENABLED', '1', '-DENABLE_TESTS=ON', '', d)}" | 24 | EXTRA_OECMAKE += " ${@bb.utils.contains('PTEST_ENABLED', '1', '-DENABLE_TESTS=ON -DENABLE_VALGRIND_TESTS=OFF', '', d)}" |
| 33 | 25 | ||
| 34 | do_install_ptest () { | 26 | do_compile:prepend () { |
| 35 | cp -fR ${B}/tests/ ${D}${PTEST_PATH}/ | 27 | if [ ${PTEST_ENABLED} = "1" ]; then |
| 28 | sed -i -e 's|${S}|${PTEST_PATH}|g' ${B}/tests/tests_config.h | ||
| 29 | sed -i -e 's|${B}|${PTEST_PATH}|g' ${B}/tests/tests_config.h | ||
| 30 | fi | ||
| 36 | } | 31 | } |
| 37 | 32 | ||
| 33 | do_install_ptest () { | ||
| 34 | install -d ${D}${PTEST_PATH}/tests | ||
| 35 | cp -f ${B}/tests/utest_* ${D}${PTEST_PATH}/tests/ | ||
| 36 | cp -fR ${S}/tests/modules ${D}${PTEST_PATH}/tests/ | ||
| 37 | install -d ${D}${PTEST_PATH}/tests/plugins | ||
| 38 | cp -f ${B}/tests/plugins/plugin_*.so ${D}${PTEST_PATH}/tests/plugins/ | ||
| 39 | } | ||
