Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1 | import unittest |
| 2 | from oeqa.sdk.case import OESDKTestCase |
| 3 | from oeqa.sdk.utils.sdkbuildproject import SDKBuildProject |
| 4 | |
| 5 | |
| 6 | class BuildLzipTest(OESDKTestCase): |
| 7 | td_vars = ['DATETIME'] |
| 8 | |
| 9 | @classmethod |
| 10 | def setUpClass(self): |
| 11 | dl_dir = self.td.get('DL_DIR', None) |
| 12 | |
| 13 | self.project = SDKBuildProject(self.tc.sdk_dir + "/lzip/", self.tc.sdk_env, |
| 14 | "http://downloads.yoctoproject.org/mirror/sources/lzip-1.19.tar.gz", |
| 15 | self.tc.sdk_dir, self.td['DATETIME'], dl_dir=dl_dir) |
| 16 | self.project.download_archive() |
| 17 | |
| 18 | machine = self.td.get("MACHINE") |
| 19 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 20 | if not (self.tc.hasHostPackage("packagegroup-cross-canadian-%s" % machine) or |
| 21 | self.tc.hasHostPackage("^gcc-", regex=True)): |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 22 | raise unittest.SkipTest("SDK doesn't contain a cross-canadian toolchain") |
| 23 | |
| 24 | def test_lzip(self): |
| 25 | self.assertEqual(self.project.run_configure(), 0, |
| 26 | msg="Running configure failed") |
| 27 | |
| 28 | self.assertEqual(self.project.run_make(), 0, |
| 29 | msg="Running make failed") |
| 30 | |
| 31 | self.assertEqual(self.project.run_install(), 0, |
| 32 | msg="Running make install failed") |
| 33 | |
| 34 | @classmethod |
| 35 | def tearDownClass(self): |
| 36 | self.project.clean() |