summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/oeqa/selftest/cases/updater.py43
-rwxr-xr-xrecipes-sota/aktualizr/aktualizr_git.bb2
2 files changed, 44 insertions, 1 deletions
diff --git a/lib/oeqa/selftest/cases/updater.py b/lib/oeqa/selftest/cases/updater.py
index 96058e7..e620491 100644
--- a/lib/oeqa/selftest/cases/updater.py
+++ b/lib/oeqa/selftest/cases/updater.py
@@ -193,6 +193,49 @@ class AutoProvTests(OESelftestTestCase):
193 'Legacy secondary initialization failed: ' + stderr.decode() + stdout.decode()) 193 'Legacy secondary initialization failed: ' + stderr.decode() + stdout.decode())
194 194
195 195
196class ManualControlTests(OESelftestTestCase):
197
198 def setUpLocal(self):
199 layer = "meta-updater-qemux86-64"
200 result = runCmd('bitbake-layers show-layers')
201 if re.search(layer, result.output) is None:
202 # Assume the directory layout for finding other layers. We could also
203 # make assumptions by using 'show-layers', but either way, if the
204 # layers we need aren't where we expect them, we are out of like.
205 path = os.path.abspath(os.path.dirname(__file__))
206 metadir = path + "/../../../../../"
207 self.meta_qemu = metadir + layer
208 runCmd('bitbake-layers add-layer "%s"' % self.meta_qemu)
209 else:
210 self.meta_qemu = None
211 self.append_config('MACHINE = "qemux86-64"')
212 self.append_config('SOTA_CLIENT_PROV = " aktualizr-auto-prov "')
213 self.append_config('SYSTEMD_AUTO_ENABLE_aktualizr = "disable"')
214 self.qemu, self.s = qemu_launch(machine='qemux86-64')
215
216 def tearDownLocal(self):
217 qemu_terminate(self.s)
218 if self.meta_qemu:
219 runCmd('bitbake-layers remove-layer "%s"' % self.meta_qemu, ignore_status=True)
220
221 def qemu_command(self, command):
222 return qemu_send_command(self.qemu.ssh_port, command)
223
224 def test_manual_running_mode_once(self):
225 """
226 Disable the systemd service then run aktualizr manually
227 """
228 sleep(20)
229 stdout, stderr, retcode = self.qemu_command('aktualizr-info')
230 self.assertIn(b'Fetched metadata: no', stdout,
231 'Aktualizr should not have run yet' + stderr.decode() + stdout.decode())
232
233 stdout, stderr, retcode = self.qemu_command('aktualizr --running-mode=once')
234
235 stdout, stderr, retcode = self.qemu_command('aktualizr-info')
236 self.assertIn(b'Fetched metadata: yes', stdout,
237 'Aktualizr should have run' + stderr.decode() + stdout.decode())
238
196class RpiTests(OESelftestTestCase): 239class RpiTests(OESelftestTestCase):
197 240
198 def setUpLocal(self): 241 def setUpLocal(self):
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb
index 52a8feb..ac3e070 100755
--- a/recipes-sota/aktualizr/aktualizr_git.bb
+++ b/recipes-sota/aktualizr/aktualizr_git.bb
@@ -26,7 +26,7 @@ SRC_URI = " \
26 file://aktualizr-secondary.socket \ 26 file://aktualizr-secondary.socket \
27 file://aktualizr-serialcan.service \ 27 file://aktualizr-serialcan.service \
28 " 28 "
29SRCREV = "61ee18b24271bc97c0f996745860b0c9495c5145" 29SRCREV = "72abac76184c84b9a5beb0dfbb103a13b9bfb2ae"
30BRANCH ?= "master" 30BRANCH ?= "master"
31 31
32S = "${WORKDIR}/git" 32S = "${WORKDIR}/git"