diff options
Diffstat (limited to 'meta-phosphor/recipes-phosphor/interfaces')
-rw-r--r-- | meta-phosphor/recipes-phosphor/interfaces/bmcweb/run-ptest | 10 | ||||
-rw-r--r-- | meta-phosphor/recipes-phosphor/interfaces/bmcweb_git.bb | 22 |
2 files changed, 29 insertions, 3 deletions
diff --git a/meta-phosphor/recipes-phosphor/interfaces/bmcweb/run-ptest b/meta-phosphor/recipes-phosphor/interfaces/bmcweb/run-ptest new file mode 100644 index 000000000..f2a522a14 --- /dev/null +++ b/meta-phosphor/recipes-phosphor/interfaces/bmcweb/run-ptest @@ -0,0 +1,10 @@ +#!/bin/sh + +for i in `ls test/*_test`; do + $i + if [ $? -eq 0 ]; then + echo "PASS: $i" + else + echo "FAIL: $i" + fi +done diff --git a/meta-phosphor/recipes-phosphor/interfaces/bmcweb_git.bb b/meta-phosphor/recipes-phosphor/interfaces/bmcweb_git.bb index d13af80a4..0e0abb236 100644 --- a/meta-phosphor/recipes-phosphor/interfaces/bmcweb_git.bb +++ b/meta-phosphor/recipes-phosphor/interfaces/bmcweb_git.bb @@ -13,10 +13,16 @@ LIC_FILES_CHKSUM = "file://LICENCE;md5=a6a4edad4aed50f39a66d098d74b265b" SRC_URI = "git://github.com/openbmc/bmcweb.git" PV = "1.0+git${SRCPV}" -SRCREV = "d8ef9915dda4d2e3b7aec885ebfa7debce61bff8" +SRCREV = "1a6258dc985cde406d9098130e4a2d683e82beb2" S = "${WORKDIR}/git" +inherit meson ptest + +SRC_URI += " \ + file://run-ptest \ +" + DEPENDS = " \ openssl \ zlib \ @@ -27,6 +33,8 @@ DEPENDS = " \ gtest \ nlohmann-json \ libtinyxml2 \ + ${@bb.utils.contains('PTEST_ENABLED', '1', 'gtest', '', d)} \ + ${@bb.utils.contains('PTEST_ENABLED', '1', 'gmock', '', d)} \ " RDEPENDS_${PN} += " \ @@ -34,11 +42,19 @@ RDEPENDS_${PN} += " \ phosphor-mapper \ " +do_install_ptest() { + install -d ${D}${PTEST_PATH}/test + cp -rf ${B}/*_test ${D}${PTEST_PATH}/test/ +} + FILES_${PN} += "${datadir}/** " -inherit meson -EXTRA_OEMESON = "--buildtype=minsize -Dtests=disabled -Dyocto-deps=enabled" +EXTRA_OEMESON = " \ + --buildtype=minsize \ + -Dtests=${@bb.utils.contains('PTEST_ENABLED', '1', 'enabled', 'disabled', d)} \ + -Dyocto-deps=enabled \ +" SYSTEMD_SERVICE_${PN} += "bmcweb.service bmcweb.socket" |