diff options
| -rwxr-xr-x | meta-oe/recipes-support/libcereal/files/run-ptest | 12 | ||||
| -rw-r--r-- | meta-oe/recipes-support/libcereal/libcereal_1.3.2.bb | 18 |
2 files changed, 27 insertions, 3 deletions
diff --git a/meta-oe/recipes-support/libcereal/files/run-ptest b/meta-oe/recipes-support/libcereal/files/run-ptest new file mode 100755 index 0000000000..9bc480aa7f --- /dev/null +++ b/meta-oe/recipes-support/libcereal/files/run-ptest | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | cd tests | ||
| 4 | for atest in test_* ; do | ||
| 5 | rm -rf tests.log | ||
| 6 | ./${atest} > tests.log 2>&1 | ||
| 7 | if [ $? = 0 ] ; then | ||
| 8 | echo "PASS: ${atest}" | ||
| 9 | else | ||
| 10 | echo "FAIL: ${atest}" | ||
| 11 | fi | ||
| 12 | done | ||
diff --git a/meta-oe/recipes-support/libcereal/libcereal_1.3.2.bb b/meta-oe/recipes-support/libcereal/libcereal_1.3.2.bb index 08291d2dbe..fc58a42d28 100644 --- a/meta-oe/recipes-support/libcereal/libcereal_1.3.2.bb +++ b/meta-oe/recipes-support/libcereal/libcereal_1.3.2.bb | |||
| @@ -12,17 +12,29 @@ LIC_FILES_CHKSUM = "\ | |||
| 12 | file://include/cereal/external/rapidjson/msinttypes/LICENSE;md5=dffce65b98c773976de2e338bd130f46 \ | 12 | file://include/cereal/external/rapidjson/msinttypes/LICENSE;md5=dffce65b98c773976de2e338bd130f46 \ |
| 13 | " | 13 | " |
| 14 | 14 | ||
| 15 | DEPENDS = " ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'boost', '', d)} " | ||
| 16 | |||
| 15 | PROVIDES += "${PN}-dev" | 17 | PROVIDES += "${PN}-dev" |
| 16 | 18 | ||
| 17 | PV .= "+git${SRCPV}" | 19 | PV .= "+git${SRCPV}" |
| 18 | SRCREV = "ebef1e929807629befafbb2918ea1a08c7194554" | 20 | SRCREV = "ebef1e929807629befafbb2918ea1a08c7194554" |
| 19 | SRC_URI = "git://github.com/USCiLab/cereal.git;branch=master;protocol=https" | 21 | SRC_URI = "git://github.com/USCiLab/cereal.git;branch=master;protocol=https \ |
| 22 | file://run-ptest \ | ||
| 23 | " | ||
| 20 | 24 | ||
| 21 | S = "${WORKDIR}/git" | 25 | S = "${WORKDIR}/git" |
| 22 | 26 | ||
| 23 | inherit cmake pkgconfig | 27 | inherit cmake pkgconfig ptest |
| 28 | |||
| 29 | PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)}" | ||
| 30 | PACKAGECONFIG[with-tests] = "-DBUILD_TESTS=ON -DSKIP_PORTABILITY_TEST=ON,," | ||
| 31 | |||
| 32 | EXTRA_OECMAKE = "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '', '-DJUST_INSTALL_CEREAL=ON', d)}" | ||
| 24 | 33 | ||
| 25 | EXTRA_OECMAKE = "-DJUST_INSTALL_CEREAL=ON" | 34 | do_install_ptest() { |
| 35 | install -d ${D}${PTEST_PATH}/tests | ||
| 36 | cp ${B}/unittests/test_* ${D}${PTEST_PATH}/tests | ||
| 37 | } | ||
| 26 | 38 | ||
| 27 | ALLOW_EMPTY:${PN} = "1" | 39 | ALLOW_EMPTY:${PN} = "1" |
| 28 | 40 | ||
