diff options
author | Patrick Vacek <patrickvacek@gmail.com> | 2018-11-02 12:09:54 +0100 |
---|---|---|
committer | Patrick Vacek <patrickvacek@gmail.com> | 2018-11-05 11:01:14 +0100 |
commit | c2a02943e3ee196b64c5753cdee02d3ea735001c (patch) | |
tree | 42a1f94e146557394600c425432b17591035a08e /recipes-sota | |
parent | c684c3474cb580a8f58b8299e9e901440ebf56d0 (diff) | |
download | meta-updater-c2a02943e3ee196b64c5753cdee02d3ea735001c.tar.gz |
aktualizr: attempt to get ptest enabled to build test suite.test/enable-ptest
Diffstat (limited to 'recipes-sota')
-rwxr-xr-x | recipes-sota/aktualizr/aktualizr_git.bb | 10 | ||||
-rw-r--r-- | recipes-sota/aktualizr/files/0001-Use-aktualizr-repo-without-a-provided-path.patch | 24 |
2 files changed, 31 insertions, 3 deletions
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index 50a9f16..002d681 100755 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb | |||
@@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" | |||
8 | DEPENDS = "boost curl openssl libarchive libsodium asn1c-native sqlite3 " | 8 | DEPENDS = "boost curl openssl libarchive libsodium asn1c-native sqlite3 " |
9 | DEPENDS_append_class-target = "ostree ${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', ' libp11', '', d)} " | 9 | DEPENDS_append_class-target = "ostree ${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', ' libp11', '', d)} " |
10 | DEPENDS_append_class-native = "glib-2.0-native " | 10 | DEPENDS_append_class-native = "glib-2.0-native " |
11 | DEPENDS_append = "${@bb.utils.contains('PTEST_ENABLED', '1', ' coreutils-native ostree-native aktualizr-native ', '', d)}" | ||
11 | 12 | ||
12 | RDEPENDS_${PN}_class-target = "lshw " | 13 | RDEPENDS_${PN}_class-target = "lshw " |
13 | RDEPENDS_${PN}_append_class-target = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'serialcan', ' slcand-start', '', d)} " | 14 | RDEPENDS_${PN}_append_class-target = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'serialcan', ' slcand-start', '', d)} " |
@@ -21,6 +22,7 @@ PR = "7" | |||
21 | 22 | ||
22 | SRC_URI = " \ | 23 | SRC_URI = " \ |
23 | gitsm://github.com/advancedtelematic/aktualizr;branch=${BRANCH} \ | 24 | gitsm://github.com/advancedtelematic/aktualizr;branch=${BRANCH} \ |
25 | file://0001-Use-aktualizr-repo-without-a-provided-path.patch \ | ||
24 | file://aktualizr.service \ | 26 | file://aktualizr.service \ |
25 | file://aktualizr-secondary.service \ | 27 | file://aktualizr-secondary.service \ |
26 | file://aktualizr-secondary.socket \ | 28 | file://aktualizr-secondary.socket \ |
@@ -32,9 +34,7 @@ BRANCH ?= "master" | |||
32 | 34 | ||
33 | S = "${WORKDIR}/git" | 35 | S = "${WORKDIR}/git" |
34 | 36 | ||
35 | inherit cmake | 37 | inherit cmake systemd ptest |
36 | |||
37 | inherit systemd | ||
38 | 38 | ||
39 | SYSTEMD_PACKAGES = "${PN} ${PN}-secondary" | 39 | SYSTEMD_PACKAGES = "${PN} ${PN}-secondary" |
40 | SYSTEMD_SERVICE_${PN} = "aktualizr.service" | 40 | SYSTEMD_SERVICE_${PN} = "aktualizr.service" |
@@ -56,6 +56,10 @@ EXTRA_OECMAKE_append_class-native = " -DBUILD_SOTA_TOOLS=ON \ | |||
56 | -DGARAGE_SIGN_VERSION=${GARAGE_SIGN_VERSION} \ | 56 | -DGARAGE_SIGN_VERSION=${GARAGE_SIGN_VERSION} \ |
57 | -DGARAGE_SIGN_SHA256=${GARAGE_SIGN_SHA256}" | 57 | -DGARAGE_SIGN_SHA256=${GARAGE_SIGN_SHA256}" |
58 | 58 | ||
59 | do_compile_ptest() { | ||
60 | cmake_runcmake_build --target build_tests | ||
61 | } | ||
62 | |||
59 | do_install_append () { | 63 | do_install_append () { |
60 | install -d ${D}${libdir}/sota | 64 | install -d ${D}${libdir}/sota |
61 | install -m 0644 ${S}/config/sota_autoprov.toml ${D}/${libdir}/sota/sota_autoprov.toml | 65 | install -m 0644 ${S}/config/sota_autoprov.toml ${D}/${libdir}/sota/sota_autoprov.toml |
diff --git a/recipes-sota/aktualizr/files/0001-Use-aktualizr-repo-without-a-provided-path.patch b/recipes-sota/aktualizr/files/0001-Use-aktualizr-repo-without-a-provided-path.patch new file mode 100644 index 0000000..29c75fc --- /dev/null +++ b/recipes-sota/aktualizr/files/0001-Use-aktualizr-repo-without-a-provided-path.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | From f5a501f842749ba31f76526a395f09cc61435ec3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Patrick Vacek <patrickvacek@gmail.com> | ||
3 | Date: Wed, 31 Oct 2018 14:55:48 +0100 | ||
4 | Subject: [PATCH] Use aktualizr-repo without a provided path. | ||
5 | |||
6 | This is necessary for building the tests for ptest because we want to | ||
7 | use the native version of aktualizr-repo (built for the host). | ||
8 | --- | ||
9 | tests/uptane_repo_generation/CMakeLists.txt | 2 +- | ||
10 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
11 | |||
12 | diff --git a/tests/uptane_repo_generation/CMakeLists.txt b/tests/uptane_repo_generation/CMakeLists.txt | ||
13 | index 83c14230..6f89d6a5 100644 | ||
14 | --- a/tests/uptane_repo_generation/CMakeLists.txt | ||
15 | +++ b/tests/uptane_repo_generation/CMakeLists.txt | ||
16 | @@ -1,4 +1,4 @@ | ||
17 | add_custom_target(uptane_repo_full_no_correlation_id | ||
18 | COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/full_no_correlation_id.sh | ||
19 | - $<TARGET_FILE:aktualizr-repo> ${PROJECT_BINARY_DIR}/uptane_repos/full_no_correlation_id) | ||
20 | + aktualizr-repo ${PROJECT_BINARY_DIR}/uptane_repos/full_no_correlation_id) | ||
21 | add_dependencies(uptane_repo_full_no_correlation_id aktualizr-repo) | ||
22 | -- | ||
23 | 2.17.1 | ||
24 | |||