diff options
| -rw-r--r-- | meta-oe/recipes-test/cunit/cunit_2.1-3.bb | 18 | ||||
| -rw-r--r-- | meta-oe/recipes-test/cunit/files/run-ptest | 19 |
2 files changed, 35 insertions, 2 deletions
diff --git a/meta-oe/recipes-test/cunit/cunit_2.1-3.bb b/meta-oe/recipes-test/cunit/cunit_2.1-3.bb index babf8048ab..c877d3bf1c 100644 --- a/meta-oe/recipes-test/cunit/cunit_2.1-3.bb +++ b/meta-oe/recipes-test/cunit/cunit_2.1-3.bb | |||
| @@ -7,16 +7,30 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=7734aa853b85d6f935466f081490ddbb" | |||
| 7 | S = "${WORKDIR}/CUnit-${PV}" | 7 | S = "${WORKDIR}/CUnit-${PV}" |
| 8 | 8 | ||
| 9 | SRC_URI = "${SOURCEFORGE_MIRROR}/project/cunit/CUnit/${PV}/CUnit-${PV}.tar.bz2 \ | 9 | SRC_URI = "${SOURCEFORGE_MIRROR}/project/cunit/CUnit/${PV}/CUnit-${PV}.tar.bz2 \ |
| 10 | file://fixup-install-docdir.patch" | 10 | file://fixup-install-docdir.patch \ |
| 11 | file://run-ptest \ | ||
| 12 | " | ||
| 11 | SRC_URI[md5sum] = "b5f1a9f6093869c070c6e4a9450cc10c" | 13 | SRC_URI[md5sum] = "b5f1a9f6093869c070c6e4a9450cc10c" |
| 12 | SRC_URI[sha256sum] = "f5b29137f845bb08b77ec60584fdb728b4e58f1023e6f249a464efa49a40f214" | 14 | SRC_URI[sha256sum] = "f5b29137f845bb08b77ec60584fdb728b4e58f1023e6f249a464efa49a40f214" |
| 13 | 15 | ||
| 14 | UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/cunit/files/releases" | 16 | UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/cunit/files/releases" |
| 15 | 17 | ||
| 16 | inherit autotools-brokensep remove-libtool | 18 | inherit autotools-brokensep remove-libtool ptest |
| 17 | 19 | ||
| 18 | EXTRA_OECONF = "--enable-memtrace --enable-automated --enable-basic --enable-console" | 20 | EXTRA_OECONF = "--enable-memtrace --enable-automated --enable-basic --enable-console" |
| 19 | 21 | ||
| 22 | TESTBIN = "/CUnit/Sources/Test/test_cunit" | ||
| 23 | |||
| 24 | PACKAGECONFIG ?= "${@bb.utils.contains('PTEST_ENABLED', '1', 'test','', d)} \ | ||
| 25 | " | ||
| 26 | |||
| 27 | PACKAGECONFIG[test] = "--enable-test,,," | ||
| 28 | |||
| 29 | do_install_ptest() { | ||
| 30 | install -d ${D}${PTEST_PATH}/tests | ||
| 31 | install -m 0755 ${S}${TESTBIN} ${D}${PTEST_PATH}/tests/ | ||
| 32 | } | ||
| 33 | |||
| 20 | FILES_${PN}-dev += "${datadir}/CUnit" | 34 | FILES_${PN}-dev += "${datadir}/CUnit" |
| 21 | FILES_${PN}-doc += "${docdir}" | 35 | FILES_${PN}-doc += "${docdir}" |
| 22 | 36 | ||
diff --git a/meta-oe/recipes-test/cunit/files/run-ptest b/meta-oe/recipes-test/cunit/files/run-ptest new file mode 100644 index 0000000000..903c8c8d95 --- /dev/null +++ b/meta-oe/recipes-test/cunit/files/run-ptest | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | ptestdir=$(dirname "$(readlink -f "$0")") | ||
| 4 | cd $ptestdir/tests | ||
| 5 | ./test_cunit > cunit_test_out.tmp | ||
| 6 | |||
| 7 | echo "--- Test output ---" | ||
| 8 | cat cunit_test_out.tmp | ||
| 9 | echo "" | ||
| 10 | echo "--- ptest result ---" | ||
| 11 | |||
| 12 | grep "Failures: 0" cunit_test_out.tmp > /dev/null | ||
| 13 | if [ $? -eq 0 ]; then | ||
| 14 | echo "PASS: cunit" | ||
| 15 | else | ||
| 16 | echo "FAIL: cunit" | ||
| 17 | fi | ||
| 18 | |||
| 19 | rm -f cunit_test_out.tmp | ||
