mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-10 04:30:00 +00:00
sdbus-c++: Install ptests into PTEST_PATH
add rdep on basu and dbus when not using systemd Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
@@ -4,12 +4,12 @@ set -o pipefail
|
|||||||
|
|
||||||
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
|
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
|
||||||
|
|
||||||
${SCRIPTPATH}/../tests/sdbus-c++-unit-tests 2>&1 | \
|
${SCRIPTPATH}/sdbus-c++-unit-tests 2>&1 | \
|
||||||
sed -r 's/^\[\s+OK\s+\] (.*) \([0-9]+\sms\)$/OK: \1 /' | \
|
sed -r 's/^\[\s+OK\s+\] (.*) \([0-9]+\sms\)$/OK: \1 /' | \
|
||||||
sed -r 's/^\[\s+FAILED\s+\] (.*) \([0-9]+\sms\)$/FAILED: \1 /' | \
|
sed -r 's/^\[\s+FAILED\s+\] (.*) \([0-9]+\sms\)$/FAILED: \1 /' | \
|
||||||
awk '{if ($1 == "OK:" || $1 == "FAILED:") {print $0}}'
|
awk '{if ($1 == "OK:" || $1 == "FAILED:") {print $0}}'
|
||||||
|
|
||||||
${SCRIPTPATH}/../tests/sdbus-c++-integration-tests 2>&1 | \
|
${SCRIPTPATH}/sdbus-c++-integration-tests 2>&1 | \
|
||||||
sed -r 's/^\[\s+OK\s+\] (.*) \([0-9]+\sms\)$/OK: \1 /' | \
|
sed -r 's/^\[\s+OK\s+\] (.*) \([0-9]+\sms\)$/OK: \1 /' | \
|
||||||
sed -r 's/^\[\s+FAILED\s+\] (.*) \([0-9]+\sms\)$/FAILED: \1 /' | \
|
sed -r 's/^\[\s+FAILED\s+\] (.*) \([0-9]+\sms\)$/FAILED: \1 /' | \
|
||||||
awk '{if ($1 == "OK:" || $1 == "FAILED:") {print $0}}'
|
awk '{if ($1 == "OK:" || $1 == "FAILED:") {print $0}}'
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ inherit cmake pkgconfig systemd ptest
|
|||||||
|
|
||||||
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'with-external-libsystemd', 'with-builtin-libsystemd', d)} \
|
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'with-external-libsystemd', 'with-builtin-libsystemd', d)} \
|
||||||
${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)}"
|
${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)}"
|
||||||
PACKAGECONFIG[with-builtin-libsystemd] = ",,sdbus-c++-libsystemd,libcap"
|
PACKAGECONFIG[with-builtin-libsystemd] = ",,sdbus-c++-libsystemd,libcap,basu"
|
||||||
PACKAGECONFIG[with-external-libsystemd] = ",,systemd,libsystemd"
|
PACKAGECONFIG[with-external-libsystemd] = ",,systemd,libsystemd"
|
||||||
PACKAGECONFIG[with-tests] = "-DBUILD_TESTS=ON -DTESTS_INSTALL_PATH=${libdir}/${BPN}/tests,-DBUILD_TESTS=OFF,googletest gmock"
|
PACKAGECONFIG[with-tests] = "-DBUILD_TESTS=ON -DTESTS_INSTALL_PATH=${PTEST_PATH},-DBUILD_TESTS=OFF,googletest gmock"
|
||||||
|
|
||||||
DEPENDS += "expat"
|
DEPENDS += "expat"
|
||||||
|
|
||||||
@@ -39,14 +39,13 @@ do_install:append() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
PTEST_PATH = "${libdir}/${BPN}/ptest"
|
|
||||||
do_install_ptest() {
|
do_install_ptest() {
|
||||||
install -d ${D}${PTEST_PATH}
|
DESTDIR='${D}' cmake_runcmake_build --target tests/install
|
||||||
cp -r ${B}/tests/sdbus-c++-unit-tests ${D}${PTEST_PATH}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FILES:${PN}-ptest =+ "${sysconfdir}/dbus-1/system.d/"
|
FILES:${PN}-ptest =+ "${sysconfdir}/dbus-1/system.d/"
|
||||||
FILES:${PN}-dev += "${bindir}/sdbus-c++-xml2cpp"
|
FILES:${PN}-dev += "${bindir}/sdbus-c++-xml2cpp"
|
||||||
|
|
||||||
|
RDEPENDS:${PN}-ptest += "dbus"
|
||||||
# It adds -isystem which is spurious, no idea where it gets it from
|
# It adds -isystem which is spurious, no idea where it gets it from
|
||||||
CCACHE_DISABLE = "1"
|
CCACHE_DISABLE = "1"
|
||||||
|
|||||||
Reference in New Issue
Block a user