aktualizr: draft of enabling ptest
Original work from Patrick.
Laurent: dropped a patch for a change in aktualizr we
now support directly
@@ -6,6 +6,7 @@ LICENSE = "MPL-2.0"
LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=9741c346eef56131163e13b9db1241b3"
DEPENDS = "boost curl openssl libarchive libsodium sqlite3 asn1c-native"
+DEPENDS_append = "${@bb.utils.contains('PTEST_ENABLED', '1', ' coreutils-native ostree-native aktualizr-native ', '', d)}"
RDEPENDS_${PN}_class-target = "aktualizr-check-discovery aktualizr-configs lshw"
RDEPENDS_${PN}-secondary = "aktualizr-check-discovery"
RDEPENDS_${PN}-host-tools = "aktualizr aktualizr-repo aktualizr-cert-provider ${@bb.utils.contains('PACKAGECONFIG', 'sota-tools', 'garage-deploy garage-push', '', d)}"
@@ -33,7 +34,7 @@ BRANCH ?= "master"
S = "${WORKDIR}/git"
-inherit pkgconfig cmake systemd
+inherit cmake pkgconfig ptest systemd
SYSTEMD_PACKAGES = "${PN} ${PN}-secondary"
SYSTEMD_SERVICE_${PN} = "aktualizr.service"
@@ -54,6 +55,10 @@ PACKAGECONFIG[load-tests] = "-DBUILD_LOAD_TESTS=ON,-DBUILD_LOAD_TESTS=OFF,"
PACKAGECONFIG[serialcan] = ",,,slcand-start"
PACKAGECONFIG[ubootenv] = ",,,u-boot-fw-utils aktualizr-uboot-env-rollback"
+do_compile_ptest() {
+ cmake_runcmake_build --target build_tests
+}
+
do_install_append () {
install -d ${D}${libdir}/sota
install -m 0644 ${S}/config/sota_autoprov.toml ${D}/${libdir}/sota/sota_autoprov.toml
