aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/libyang/libyang
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-extended/libyang/libyang')
-rw-r--r--meta-oe/recipes-extended/libyang/libyang/0001-test_context-skip-test-case-test_searchdirs.patch29
-rw-r--r--meta-oe/recipes-extended/libyang/libyang/run-ptest61
2 files changed, 32 insertions, 58 deletions
diff --git a/meta-oe/recipes-extended/libyang/libyang/0001-test_context-skip-test-case-test_searchdirs.patch b/meta-oe/recipes-extended/libyang/libyang/0001-test_context-skip-test-case-test_searchdirs.patch
new file mode 100644
index 0000000000..3c6aee9247
--- /dev/null
+++ b/meta-oe/recipes-extended/libyang/libyang/0001-test_context-skip-test-case-test_searchdirs.patch
@@ -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
+
diff --git a/meta-oe/recipes-extended/libyang/libyang/run-ptest b/meta-oe/recipes-extended/libyang/libyang/run-ptest
index 9682540e26..c507afb2f5 100644
--- a/meta-oe/recipes-extended/libyang/libyang/run-ptest
+++ b/meta-oe/recipes-extended/libyang/libyang/run-ptest
@@ -1,73 +1,18 @@
#!/bin/sh
-# Valid tests to run
-tests="utest_binary \
- utest_bits \
- utest_boolean \
- utest_common \
- utest_decimal64 \
- utest_diff \
- utest_empty \
- utest_enumeration \
- utest_hash_table \
- utest_identityref \
- utest_inet_types \
- utest_inout \
- utest_instanceid \
- utest_instanceid_keys \
- utest_int16 \
- utest_int32 \
- utest_int64 \
- utest_int8 \
- utest_json \
- utest_leafref \
- utest_list \
- utest_lyb \
- utest_merge \
- utest_metadata \
- utest_nacm \
- utest_new \
- utest_parser_json \
- utest_parser_xml \
- utest_pattern \
- utest_printer_tree \
- utest_printer_xml \
- utest_plugins \
- utest_range \
- utest_schema \
- utest_schema_mount \
- utest_set \
- utest_string \
- utest_structure \
- utest_tree_data \
- utest_tree_schema_compile \
- utest_uint16 \
- utest_uint32 \
- utest_uint64 \
- utest_uint8 \
- utest_union \
- utest_validation \
- utest_xml \
- utest_xpath \
- utest_yang \
- utest_yangdata \
- utest_yang_types \
- utest_yanglib \
- utest_yin"
# cd into right directory
ptestdir=$(dirname "$(readlink -f "$0")")
cd "$ptestdir"/tests || exit
-# Run specified tests
+tests=$(find * -type f -name 'utest_*')
+
for f in $tests
do
- if test -e ./"$f"; then
+ if test -x ./"$f"; then
if ./"$f" > ./"$f".out 2> ./"$f".err; then
echo "PASS: $f"
else
echo "FAIL: $f"
fi
- else
- echo "SKIP: $f"
fi
done