added my Recipes

This commit is contained in:
2024-07-11 14:16:35 +02:00
parent 38bc4f53ac
commit 09b621d929
7118 changed files with 525762 additions and 3 deletions

View File

@@ -0,0 +1,29 @@
From 5de24e1b39c09adb0c5bf4bb4228bd1bb935542a Mon Sep 17 00:00:00 2001
From: Yi Zhao <yi.zhao@windriver.com>
Date: Wed, 22 Mar 2023 16:03:56 +0800
Subject: [PATCH] test_context: skip test case test_searchdirs
Skip test case test_searchdirs as it searchs the source code directory.
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
tests/utests/basic/test_context.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/tests/utests/basic/test_context.c b/tests/utests/basic/test_context.c
index cfba1d30f..8c3bb7ad6 100644
--- a/tests/utests/basic/test_context.c
+++ b/tests/utests/basic/test_context.c
@@ -1061,7 +1061,6 @@ int
main(void)
{
const struct CMUnitTest tests[] = {
- UTEST(test_searchdirs),
UTEST(test_options),
UTEST(test_models),
UTEST(test_imports),
--
2.25.1

View File

@@ -0,0 +1,18 @@
#!/bin/sh
# cd into right directory
ptestdir=$(dirname "$(readlink -f "$0")")
cd "$ptestdir"/tests || exit
tests=$(find * -type f -name 'utest_*')
for f in $tests
do
if test -x ./"$f"; then
if ./"$f" > ./"$f".out 2> ./"$f".err; then
echo "PASS: $f"
else
echo "FAIL: $f"
fi
fi
done

View File

@@ -0,0 +1,41 @@
SUMMARY = "YANG data modeling language library"
DESCRIPTION = "libyang is a YANG data modelling language parser and toolkit written (and providing API) in C."
HOMEPAGE = "https://github.com/CESNET/libyang"
SECTION = "libs"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=f3916d7d8d42a6508d0ea418cfff10ad"
SRCREV = "9a4e5b2ce30b9696116d6e654ee55caab5aafed8"
SRC_URI = "git://github.com/CESNET/libyang.git;branch=master;protocol=https \
file://0001-test_context-skip-test-case-test_searchdirs.patch \
file://run-ptest \
"
S = "${WORKDIR}/git"
# Main dependencies
inherit cmake pkgconfig lib_package ptest
DEPENDS = "libpcre2"
DEPENDS += "${@bb.utils.contains('PTEST_ENABLED', '1', 'cmocka', '', d)}"
EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release"
EXTRA_OECMAKE += " ${@bb.utils.contains('PTEST_ENABLED', '1', '-DENABLE_TESTS=ON -DENABLE_VALGRIND_TESTS=OFF', '', d)}"
do_compile:prepend () {
if [ ${PTEST_ENABLED} = "1" ]; then
sed -i -e 's|${S}|${PTEST_PATH}|g' ${B}/tests/tests_config.h
sed -i -e 's|${B}|${PTEST_PATH}|g' ${B}/tests/tests_config.h
fi
}
do_install_ptest () {
install -d ${D}${PTEST_PATH}/tests
cp -f ${B}/tests/utest_* ${D}${PTEST_PATH}/tests/
cp -fR ${S}/tests/modules ${D}${PTEST_PATH}/tests/
install -d ${D}${PTEST_PATH}/tests/plugins
cp -f ${B}/tests/plugins/plugin_*.so ${D}${PTEST_PATH}/tests/plugins/
}
FILES:${PN} += "${datadir}/yang/*"