diff options
author | Mariano Lopez <mariano.lopez@linux.intel.com> | 2016-08-01 08:16:33 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-08-04 15:22:22 +0100 |
commit | 44ae8284d03c79deadd89ee5ee7ca75481ab9e53 (patch) | |
tree | 6ef8a6c89c1bf3eaa434f3beb21b967143bf2328 /meta | |
parent | d2e5c93dba516b85a10e510e65aaad5d77aaa652 (diff) | |
download | poky-44ae8284d03c79deadd89ee5ee7ca75481ab9e53.tar.gz |
selftest/runtime-test.py: Add test for testexport SDK feature
This adds test_testexport_sdk() to test the SDK feature
of testexport in the CI in order to avoid breaking it.
[YOCTO #9765]
(From OE-Core rev: badec3d10fcdd2d000450ab533caadcff1df5e13)
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oeqa/selftest/runtime-test.py | 41 |
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 | ||
47 | class TestImage(oeSelfTest): | 87 | class 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 |