From 63be71dc7edf9315ee384a19afdf6a68866befe2 Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Fri, 27 Oct 2017 12:03:18 +0200 Subject: Basic tests. Not complete. --- lib/oeqa/selftest/garage_push.py | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 lib/oeqa/selftest/garage_push.py diff --git a/lib/oeqa/selftest/garage_push.py b/lib/oeqa/selftest/garage_push.py new file mode 100644 index 0000000..3490de5 --- /dev/null +++ b/lib/oeqa/selftest/garage_push.py @@ -0,0 +1,39 @@ +import unittest +import os +import logging + +from oeqa.selftest.base import oeSelfTest +from oeqa.utils.commands import runCmd, bitbake, get_bb_var + +class GaragePushTests(oeSelfTest): + + @classmethod + def setUpClass(cls): + # Ensure we have the right data in pkgdata + logger = logging.getLogger("selftest") + logger.info('Running bitbake to build aktualizr-native tools') + bitbake('aktualizr-native garage-sign-native') + + def test_help(self): + image_dir = get_bb_var("D", "aktualizr-native") + bin_dir = get_bb_var("bindir", "aktualizr-native") + gp_path = os.path.join(image_dir, bin_dir[1:], 'garage-push') + result = runCmd('%s --help' % gp_path, ignore_status=True) + self.assertEqual(result.status, 0, "Status not equal to 0. output: %s" % result.output) + + def test_java(self): + result = runCmd('which java', ignore_status=True) + self.assertEqual(result.status, 0, "Java not found.") + + def test_sign(self): + image_dir = get_bb_var("D", "garage-sign-native") + bin_dir = get_bb_var("bindir", "garage-sign-native") + gs_path = os.path.join(image_dir, bin_dir[1:], 'garage-sign') + result = runCmd('%s --help' % gs_path, ignore_status=True) + self.assertEqual(result.status, 0, "Status not equal to 0. output: %s" % result.output) + + def test_push(self): + bitbake('core-image-minimal') + self.write_config('IMAGE_INSTALL_append = " man "') + bitbake('core-image-minimal') + -- cgit v1.2.3-54-g00ecf From a1fc5efd57adae53dc5bf57da61a4e35e954cd3f Mon Sep 17 00:00:00 2001 From: Leon Anavi Date: Fri, 3 Nov 2017 11:19:14 +0200 Subject: garage-sign: Update checksums Update md5 and sha256 checksums of the archive. Signed-off-by: Leon Anavi --- recipes-sota/garage-sign/garage-sign.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-sota/garage-sign/garage-sign.bb b/recipes-sota/garage-sign/garage-sign.bb index 0da35bb..3d8c98c 100644 --- a/recipes-sota/garage-sign/garage-sign.bb +++ b/recipes-sota/garage-sign/garage-sign.bb @@ -12,8 +12,8 @@ SRC_URI = " \ https://ats-tuf-cli-releases.s3-eu-central-1.amazonaws.com/cli-${PV}.tgz \ " -SRC_URI[md5sum] = "496ee983f03218f3e3f8d4f56c5d8d8d" -SRC_URI[sha256sum] = "1ab296d7abadc40f5ad851ae62a7dff8423bd7167fa9fdc1972c88c5fe90dd40" +SRC_URI[md5sum] = "39941607ddef3a93476e267ad7bf6280" +SRC_URI[sha256sum] = "fbd2ea56f21341146844b02837377b08e63a3e361079e2c65142c2ed881c3b5d" S = "${WORKDIR}/${BPN}" -- cgit v1.2.3-54-g00ecf From 3814eb4b6341c2a3f6cc0c7811e88e0e4a417d32 Mon Sep 17 00:00:00 2001 From: Leon Anavi Date: Fri, 3 Nov 2017 11:23:18 +0200 Subject: garage-sign: ship files Fix the issue with installed but not shipped files. Signed-off-by: Leon Anavi --- recipes-sota/garage-sign/garage-sign.bb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/recipes-sota/garage-sign/garage-sign.bb b/recipes-sota/garage-sign/garage-sign.bb index 3d8c98c..ccd7299 100644 --- a/recipes-sota/garage-sign/garage-sign.bb +++ b/recipes-sota/garage-sign/garage-sign.bb @@ -26,3 +26,9 @@ do_install() { install -m "0644" -t ${D}${libdir} ${S}/lib/* } +FILES_${PN} = " \ + /usr/bin \ + /usr/bin/garage-sign.bat \ + /usr/bin/garage-sign \ + /usr/lib/* \ + " -- cgit v1.2.3-54-g00ecf