diff mbox series

[meta-oe,v2,1/2] libplist: add ptest support

Message ID 20251120032931.3639995-1-ankur.tyagi85@gmail.com
State New
Headers show
Series [meta-oe,v2,1/2] libplist: add ptest support | expand

Commit Message

Ankur Tyagi Nov. 20, 2025, 3:29 a.m. UTC
From: Ankur Tyagi <ankur.tyagi85@gmail.com>

Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
---
changes in v2:
- added patch to fix ptest error
---
 .../include/ptest-packagelists-meta-oe.inc    |  1 +
 .../0001-test-fix-operator-error.patch        | 68 +++++++++++++++++++
 .../libimobiledevice/libplist/run-ptest       |  6 ++
 .../libimobiledevice/libplist_2.6.0.bb        | 31 ++++++++-
 4 files changed, 104 insertions(+), 2 deletions(-)
 create mode 100644 meta-oe/recipes-extended/libimobiledevice/libplist/0001-test-fix-operator-error.patch
 create mode 100644 meta-oe/recipes-extended/libimobiledevice/libplist/run-ptest

Comments

Khem Raj Nov. 20, 2025, 5:22 a.m. UTC | #1
Hmm, I have applied v1 already, so please rebase this on top of the latest
master and resend the delta, this will need to be backported to whinlatter
too.

On Wed, Nov 19, 2025 at 7:29 PM Ankur Tyagi via lists.openembedded.org
<ankur.tyagi85=gmail.com@lists.openembedded.org> wrote:

> From: Ankur Tyagi <ankur.tyagi85@gmail.com>
>
> Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
> ---
> changes in v2:
> - added patch to fix ptest error
> ---
>  .../include/ptest-packagelists-meta-oe.inc    |  1 +
>  .../0001-test-fix-operator-error.patch        | 68 +++++++++++++++++++
>  .../libimobiledevice/libplist/run-ptest       |  6 ++
>  .../libimobiledevice/libplist_2.6.0.bb        | 31 ++++++++-
>  4 files changed, 104 insertions(+), 2 deletions(-)
>  create mode 100644
> meta-oe/recipes-extended/libimobiledevice/libplist/0001-test-fix-operator-error.patch
>  create mode 100644
> meta-oe/recipes-extended/libimobiledevice/libplist/run-ptest
>
> diff --git a/meta-oe/conf/include/ptest-packagelists-meta-oe.inc
> b/meta-oe/conf/include/ptest-packagelists-meta-oe.inc
> index 09b1dbb3e1..25db9fe5cc 100644
> --- a/meta-oe/conf/include/ptest-packagelists-meta-oe.inc
> +++ b/meta-oe/conf/include/ptest-packagelists-meta-oe.inc
> @@ -54,6 +54,7 @@ PTESTS_FAST_META_OE = "\
>      xmlsec1 \
>      zeromq \
>      cjson \
> +    libplist \
>  "
>  PTESTS_FAST_META_OE:append:x86 = " mcelog"
>  PTESTS_FAST_META_OE:append:x86-64 = " mcelog"
> diff --git
> a/meta-oe/recipes-extended/libimobiledevice/libplist/0001-test-fix-operator-error.patch
> b/meta-oe/recipes-extended/libimobiledevice/libplist/0001-test-fix-operator-error.patch
> new file mode 100644
> index 0000000000..0866851537
> --- /dev/null
> +++
> b/meta-oe/recipes-extended/libimobiledevice/libplist/0001-test-fix-operator-error.patch
> @@ -0,0 +1,68 @@
> +From 18e5b22a71f85091127cc063db79c8df687c582c Mon Sep 17 00:00:00 2001
> +From: Ankur Tyagi <ankur.tyagi85@gmail.com>
> +Date: Thu, 20 Nov 2025 16:01:58 +1300
> +Subject: [PATCH] test: fix operator error
> +
> +Otherwise test fail with error [: -neq: binary operator expected
> +
> +Upstream-Status: Submitted [
> https://github.com/libimobiledevice/libplist/pull/284]
> +Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
> +---
> + test/json-invalid-types.test  | 6 +++---
> + test/ostep-invalid-types.test | 6 +++---
> + 2 files changed, 6 insertions(+), 6 deletions(-)
> +
> +diff --git a/test/json-invalid-types.test b/test/json-invalid-types.test
> +index c532316..a21fcd9 100755
> +--- a/test/json-invalid-types.test
> ++++ b/test/json-invalid-types.test
> +@@ -14,19 +14,19 @@ export PLIST_JSON_DEBUG=1
> +
> + echo "Converting (failure expected)"
> + $top_builddir/tools/plistutil -f json -i $DATASRC/$TESTFILE0 -o /dev/null
> +-if [ $? -neq 2 ]; then
> ++if [ $? -ne 2 ]; then
> +   exit 1
> + fi
> +
> + echo "Converting (failure expected)"
> + $top_builddir/tools/plistutil -f json -i $DATASRC/$TESTFILE1 -o /dev/null
> +-if [ $? -neq 2 ]; then
> ++if [ $? -ne 2 ]; then
> +   exit 2
> + fi
> +
> + echo "Converting (failure expected)"
> + $top_builddir/tools/plistutil -f json -i $DATASRC/$TESTFILE2 -o /dev/null
> +-if [ $? -neq 2 ]; then
> ++if [ $? -ne 2 ]; then
> +   exit 3
> + fi
> +
> +diff --git a/test/ostep-invalid-types.test b/test/ostep-invalid-types.test
> +index 9222394..240505c 100755
> +--- a/test/ostep-invalid-types.test
> ++++ b/test/ostep-invalid-types.test
> +@@ -14,19 +14,19 @@ export PLIST_OSTEP_DEBUG=1
> +
> + echo "Converting (failure expected)"
> + $top_builddir/tools/plistutil -f openstep -i $DATASRC/$TESTFILE0 -o
> /dev/null
> +-if [ $? -neq 2 ]; then
> ++if [ $? -ne 2 ]; then
> +   exit 1
> + fi
> +
> + echo "Converting (failure expected)"
> + $top_builddir/tools/plistutil -f openstepn -i $DATASRC/$TESTFILE1 -o
> /dev/null
> +-if [ $? -neq 2 ]; then
> ++if [ $? -ne 2 ]; then
> +   exit 2
> + fi
> +
> + echo "Converting (failure expected)"
> + $top_builddir/tools/plistutil -f openstep -i $DATASRC/$TESTFILE2 -o
> /dev/null
> +-if [ $? -neq 2 ]; then
> ++if [ $? -ne 2 ]; then
> +   exit 3
> + fi
> +
> diff --git a/meta-oe/recipes-extended/libimobiledevice/libplist/run-ptest
> b/meta-oe/recipes-extended/libimobiledevice/libplist/run-ptest
> new file mode 100644
> index 0000000000..ed940af5f6
> --- /dev/null
> +++ b/meta-oe/recipes-extended/libimobiledevice/libplist/run-ptest
> @@ -0,0 +1,6 @@
> +#!/bin/sh
> +
> +for t in `ls test/*.test`; do
> +       top_srcdir=$(pwd)/input top_builddir=$(pwd)/test ./$t && echo
> PASS: $t || echo FAIL: $t
> +       rm $(pwd)/test/test/data/* 2>/dev/null
> +done
> diff --git a/meta-oe/recipes-extended/libimobiledevice/libplist_2.6.0.bb
> b/meta-oe/recipes-extended/libimobiledevice/libplist_2.6.0.bb
> index 7f01962a97..831b74cd1f 100644
> --- a/meta-oe/recipes-extended/libimobiledevice/libplist_2.6.0.bb
> +++ b/meta-oe/recipes-extended/libimobiledevice/libplist_2.6.0.bb
> @@ -6,10 +6,13 @@ LIC_FILES_CHKSUM =
> "file://COPYING;md5=ebb5c50ab7cab4baeffba14977030c07 \
>
>  DEPENDS = "libxml2 glib-2.0 swig python3"
>
> -inherit autotools pkgconfig python3native python3targetconfig
> +inherit autotools pkgconfig python3native python3targetconfig ptest
>
>  SRCREV = "2117b8fdb6b4096455bd2041a63e59a028120136"
> -SRC_URI = "git://
> github.com/libimobiledevice/libplist;protocol=https;branch=master"
> +SRC_URI = "git://
> github.com/libimobiledevice/libplist;protocol=https;branch=master \
> +           file://run-ptest \
> +           file://0001-test-fix-operator-error.patch \
> +"
>
>
>  CVE_STATUS_GROUPS += "CVE_STATUS_LIBLIST"
> @@ -30,6 +33,28 @@ do_install:append () {
>      fi
>  }
>
> +do_install_ptest(){
> +    # tests expect a particular directory structure for input and output
> +    install -d ${D}${PTEST_PATH}/input/test/data
> +    install -d ${D}${PTEST_PATH}/test/tools
> +    install -d ${D}${PTEST_PATH}/test/test/.libs
> +    install -d ${D}${PTEST_PATH}/test/test/data
> +    install ${S}/test/data/* ${D}${PTEST_PATH}/input/test/data/
> +    install ${S}/test/*.test ${D}${PTEST_PATH}/test/
> +    install -m 0755 ${B}/test/.libs/plist*
> ${D}${PTEST_PATH}/test/test/.libs/
> +    install -m 0755 ${B}/test/.libs/integer_set_test
> ${D}${PTEST_PATH}/test/test/
> +    for t in $(find ${B}/test -type f -name 'plist*' \! -name '*.o'); do
> +        install -m 0755 $t ${D}${PTEST_PATH}/test/test/
> +    done
> +    for t in $(find ${B}/tools -type f -name 'plist*' \! -name '*.o'); do
> +        install -m 0755 $t ${D}${PTEST_PATH}/test/tools/
> +    done
> +    sed -i 's@LD_LIBRARY_PATH="[^"]*:@LD_LIBRARY_PATH="@g' \
> +        ${D}${PTEST_PATH}/test/test/plist_cmp
> +    sed -i 's@LD_LIBRARY_PATH="[^"]*:@LD_LIBRARY_PATH="@g' \
> +        ${D}${PTEST_PATH}/test/test/plist_test
> +}
> +
>  PACKAGES =+ "${PN}-utils \
>               ${PN}++ \
>               ${PN}-python"
> @@ -38,3 +63,5 @@ FILES:${PN} = "${libdir}/libplist-2.0${SOLIBS}"
>  FILES:${PN}++ = "${libdir}/libplist++-2.0${SOLIBS}"
>  FILES:${PN}-utils = "${bindir}/*"
>  FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/*"
> +
> +RDEPENDS:${PN}-ptest += "bash"
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#121921):
> https://lists.openembedded.org/g/openembedded-devel/message/121921
> Mute This Topic: https://lists.openembedded.org/mt/116386363/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [
> raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
Ankur Tyagi Nov. 20, 2025, 5:47 a.m. UTC | #2
On Thu, Nov 20, 2025 at 6:22 PM Khem Raj <raj.khem@gmail.com> wrote:
>
> Hmm, I have applied v1 already, so please rebase this on top of the latest master and resend the delta, this will need to be backported to whinlatter too.

please drop this patch, I have sent another one.

>
> On Wed, Nov 19, 2025 at 7:29 PM Ankur Tyagi via lists.openembedded.org <ankur.tyagi85=gmail.com@lists.openembedded.org> wrote:
>>
>> From: Ankur Tyagi <ankur.tyagi85@gmail.com>
>>
>> Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
>> ---
>> changes in v2:
>> - added patch to fix ptest error
>> ---
>>  .../include/ptest-packagelists-meta-oe.inc    |  1 +
>>  .../0001-test-fix-operator-error.patch        | 68 +++++++++++++++++++
>>  .../libimobiledevice/libplist/run-ptest       |  6 ++
>>  .../libimobiledevice/libplist_2.6.0.bb        | 31 ++++++++-
>>  4 files changed, 104 insertions(+), 2 deletions(-)
>>  create mode 100644 meta-oe/recipes-extended/libimobiledevice/libplist/0001-test-fix-operator-error.patch
>>  create mode 100644 meta-oe/recipes-extended/libimobiledevice/libplist/run-ptest
>>
>> diff --git a/meta-oe/conf/include/ptest-packagelists-meta-oe.inc b/meta-oe/conf/include/ptest-packagelists-meta-oe.inc
>> index 09b1dbb3e1..25db9fe5cc 100644
>> --- a/meta-oe/conf/include/ptest-packagelists-meta-oe.inc
>> +++ b/meta-oe/conf/include/ptest-packagelists-meta-oe.inc
>> @@ -54,6 +54,7 @@ PTESTS_FAST_META_OE = "\
>>      xmlsec1 \
>>      zeromq \
>>      cjson \
>> +    libplist \
>>  "
>>  PTESTS_FAST_META_OE:append:x86 = " mcelog"
>>  PTESTS_FAST_META_OE:append:x86-64 = " mcelog"
>> diff --git a/meta-oe/recipes-extended/libimobiledevice/libplist/0001-test-fix-operator-error.patch b/meta-oe/recipes-extended/libimobiledevice/libplist/0001-test-fix-operator-error.patch
>> new file mode 100644
>> index 0000000000..0866851537
>> --- /dev/null
>> +++ b/meta-oe/recipes-extended/libimobiledevice/libplist/0001-test-fix-operator-error.patch
>> @@ -0,0 +1,68 @@
>> +From 18e5b22a71f85091127cc063db79c8df687c582c Mon Sep 17 00:00:00 2001
>> +From: Ankur Tyagi <ankur.tyagi85@gmail.com>
>> +Date: Thu, 20 Nov 2025 16:01:58 +1300
>> +Subject: [PATCH] test: fix operator error
>> +
>> +Otherwise test fail with error [: -neq: binary operator expected
>> +
>> +Upstream-Status: Submitted [https://github.com/libimobiledevice/libplist/pull/284]
>> +Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
>> +---
>> + test/json-invalid-types.test  | 6 +++---
>> + test/ostep-invalid-types.test | 6 +++---
>> + 2 files changed, 6 insertions(+), 6 deletions(-)
>> +
>> +diff --git a/test/json-invalid-types.test b/test/json-invalid-types.test
>> +index c532316..a21fcd9 100755
>> +--- a/test/json-invalid-types.test
>> ++++ b/test/json-invalid-types.test
>> +@@ -14,19 +14,19 @@ export PLIST_JSON_DEBUG=1
>> +
>> + echo "Converting (failure expected)"
>> + $top_builddir/tools/plistutil -f json -i $DATASRC/$TESTFILE0 -o /dev/null
>> +-if [ $? -neq 2 ]; then
>> ++if [ $? -ne 2 ]; then
>> +   exit 1
>> + fi
>> +
>> + echo "Converting (failure expected)"
>> + $top_builddir/tools/plistutil -f json -i $DATASRC/$TESTFILE1 -o /dev/null
>> +-if [ $? -neq 2 ]; then
>> ++if [ $? -ne 2 ]; then
>> +   exit 2
>> + fi
>> +
>> + echo "Converting (failure expected)"
>> + $top_builddir/tools/plistutil -f json -i $DATASRC/$TESTFILE2 -o /dev/null
>> +-if [ $? -neq 2 ]; then
>> ++if [ $? -ne 2 ]; then
>> +   exit 3
>> + fi
>> +
>> +diff --git a/test/ostep-invalid-types.test b/test/ostep-invalid-types.test
>> +index 9222394..240505c 100755
>> +--- a/test/ostep-invalid-types.test
>> ++++ b/test/ostep-invalid-types.test
>> +@@ -14,19 +14,19 @@ export PLIST_OSTEP_DEBUG=1
>> +
>> + echo "Converting (failure expected)"
>> + $top_builddir/tools/plistutil -f openstep -i $DATASRC/$TESTFILE0 -o /dev/null
>> +-if [ $? -neq 2 ]; then
>> ++if [ $? -ne 2 ]; then
>> +   exit 1
>> + fi
>> +
>> + echo "Converting (failure expected)"
>> + $top_builddir/tools/plistutil -f openstepn -i $DATASRC/$TESTFILE1 -o /dev/null
>> +-if [ $? -neq 2 ]; then
>> ++if [ $? -ne 2 ]; then
>> +   exit 2
>> + fi
>> +
>> + echo "Converting (failure expected)"
>> + $top_builddir/tools/plistutil -f openstep -i $DATASRC/$TESTFILE2 -o /dev/null
>> +-if [ $? -neq 2 ]; then
>> ++if [ $? -ne 2 ]; then
>> +   exit 3
>> + fi
>> +
>> diff --git a/meta-oe/recipes-extended/libimobiledevice/libplist/run-ptest b/meta-oe/recipes-extended/libimobiledevice/libplist/run-ptest
>> new file mode 100644
>> index 0000000000..ed940af5f6
>> --- /dev/null
>> +++ b/meta-oe/recipes-extended/libimobiledevice/libplist/run-ptest
>> @@ -0,0 +1,6 @@
>> +#!/bin/sh
>> +
>> +for t in `ls test/*.test`; do
>> +       top_srcdir=$(pwd)/input top_builddir=$(pwd)/test ./$t && echo PASS: $t || echo FAIL: $t
>> +       rm $(pwd)/test/test/data/* 2>/dev/null
>> +done
>> diff --git a/meta-oe/recipes-extended/libimobiledevice/libplist_2.6.0.bb b/meta-oe/recipes-extended/libimobiledevice/libplist_2.6.0.bb
>> index 7f01962a97..831b74cd1f 100644
>> --- a/meta-oe/recipes-extended/libimobiledevice/libplist_2.6.0.bb
>> +++ b/meta-oe/recipes-extended/libimobiledevice/libplist_2.6.0.bb
>> @@ -6,10 +6,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=ebb5c50ab7cab4baeffba14977030c07 \
>>
>>  DEPENDS = "libxml2 glib-2.0 swig python3"
>>
>> -inherit autotools pkgconfig python3native python3targetconfig
>> +inherit autotools pkgconfig python3native python3targetconfig ptest
>>
>>  SRCREV = "2117b8fdb6b4096455bd2041a63e59a028120136"
>> -SRC_URI = "git://github.com/libimobiledevice/libplist;protocol=https;branch=master"
>> +SRC_URI = "git://github.com/libimobiledevice/libplist;protocol=https;branch=master \
>> +           file://run-ptest \
>> +           file://0001-test-fix-operator-error.patch \
>> +"
>>
>>
>>  CVE_STATUS_GROUPS += "CVE_STATUS_LIBLIST"
>> @@ -30,6 +33,28 @@ do_install:append () {
>>      fi
>>  }
>>
>> +do_install_ptest(){
>> +    # tests expect a particular directory structure for input and output
>> +    install -d ${D}${PTEST_PATH}/input/test/data
>> +    install -d ${D}${PTEST_PATH}/test/tools
>> +    install -d ${D}${PTEST_PATH}/test/test/.libs
>> +    install -d ${D}${PTEST_PATH}/test/test/data
>> +    install ${S}/test/data/* ${D}${PTEST_PATH}/input/test/data/
>> +    install ${S}/test/*.test ${D}${PTEST_PATH}/test/
>> +    install -m 0755 ${B}/test/.libs/plist* ${D}${PTEST_PATH}/test/test/.libs/
>> +    install -m 0755 ${B}/test/.libs/integer_set_test ${D}${PTEST_PATH}/test/test/
>> +    for t in $(find ${B}/test -type f -name 'plist*' \! -name '*.o'); do
>> +        install -m 0755 $t ${D}${PTEST_PATH}/test/test/
>> +    done
>> +    for t in $(find ${B}/tools -type f -name 'plist*' \! -name '*.o'); do
>> +        install -m 0755 $t ${D}${PTEST_PATH}/test/tools/
>> +    done
>> +    sed -i 's@LD_LIBRARY_PATH="[^"]*:@LD_LIBRARY_PATH="@g' \
>> +        ${D}${PTEST_PATH}/test/test/plist_cmp
>> +    sed -i 's@LD_LIBRARY_PATH="[^"]*:@LD_LIBRARY_PATH="@g' \
>> +        ${D}${PTEST_PATH}/test/test/plist_test
>> +}
>> +
>>  PACKAGES =+ "${PN}-utils \
>>               ${PN}++ \
>>               ${PN}-python"
>> @@ -38,3 +63,5 @@ FILES:${PN} = "${libdir}/libplist-2.0${SOLIBS}"
>>  FILES:${PN}++ = "${libdir}/libplist++-2.0${SOLIBS}"
>>  FILES:${PN}-utils = "${bindir}/*"
>>  FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/*"
>> +
>> +RDEPENDS:${PN}-ptest += "bash"
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#121921): https://lists.openembedded.org/g/openembedded-devel/message/121921
>> Mute This Topic: https://lists.openembedded.org/mt/116386363/1997914
>> Group Owner: openembedded-devel+owner@lists.openembedded.org
>> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
diff mbox series

Patch

diff --git a/meta-oe/conf/include/ptest-packagelists-meta-oe.inc b/meta-oe/conf/include/ptest-packagelists-meta-oe.inc
index 09b1dbb3e1..25db9fe5cc 100644
--- a/meta-oe/conf/include/ptest-packagelists-meta-oe.inc
+++ b/meta-oe/conf/include/ptest-packagelists-meta-oe.inc
@@ -54,6 +54,7 @@  PTESTS_FAST_META_OE = "\
     xmlsec1 \
     zeromq \
     cjson \
+    libplist \
 "
 PTESTS_FAST_META_OE:append:x86 = " mcelog"
 PTESTS_FAST_META_OE:append:x86-64 = " mcelog"
diff --git a/meta-oe/recipes-extended/libimobiledevice/libplist/0001-test-fix-operator-error.patch b/meta-oe/recipes-extended/libimobiledevice/libplist/0001-test-fix-operator-error.patch
new file mode 100644
index 0000000000..0866851537
--- /dev/null
+++ b/meta-oe/recipes-extended/libimobiledevice/libplist/0001-test-fix-operator-error.patch
@@ -0,0 +1,68 @@ 
+From 18e5b22a71f85091127cc063db79c8df687c582c Mon Sep 17 00:00:00 2001
+From: Ankur Tyagi <ankur.tyagi85@gmail.com>
+Date: Thu, 20 Nov 2025 16:01:58 +1300
+Subject: [PATCH] test: fix operator error
+
+Otherwise test fail with error [: -neq: binary operator expected
+
+Upstream-Status: Submitted [https://github.com/libimobiledevice/libplist/pull/284]
+Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
+---
+ test/json-invalid-types.test  | 6 +++---
+ test/ostep-invalid-types.test | 6 +++---
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/test/json-invalid-types.test b/test/json-invalid-types.test
+index c532316..a21fcd9 100755
+--- a/test/json-invalid-types.test
++++ b/test/json-invalid-types.test
+@@ -14,19 +14,19 @@ export PLIST_JSON_DEBUG=1
+ 
+ echo "Converting (failure expected)"
+ $top_builddir/tools/plistutil -f json -i $DATASRC/$TESTFILE0 -o /dev/null
+-if [ $? -neq 2 ]; then
++if [ $? -ne 2 ]; then
+   exit 1
+ fi
+ 
+ echo "Converting (failure expected)"
+ $top_builddir/tools/plistutil -f json -i $DATASRC/$TESTFILE1 -o /dev/null
+-if [ $? -neq 2 ]; then
++if [ $? -ne 2 ]; then
+   exit 2
+ fi
+ 
+ echo "Converting (failure expected)"
+ $top_builddir/tools/plistutil -f json -i $DATASRC/$TESTFILE2 -o /dev/null
+-if [ $? -neq 2 ]; then
++if [ $? -ne 2 ]; then
+   exit 3
+ fi
+ 
+diff --git a/test/ostep-invalid-types.test b/test/ostep-invalid-types.test
+index 9222394..240505c 100755
+--- a/test/ostep-invalid-types.test
++++ b/test/ostep-invalid-types.test
+@@ -14,19 +14,19 @@ export PLIST_OSTEP_DEBUG=1
+ 
+ echo "Converting (failure expected)"
+ $top_builddir/tools/plistutil -f openstep -i $DATASRC/$TESTFILE0 -o /dev/null
+-if [ $? -neq 2 ]; then
++if [ $? -ne 2 ]; then
+   exit 1
+ fi
+ 
+ echo "Converting (failure expected)"
+ $top_builddir/tools/plistutil -f openstepn -i $DATASRC/$TESTFILE1 -o /dev/null
+-if [ $? -neq 2 ]; then
++if [ $? -ne 2 ]; then
+   exit 2
+ fi
+ 
+ echo "Converting (failure expected)"
+ $top_builddir/tools/plistutil -f openstep -i $DATASRC/$TESTFILE2 -o /dev/null
+-if [ $? -neq 2 ]; then
++if [ $? -ne 2 ]; then
+   exit 3
+ fi
+ 
diff --git a/meta-oe/recipes-extended/libimobiledevice/libplist/run-ptest b/meta-oe/recipes-extended/libimobiledevice/libplist/run-ptest
new file mode 100644
index 0000000000..ed940af5f6
--- /dev/null
+++ b/meta-oe/recipes-extended/libimobiledevice/libplist/run-ptest
@@ -0,0 +1,6 @@ 
+#!/bin/sh
+
+for t in `ls test/*.test`; do
+	top_srcdir=$(pwd)/input top_builddir=$(pwd)/test ./$t && echo PASS: $t || echo FAIL: $t
+	rm $(pwd)/test/test/data/* 2>/dev/null
+done
diff --git a/meta-oe/recipes-extended/libimobiledevice/libplist_2.6.0.bb b/meta-oe/recipes-extended/libimobiledevice/libplist_2.6.0.bb
index 7f01962a97..831b74cd1f 100644
--- a/meta-oe/recipes-extended/libimobiledevice/libplist_2.6.0.bb
+++ b/meta-oe/recipes-extended/libimobiledevice/libplist_2.6.0.bb
@@ -6,10 +6,13 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=ebb5c50ab7cab4baeffba14977030c07 \
 
 DEPENDS = "libxml2 glib-2.0 swig python3"
 
-inherit autotools pkgconfig python3native python3targetconfig
+inherit autotools pkgconfig python3native python3targetconfig ptest
 
 SRCREV = "2117b8fdb6b4096455bd2041a63e59a028120136"
-SRC_URI = "git://github.com/libimobiledevice/libplist;protocol=https;branch=master"
+SRC_URI = "git://github.com/libimobiledevice/libplist;protocol=https;branch=master \
+           file://run-ptest \
+           file://0001-test-fix-operator-error.patch \
+"
 
 
 CVE_STATUS_GROUPS += "CVE_STATUS_LIBLIST"
@@ -30,6 +33,28 @@  do_install:append () {
     fi
 }
 
+do_install_ptest(){
+    # tests expect a particular directory structure for input and output
+    install -d ${D}${PTEST_PATH}/input/test/data
+    install -d ${D}${PTEST_PATH}/test/tools
+    install -d ${D}${PTEST_PATH}/test/test/.libs
+    install -d ${D}${PTEST_PATH}/test/test/data
+    install ${S}/test/data/* ${D}${PTEST_PATH}/input/test/data/
+    install ${S}/test/*.test ${D}${PTEST_PATH}/test/
+    install -m 0755 ${B}/test/.libs/plist* ${D}${PTEST_PATH}/test/test/.libs/
+    install -m 0755 ${B}/test/.libs/integer_set_test ${D}${PTEST_PATH}/test/test/
+    for t in $(find ${B}/test -type f -name 'plist*' \! -name '*.o'); do
+        install -m 0755 $t ${D}${PTEST_PATH}/test/test/
+    done
+    for t in $(find ${B}/tools -type f -name 'plist*' \! -name '*.o'); do
+        install -m 0755 $t ${D}${PTEST_PATH}/test/tools/
+    done
+    sed -i 's@LD_LIBRARY_PATH="[^"]*:@LD_LIBRARY_PATH="@g' \
+        ${D}${PTEST_PATH}/test/test/plist_cmp
+    sed -i 's@LD_LIBRARY_PATH="[^"]*:@LD_LIBRARY_PATH="@g' \
+        ${D}${PTEST_PATH}/test/test/plist_test
+}
+
 PACKAGES =+ "${PN}-utils \
              ${PN}++ \
              ${PN}-python"
@@ -38,3 +63,5 @@  FILES:${PN} = "${libdir}/libplist-2.0${SOLIBS}"
 FILES:${PN}++ = "${libdir}/libplist++-2.0${SOLIBS}"
 FILES:${PN}-utils = "${bindir}/*"
 FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/*"
+
+RDEPENDS:${PN}-ptest += "bash"