Re: [OE-core] [meta][kirkstone][PATCH] json-c: Add ptest

2023-11-28 Thread Steve Sakoman
On Sun, Nov 26, 2023 at 8:53 PM Pawan Badganchi  wrote:
>
> Hi,
>
> Could you please take this change

???

You previously asked me to ignore this patch!

Steve

> 
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#191389): 
https://lists.openembedded.org/g/openembedded-core/message/191389
Mute This Topic: https://lists.openembedded.org/mt/98039591/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [meta][kirkstone][PATCH] json-c: Add ptest

2023-11-26 Thread Pawan Badganchi
Hi,

Could you please take this change

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#191254): 
https://lists.openembedded.org/g/openembedded-core/message/191254
Mute This Topic: https://lists.openembedded.org/mt/98039591/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [meta][kirkstone][PATCH] json-c: Add ptest

2023-04-03 Thread Pawan Badganchi
From: Anuj Chougule 

Re-used implicit test suite and converted it into ptest.

Signed-off-by: pawan 
---
 meta/recipes-devtools/json-c/json-c/run-ptest | 14 +
 meta/recipes-devtools/json-c/json-c_0.15.bb   | 21 ---
 2 files changed, 32 insertions(+), 3 deletions(-)
 create mode 100644 meta/recipes-devtools/json-c/json-c/run-ptest

diff --git a/meta/recipes-devtools/json-c/json-c/run-ptest 
b/meta/recipes-devtools/json-c/json-c/run-ptest
new file mode 100644
index 00..570aac4588
--- /dev/null
+++ b/meta/recipes-devtools/json-c/json-c/run-ptest
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -eux
+cd tests
+for t in test1 test2 test4
+do
+echo "Running $t.test..."
+if "./$t.test"
+then
+echo "PASS:$t"
+else
+echo "FAIL:$t"
+fi
+done
diff --git a/meta/recipes-devtools/json-c/json-c_0.15.bb 
b/meta/recipes-devtools/json-c/json-c_0.15.bb
index a4673a2f0e..4070078089 100644
--- a/meta/recipes-devtools/json-c/json-c_0.15.bb
+++ b/meta/recipes-devtools/json-c/json-c_0.15.bb
@@ -4,8 +4,9 @@ HOMEPAGE = "https://github.com/json-c/json-c/wiki;
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2"
 
-SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz;
-
+SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz \
+   file://run-ptest \
+   "
 SRC_URI[sha256sum] = 
"b8d80a1ddb718b3ba7492916237bbf86609e9709fb007e7f7d4322f02341a4c6"
 
 UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/tags;
@@ -13,6 +14,20 @@ UPSTREAM_CHECK_REGEX = "json-c-(?P\d+(\.\d+)+)-\d+"
 
 RPROVIDES:${PN} = "libjson"
 
-inherit cmake
+inherit cmake ptest
 
 BBCLASSEXTEND = "native nativesdk"
+
+RDEPENDS_${PN}-ptest += "bash"
+
+do_compile_ptest() {
+oe_runmake -C tests test1 test2 test4
+}
+
+do_install_ptest() {
+mkdir "${D}${PTEST_PATH}/tests"
+for t in test1 test2 test4; do
+cp "${S}/tests/$t"* "${D}${PTEST_PATH}/tests/"
+done
+cp "${S}/tests/test-defs.sh" "${D}${PTEST_PATH}/tests/"
+}
-- 
2.38.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#179645): 
https://lists.openembedded.org/g/openembedded-core/message/179645
Mute This Topic: https://lists.openembedded.org/mt/98039591/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-