summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPatrick Vacek <patrickvacek@gmail.com>2017-11-13 13:39:38 +0100
committerPatrick Vacek <patrickvacek@gmail.com>2017-11-13 17:18:52 +0100
commitd05ef2141f0f707c75e6cafa8f8c49076c141376 (patch)
tree25ab55fa14287cd931ee564515e7b5a07060430d /lib
parent9d5ad230a7558ae9adea42ea69d633d489c6dec0 (diff)
downloadmeta-updater-d05ef2141f0f707c75e6cafa8f8c49076c141376.tar.gz
Fix paths to be more reliable.
Diffstat (limited to 'lib')
-rw-r--r--lib/oeqa/selftest/updater.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/oeqa/selftest/updater.py b/lib/oeqa/selftest/updater.py
index 4cdd1a2..e3542be 100644
--- a/lib/oeqa/selftest/updater.py
+++ b/lib/oeqa/selftest/updater.py
@@ -3,7 +3,7 @@ import os
3import logging 3import logging
4 4
5from oeqa.selftest.base import oeSelfTest 5from oeqa.selftest.base import oeSelfTest
6from oeqa.utils.commands import runCmd, bitbake, get_bb_var 6from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars
7import subprocess 7import subprocess
8from oeqa.selftest.qemucommand import QemuCommand 8from oeqa.selftest.qemucommand import QemuCommand
9import time 9import time
@@ -17,10 +17,10 @@ class UpdaterTests(oeSelfTest):
17 bitbake('aktualizr-native garage-sign-native') 17 bitbake('aktualizr-native garage-sign-native')
18 18
19 def test_help(self): 19 def test_help(self):
20 image_dir = get_bb_var("D", "aktualizr-native") 20 bb_vars = get_bb_vars(['SYSROOT_DESTDIR', 'bindir'], 'aktualizr-native')
21 bin_dir = get_bb_var("bindir", "aktualizr-native") 21 p = bb_vars['SYSROOT_DESTDIR'] + bb_vars['bindir'] + "/" + "garage-push"
22 gp_path = os.path.join(image_dir, bin_dir[1:], 'garage-push') 22 self.assertTrue(os.path.isfile(p), msg = "No garage-push found (%s)" % p)
23 result = runCmd('%s --help' % gp_path, ignore_status=True) 23 result = runCmd('%s --help' % p, ignore_status=True)
24 self.assertEqual(result.status, 0, "Status not equal to 0. output: %s" % result.output) 24 self.assertEqual(result.status, 0, "Status not equal to 0. output: %s" % result.output)
25 25
26 def test_java(self): 26 def test_java(self):
@@ -28,10 +28,10 @@ class UpdaterTests(oeSelfTest):
28 self.assertEqual(result.status, 0, "Java not found.") 28 self.assertEqual(result.status, 0, "Java not found.")
29 29
30 def test_sign(self): 30 def test_sign(self):
31 image_dir = get_bb_var("D", "garage-sign-native") 31 bb_vars = get_bb_vars(['SYSROOT_DESTDIR', 'bindir'], 'garage-sign-native')
32 bin_dir = get_bb_var("bindir", "garage-sign-native") 32 p = bb_vars['SYSROOT_DESTDIR'] + bb_vars['bindir'] + "/" + "garage-sign"
33 gs_path = os.path.join(image_dir, bin_dir[1:], 'garage-sign') 33 self.assertTrue(os.path.isfile(p), msg = "No garage-sign found (%s)" % p)
34 result = runCmd('%s --help' % gs_path, ignore_status=True) 34 result = runCmd('%s --help' % p, ignore_status=True)
35 self.assertEqual(result.status, 0, "Status not equal to 0. output: %s" % result.output) 35 self.assertEqual(result.status, 0, "Status not equal to 0. output: %s" % result.output)
36 36
37 def test_push(self): 37 def test_push(self):