diff options
author | André Draszik <andre.draszik@jci.com> | 2018-01-12 12:29:42 +0000 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2018-01-22 19:36:03 -0800 |
commit | 749c0d0ea32ec9b4d8e80d67a8657711f4565431 (patch) | |
tree | be5239e50960472ad6379d14b1f811b086906c97 /meta-oe/recipes-support | |
parent | adca65b81641223fbbe52dfa8431d3ef97f1dbc3 (diff) | |
download | meta-openembedded-749c0d0ea32ec9b4d8e80d67a8657711f4565431.tar.gz |
uthash: add ptest support
Signed-off-by: André Draszik <andre.draszik@jci.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support')
-rwxr-xr-x | meta-oe/recipes-support/uthash/uthash/run-ptest | 10 | ||||
-rw-r--r-- | meta-oe/recipes-support/uthash/uthash_2.0.2.bb | 18 |
2 files changed, 27 insertions, 1 deletions
diff --git a/meta-oe/recipes-support/uthash/uthash/run-ptest b/meta-oe/recipes-support/uthash/uthash/run-ptest new file mode 100755 index 000000000..14071a649 --- /dev/null +++ b/meta-oe/recipes-support/uthash/uthash/run-ptest | |||
@@ -0,0 +1,10 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | cd tests | ||
4 | for i in test*[0-9] ; do | ||
5 | if ./${i} | cmp -s "${i}.ans" - ; then | ||
6 | echo "PASS: ${i}" | ||
7 | else | ||
8 | echo "FAIL: ${i}" | ||
9 | fi | ||
10 | done | ||
diff --git a/meta-oe/recipes-support/uthash/uthash_2.0.2.bb b/meta-oe/recipes-support/uthash/uthash_2.0.2.bb index 8a6887ef0..ccdd13b32 100644 --- a/meta-oe/recipes-support/uthash/uthash_2.0.2.bb +++ b/meta-oe/recipes-support/uthash/uthash_2.0.2.bb | |||
@@ -10,19 +10,35 @@ SECTION = "base" | |||
10 | LICENSE = "BSD-1-Clause" | 10 | LICENSE = "BSD-1-Clause" |
11 | LIC_FILES_CHKSUM = "file://LICENSE;md5=5cc1f1e4c71f19f580458586756c02b4" | 11 | LIC_FILES_CHKSUM = "file://LICENSE;md5=5cc1f1e4c71f19f580458586756c02b4" |
12 | 12 | ||
13 | SRC_URI = "https://github.com/troydhanson/${BPN}/archive/v${PV}.tar.gz;downloadfilename=${BP}.tar.gz" | 13 | SRC_URI = "\ |
14 | https://github.com/troydhanson/${BPN}/archive/v${PV}.tar.gz;downloadfilename=${BP}.tar.gz \ | ||
15 | file://run-ptest \ | ||
16 | " | ||
14 | UPSTREAM_CHECK_URI = "https://github.com/troydhanson/${BPN}/releases" | 17 | UPSTREAM_CHECK_URI = "https://github.com/troydhanson/${BPN}/releases" |
15 | 18 | ||
16 | SRC_URI[md5sum] = "d08632a58674274c9cd87e2930f5696a" | 19 | SRC_URI[md5sum] = "d08632a58674274c9cd87e2930f5696a" |
17 | SRC_URI[sha256sum] = "34a31d51dd7a839819cecd6f46049b4ffe031d7f3147d9a042f5504fdb1348d1" | 20 | SRC_URI[sha256sum] = "34a31d51dd7a839819cecd6f46049b4ffe031d7f3147d9a042f5504fdb1348d1" |
18 | 21 | ||
22 | inherit ptest | ||
23 | |||
19 | do_compile[noexec] = "1" | 24 | do_compile[noexec] = "1" |
20 | 25 | ||
26 | do_compile_ptest() { | ||
27 | oe_runmake -C tests tests_only TEST_TARGET= | ||
28 | } | ||
29 | |||
21 | do_install () { | 30 | do_install () { |
22 | install -dm755 ${D}${includedir} | 31 | install -dm755 ${D}${includedir} |
23 | install -m0644 src/*.h ${D}${includedir} | 32 | install -m0644 src/*.h ${D}${includedir} |
24 | } | 33 | } |
25 | 34 | ||
35 | do_install_ptest() { | ||
36 | install -dm755 ${D}${PTEST_PATH}/tests | ||
37 | install -m0755 tests/test*[0-9] ${D}${PTEST_PATH}/tests | ||
38 | install -m0644 tests/test*[0-9].ans ${D}${PTEST_PATH}/tests | ||
39 | install -m0644 tests/test*[0-9].dat ${D}${PTEST_PATH}/tests | ||
40 | } | ||
41 | |||
26 | # The main package is empty and non-existent, so -dev | 42 | # The main package is empty and non-existent, so -dev |
27 | # should not depend on it... | 43 | # should not depend on it... |
28 | RDEPENDS_${PN}-dev = "" | 44 | RDEPENDS_${PN}-dev = "" |