summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/runtime-test.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/selftest/runtime-test.py')
-rw-r--r--meta/lib/oeqa/selftest/runtime-test.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/meta/lib/oeqa/selftest/runtime-test.py b/meta/lib/oeqa/selftest/runtime-test.py
index a673f36d39..e8b483d7f8 100644
--- a/meta/lib/oeqa/selftest/runtime-test.py
+++ b/meta/lib/oeqa/selftest/runtime-test.py
@@ -1,5 +1,5 @@
1from oeqa.selftest.base import oeSelfTest 1from oeqa.selftest.base import oeSelfTest
2from oeqa.utils.commands import runCmd, bitbake, get_bb_var, runqemu 2from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars, runqemu
3from oeqa.utils.decorators import testcase 3from oeqa.utils.decorators import testcase
4import os 4import os
5import re 5import re
@@ -31,8 +31,9 @@ class TestExport(oeSelfTest):
31 bitbake('core-image-minimal') 31 bitbake('core-image-minimal')
32 bitbake('-c testexport core-image-minimal') 32 bitbake('-c testexport core-image-minimal')
33 33
34 # Verify if TEST_EXPORT_DIR was created
35 testexport_dir = get_bb_var('TEST_EXPORT_DIR', 'core-image-minimal') 34 testexport_dir = get_bb_var('TEST_EXPORT_DIR', 'core-image-minimal')
35
36 # Verify if TEST_EXPORT_DIR was created
36 isdir = os.path.isdir(testexport_dir) 37 isdir = os.path.isdir(testexport_dir)
37 self.assertEqual(True, isdir, 'Failed to create testexport dir: %s' % testexport_dir) 38 self.assertEqual(True, isdir, 'Failed to create testexport dir: %s' % testexport_dir)
38 39
@@ -73,10 +74,14 @@ class TestExport(oeSelfTest):
73 bitbake('core-image-minimal') 74 bitbake('core-image-minimal')
74 bitbake('-c testexport core-image-minimal') 75 bitbake('-c testexport core-image-minimal')
75 76
77 needed_vars = ['TEST_EXPORT_DIR', 'TEST_EXPORT_SDK_DIR', 'TEST_EXPORT_SDK_NAME']
78 bb_vars = get_bb_vars(needed_vars, 'core-image-minimal')
79 testexport_dir = bb_vars['TEST_EXPORT_DIR']
80 sdk_dir = bb_vars['TEST_EXPORT_SDK_DIR']
81 sdk_name = bb_vars['TEST_EXPORT_SDK_NAME']
82
76 # Check for SDK 83 # Check for SDK
77 testexport_dir = get_bb_var('TEST_EXPORT_DIR', 'core-image-minimal') 84 tarball_name = "%s.sh" % sdk_name
78 sdk_dir = get_bb_var('TEST_EXPORT_SDK_DIR', 'core-image-minimal')
79 tarball_name = "%s.sh" % get_bb_var('TEST_EXPORT_SDK_NAME', 'core-image-minimal')
80 tarball_path = os.path.join(testexport_dir, sdk_dir, tarball_name) 85 tarball_path = os.path.join(testexport_dir, sdk_dir, tarball_name)
81 msg = "Couldn't find SDK tarball: %s" % tarball_path 86 msg = "Couldn't find SDK tarball: %s" % tarball_path
82 self.assertEqual(os.path.isfile(tarball_path), True, msg) 87 self.assertEqual(os.path.isfile(tarball_path), True, msg)