diff options
author | Laurent Bonnans <laurent.bonnans@here.com> | 2019-02-28 14:51:08 +0100 |
---|---|---|
committer | Patrick Vacek <patrickvacek@gmail.com> | 2019-04-29 09:21:14 +0200 |
commit | 91fa436211da0a2cadf6eb29df26977e27ba1015 (patch) | |
tree | 3edf8b8618feec7baccf491d19cb96c7de6b4fba /recipes-sota/aktualizr/aktualizr_git.bb | |
parent | 51a72876331ec340ca1559597db5054ffe435cce (diff) | |
download | meta-updater-91fa436211da0a2cadf6eb29df26977e27ba1015.tar.gz |
Add working ptest suite for aktualizr
Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
Diffstat (limited to 'recipes-sota/aktualizr/aktualizr_git.bb')
-rwxr-xr-x | recipes-sota/aktualizr/aktualizr_git.bb | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index b97adeb..2d9053b 100755 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb | |||
@@ -11,6 +11,8 @@ RDEPENDS_${PN}_class-target = "aktualizr-check-discovery aktualizr-configs lshw" | |||
11 | RDEPENDS_${PN}-secondary = "aktualizr-check-discovery" | 11 | RDEPENDS_${PN}-secondary = "aktualizr-check-discovery" |
12 | RDEPENDS_${PN}-host-tools = "aktualizr aktualizr-repo aktualizr-cert-provider ${@bb.utils.contains('PACKAGECONFIG', 'sota-tools', 'garage-deploy garage-push', '', d)}" | 12 | RDEPENDS_${PN}-host-tools = "aktualizr aktualizr-repo aktualizr-cert-provider ${@bb.utils.contains('PACKAGECONFIG', 'sota-tools', 'garage-deploy garage-push', '', d)}" |
13 | 13 | ||
14 | RDEPENDS_${PN}-ptest += "bash cmake python3-core python3-io python3-json python3-netserver sqlite3 valgrind" | ||
15 | |||
14 | PV = "1.0+git${SRCPV}" | 16 | PV = "1.0+git${SRCPV}" |
15 | PR = "7" | 17 | PR = "7" |
16 | 18 | ||
@@ -18,6 +20,7 @@ GARAGE_SIGN_PV = "0.6.0-3-gc38b9f3" | |||
18 | 20 | ||
19 | SRC_URI = " \ | 21 | SRC_URI = " \ |
20 | gitsm://github.com/advancedtelematic/aktualizr;branch=${BRANCH} \ | 22 | gitsm://github.com/advancedtelematic/aktualizr;branch=${BRANCH} \ |
23 | file://run-ptest \ | ||
21 | file://aktualizr.service \ | 24 | file://aktualizr.service \ |
22 | file://aktualizr-secondary.service \ | 25 | file://aktualizr-secondary.service \ |
23 | file://aktualizr-secondary.socket \ | 26 | file://aktualizr-secondary.socket \ |
@@ -40,7 +43,7 @@ SYSTEMD_PACKAGES = "${PN} ${PN}-secondary" | |||
40 | SYSTEMD_SERVICE_${PN} = "aktualizr.service" | 43 | SYSTEMD_SERVICE_${PN} = "aktualizr.service" |
41 | SYSTEMD_SERVICE_${PN}-secondary = "aktualizr-secondary.socket" | 44 | SYSTEMD_SERVICE_${PN}-secondary = "aktualizr-secondary.socket" |
42 | 45 | ||
43 | EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release -DAKTUALIZR_VERSION=${PV} -Dgtest_disable_pthreads=ON" | 46 | EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release -DAKTUALIZR_VERSION=${PV} -Dgtest_disable_pthreads=ON ${@bb.utils.contains('PTEST_ENABLED', '1', '-DTESTSUITE_VALGRIND=on', '', d)}" |
44 | 47 | ||
45 | GARAGE_SIGN_OPS = "${@ d.expand('-DGARAGE_SIGN_ARCHIVE=${WORKDIR}/cli-${GARAGE_SIGN_PV}.tgz') if d.getVar('GARAGE_SIGN_AUTOVERSION') != '1' else ''}" | 48 | GARAGE_SIGN_OPS = "${@ d.expand('-DGARAGE_SIGN_ARCHIVE=${WORKDIR}/cli-${GARAGE_SIGN_PV}.tgz') if d.getVar('GARAGE_SIGN_AUTOVERSION') != '1' else ''}" |
46 | 49 | ||
@@ -59,6 +62,19 @@ do_compile_ptest() { | |||
59 | cmake_runcmake_build --target build_tests | 62 | cmake_runcmake_build --target build_tests |
60 | } | 63 | } |
61 | 64 | ||
65 | do_install_ptest() { | ||
66 | # copy the complete source directory (contains build) | ||
67 | cp -r ${B}/ ${D}/${PTEST_PATH}/build | ||
68 | cp -r ${S}/ ${D}/${PTEST_PATH}/src | ||
69 | |||
70 | # remove bogus elf file | ||
71 | rm ${D}/${PTEST_PATH}/src/partial/extern/RIOT/cpu/esp32/bin/bootloader.elf | ||
72 | |||
73 | # fix the absolute paths | ||
74 | find ${D}/${PTEST_PATH}/build -name "CMakeFiles" | xargs rm -rf | ||
75 | find ${D}/${PTEST_PATH}/build -name "*.cmake" -or -name "DartConfiguration.tcl" -or -name "run-valgrind" | xargs sed -e "s|${S}|${PTEST_PATH}/src|g" -e "s|${B}|${PTEST_PATH}/build|g" -e "s|\"--gtest_output[^\"]*\"||g" -i | ||
76 | } | ||
77 | |||
62 | do_install_append () { | 78 | do_install_append () { |
63 | install -d ${D}${libdir}/sota | 79 | install -d ${D}${libdir}/sota |
64 | install -m 0644 ${S}/config/sota_autoprov.toml ${D}/${libdir}/sota/sota_autoprov.toml | 80 | install -m 0644 ${S}/config/sota_autoprov.toml ${D}/${libdir}/sota/sota_autoprov.toml |