diff options
-rw-r--r-- | meta/conf/distro/include/ptest-packagelists.inc | 1 | ||||
-rw-r--r-- | meta/recipes-devtools/json-c/json-c/run-ptest | 20 | ||||
-rw-r--r-- | meta/recipes-devtools/json-c/json-c_0.16.bb | 16 |
3 files changed, 35 insertions, 2 deletions
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc index 6c4339e3e1..56088e4e66 100644 --- a/meta/conf/distro/include/ptest-packagelists.inc +++ b/meta/conf/distro/include/ptest-packagelists.inc | |||
@@ -22,6 +22,7 @@ PTESTS_FAST = "\ | |||
22 | gettext-ptest \ | 22 | gettext-ptest \ |
23 | glib-networking-ptest \ | 23 | glib-networking-ptest \ |
24 | gzip-ptest \ | 24 | gzip-ptest \ |
25 | json-c-ptest \ | ||
25 | json-glib-ptest \ | 26 | json-glib-ptest \ |
26 | libconvert-asn1-perl-ptest \ | 27 | libconvert-asn1-perl-ptest \ |
27 | liberror-perl-ptest \ | 28 | liberror-perl-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 0000000000..9ee6095ea2 --- /dev/null +++ b/meta/recipes-devtools/json-c/json-c/run-ptest | |||
@@ -0,0 +1,20 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # This script is used to run json-c test suites | ||
4 | cd tests | ||
5 | |||
6 | ret_val=0 | ||
7 | for i in test*.test; do | ||
8 | # test_basic is not an own testcase, just | ||
9 | # contains common code of other tests | ||
10 | if [ "$i" != "test_basic.test" ]; then | ||
11 | if ./$i > json-c_test.log 2>&1 ; then | ||
12 | echo PASS: $i | ||
13 | else | ||
14 | ret_val=1 | ||
15 | echo FAIL: $i | ||
16 | fi | ||
17 | fi | ||
18 | done | ||
19 | |||
20 | exit $ret_val | ||
diff --git a/meta/recipes-devtools/json-c/json-c_0.16.bb b/meta/recipes-devtools/json-c/json-c_0.16.bb index fdec5ec9af..50431081bb 100644 --- a/meta/recipes-devtools/json-c/json-c_0.16.bb +++ b/meta/recipes-devtools/json-c/json-c_0.16.bb | |||
@@ -4,7 +4,10 @@ HOMEPAGE = "https://github.com/json-c/json-c/wiki" | |||
4 | LICENSE = "MIT" | 4 | LICENSE = "MIT" |
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2" | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2" |
6 | 6 | ||
7 | SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz" | 7 | SRC_URI = " \ |
8 | https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz \ | ||
9 | file://run-ptest \ | ||
10 | " | ||
8 | 11 | ||
9 | SRC_URI[sha256sum] = "8e45ac8f96ec7791eaf3bb7ee50e9c2100bbbc87b8d0f1d030c5ba8a0288d96b" | 12 | SRC_URI[sha256sum] = "8e45ac8f96ec7791eaf3bb7ee50e9c2100bbbc87b8d0f1d030c5ba8a0288d96b" |
10 | 13 | ||
@@ -13,6 +16,15 @@ UPSTREAM_CHECK_REGEX = "json-c-(?P<pver>\d+(\.\d+)+)-\d+" | |||
13 | 16 | ||
14 | RPROVIDES:${PN} = "libjson" | 17 | RPROVIDES:${PN} = "libjson" |
15 | 18 | ||
16 | inherit cmake | 19 | inherit cmake ptest |
20 | |||
21 | do_install_ptest() { | ||
22 | install -d ${D}/${PTEST_PATH}/tests | ||
23 | install ${B}/tests/test* ${D}/${PTEST_PATH}/tests | ||
24 | install ${S}/tests/*.test ${D}/${PTEST_PATH}/tests | ||
25 | install ${S}/tests/*.expected ${D}/${PTEST_PATH}/tests | ||
26 | install ${S}/tests/test-defs.sh ${D}/${PTEST_PATH}/tests | ||
27 | install ${S}/tests/valid*json ${D}/${PTEST_PATH}/tests | ||
28 | } | ||
17 | 29 | ||
18 | BBCLASSEXTEND = "native nativesdk" | 30 | BBCLASSEXTEND = "native nativesdk" |