diff options
| -rw-r--r-- | meta/lib/oeqa/selftest/cases/runtime_test.py | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py index 976b513727..353d411681 100644 --- a/meta/lib/oeqa/selftest/cases/runtime_test.py +++ b/meta/lib/oeqa/selftest/cases/runtime_test.py | |||
| @@ -14,11 +14,6 @@ from oeqa.core.decorator.data import skipIfNotQemu | |||
| 14 | 14 | ||
| 15 | class TestExport(OESelftestTestCase): | 15 | class TestExport(OESelftestTestCase): |
| 16 | 16 | ||
| 17 | @classmethod | ||
| 18 | def tearDownClass(cls): | ||
| 19 | runCmd("rm -rf /tmp/sdk") | ||
| 20 | super(TestExport, cls).tearDownClass() | ||
| 21 | |||
| 22 | def test_testexport_basic(self): | 17 | def test_testexport_basic(self): |
| 23 | """ | 18 | """ |
| 24 | Summary: Check basic testexport functionality with only ping test enabled. | 19 | Summary: Check basic testexport functionality with only ping test enabled. |
| @@ -95,19 +90,20 @@ class TestExport(OESelftestTestCase): | |||
| 95 | msg = "Couldn't find SDK tarball: %s" % tarball_path | 90 | msg = "Couldn't find SDK tarball: %s" % tarball_path |
| 96 | self.assertEqual(os.path.isfile(tarball_path), True, msg) | 91 | self.assertEqual(os.path.isfile(tarball_path), True, msg) |
| 97 | 92 | ||
| 98 | # Extract SDK and run tar from SDK | 93 | with tempfile.TemporaryDirectory() as tmpdirname: |
| 99 | result = runCmd("%s -y -d /tmp/sdk" % tarball_path) | 94 | # Extract SDK and run tar from SDK |
| 100 | self.assertEqual(0, result.status, "Couldn't extract SDK") | 95 | result = runCmd("%s -y -d %s" % (tarball_path, tmpdirname)) |
| 96 | self.assertEqual(0, result.status, "Couldn't extract SDK") | ||
| 101 | 97 | ||
| 102 | env_script = result.output.split()[-1] | 98 | env_script = result.output.split()[-1] |
| 103 | result = runCmd(". %s; which tar" % env_script, shell=True) | 99 | result = runCmd(". %s; which tar" % env_script, shell=True) |
| 104 | self.assertEqual(0, result.status, "Couldn't setup SDK environment") | 100 | self.assertEqual(0, result.status, "Couldn't setup SDK environment") |
| 105 | is_sdk_tar = True if "/tmp/sdk" in result.output else False | 101 | is_sdk_tar = True if tmpdirname in result.output else False |
| 106 | self.assertTrue(is_sdk_tar, "Couldn't setup SDK environment") | 102 | self.assertTrue(is_sdk_tar, "Couldn't setup SDK environment") |
| 107 | 103 | ||
| 108 | tar_sdk = result.output | 104 | tar_sdk = result.output |
| 109 | result = runCmd("%s --version" % tar_sdk) | 105 | result = runCmd("%s --version" % tar_sdk) |
| 110 | self.assertEqual(0, result.status, "Couldn't run tar from SDK") | 106 | self.assertEqual(0, result.status, "Couldn't run tar from SDK") |
| 111 | 107 | ||
| 112 | 108 | ||
| 113 | class TestImage(OESelftestTestCase): | 109 | class TestImage(OESelftestTestCase): |
