diff options
| author | Yi Zhao <yi.zhao@windriver.com> | 2023-03-08 21:49:21 +0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2023-03-08 07:12:23 -0800 |
| commit | ea17a1bcffbac531702cb4b85d7f1c4bb010614a (patch) | |
| tree | f3945d39ef7db26c4706d713966a49e5f3fe30ab /meta-oe | |
| parent | f8b54b5243c9effb66d5685463b87767e753b843 (diff) | |
| download | meta-openembedded-ea17a1bcffbac531702cb4b85d7f1c4bb010614a.tar.gz | |
libyang: fix ptest
* Disable valgrind tests to get rid of valgrind runtime dependency. Then
libyang can support more arches.
* Only copy test cases to ptest directory, not the entire build
directory.
* Fix buildpaths issue for test cases.
* Update ptest cases list
Result:
$ ptest-runner libyang
START: ptest-runner
2023-03-08T07:10
BEGIN: /usr/lib/libyang/ptest
PASS: utest_binary
PASS: utest_bits
PASS: utest_boolean
PASS: utest_common
PASS: utest_decimal64
PASS: utest_diff
PASS: utest_empty
PASS: utest_enumeration
PASS: utest_hash_table
PASS: utest_identityref
PASS: utest_inet_types
PASS: utest_inout
PASS: utest_instanceid
PASS: utest_int16
PASS: utest_int32
PASS: utest_int64
PASS: utest_int8
PASS: utest_json
PASS: utest_leafref
PASS: utest_list
PASS: utest_lyb
PASS: utest_merge
PASS: utest_metadata
PASS: utest_nacm
PASS: utest_new
PASS: utest_parser_json
PASS: utest_parser_xml
PASS: utest_parser_yang
PASS: utest_parser_yin
PASS: utest_pattern
PASS: utest_printer_tree
PASS: utest_printer_xml
PASS: utest_printer_yang
PASS: utest_printer_yin
PASS: utest_plugins
PASS: utest_range
PASS: utest_schema
PASS: utest_schema_mount
PASS: utest_set
PASS: utest_string
PASS: utest_tree_data
PASS: utest_tree_schema_compile
PASS: utest_uint16
PASS: utest_uint32
PASS: utest_uint64
PASS: utest_uint8
PASS: utest_union
PASS: utest_validation
PASS: utest_xml
PASS: utest_xpath
PASS: utest_yangdata
PASS: utest_yang_types
PASS: utest_yanglib
DURATION: 12
END: /usr/lib/libyang/ptest
2023-03-08T07:10
STOP: ptest-runner
TOTAL: 1 FAIL: 0
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe')
| -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 | } | ||
