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.py41
1 files changed, 41 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/runtime-test.py b/meta/lib/oeqa/selftest/runtime-test.py
index b8e1be10f8..c2d5b45a4b 100644
--- a/meta/lib/oeqa/selftest/runtime-test.py
+++ b/meta/lib/oeqa/selftest/runtime-test.py
@@ -43,6 +43,46 @@ class TestExport(oeSelfTest):
43 failure = True if 'FAIL' in result.output else False 43 failure = True if 'FAIL' in result.output else False
44 self.assertNotEqual(True, failure, 'ping test failed') 44 self.assertNotEqual(True, failure, 'ping test failed')
45 45
46 def test_testexport_sdk(self):
47 """
48 Summary: Check sdk functionality for testexport.
49 Expected: 1. testexport directory must be created.
50 2. SDK tarball must exists.
51 3. Uncompressing of tarball must succeed.
52 4. Check if the SDK directory is added to PATH.
53 5. Run tar from the SDK directory.
54 Product: oe-core
55 Author: Mariano Lopez <mariano.lopez@intel.com>
56 """
57
58 features = 'INHERIT += "testexport"\n'
59 # These aren't the actual IP addresses but testexport class needs something defined
60 features += 'TEST_SERVER_IP = "192.168.7.1"\n'
61 features += 'TEST_TARGET_IP = "192.168.7.1"\n'
62 features += 'TEST_SUITES = "ping"\n'
63 features += 'TEST_SUITES_TAGS = "selftest_sdk"\n'
64 features += 'TEST_EXPORT_SDK_ENABLED = "1"\n'
65 features += 'TEST_EXPORT_SDK_PACKAGES = "nativesdk-tar"\n'
66 self.write_config(features)
67
68 # Build tesexport for core-image-minimal
69 bitbake('core-image-minimal')
70 bitbake('-c testexport core-image-minimal')
71
72 # Check for SDK
73 testexport_dir = get_bb_var('TEST_EXPORT_DIR', 'core-image-minimal')
74 sdk_dir = get_bb_var('TEST_EXPORT_SDK_DIR', 'core-image-minimal')
75 tarball_name = "%s.sh" % get_bb_var('TEST_EXPORT_SDK_NAME', 'core-image-minimal')
76 tarball_path = os.path.join(testexport_dir, sdk_dir, tarball_name)
77 self.assertEqual(os.path.isfile(tarball_path), True, "Couldn't find SDK tarball: %s" % tarball_path)
78
79 # Run runexported.py
80 runexported_path = os.path.join(testexport_dir, "runexported.py")
81 testdata_path = os.path.join(testexport_dir, "testdata.json")
82 cmd = "%s %s" % (runexported_path, testdata_path)
83 result = runCmd(cmd)
84 self.assertEqual(0, result.status, 'runexported.py returned a non 0 status')
85
46 86
47class TestImage(oeSelfTest): 87class TestImage(oeSelfTest):
48 88
@@ -57,6 +97,7 @@ class TestImage(oeSelfTest):
57 97
58 features = 'INHERIT += "testimage"\n' 98 features = 'INHERIT += "testimage"\n'
59 features += 'TEST_SUITES = "ping ssh selftest"\n' 99 features += 'TEST_SUITES = "ping ssh selftest"\n'
100 features += 'TEST_SUITES_TAGS = "selftest_package_install"\n'
60 self.write_config(features) 101 self.write_config(features)
61 102
62 # Build core-image-sato and testimage 103 # Build core-image-sato and testimage