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 | class BuildCpioTest(OESDKTestCase): |
| 6 | td_vars = ['DATETIME'] |
| 7 | |
| 8 | @classmethod |
| 9 | def setUpClass(self): |
| 10 | dl_dir = self.td.get('DL_DIR', None) |
| 11 | |
| 12 | self.project = SDKBuildProject(self.tc.sdk_dir + "/cpio/", self.tc.sdk_env, |
| 13 | "https://ftp.gnu.org/gnu/cpio/cpio-2.12.tar.gz", |
| 14 | self.tc.sdk_dir, self.td['DATETIME'], dl_dir=dl_dir) |
| 15 | self.project.download_archive() |
| 16 | |
| 17 | machine = self.td.get("MACHINE") |
| 18 | if not self.tc.hasHostPackage("packagegroup-cross-canadian-%s" % machine): |
| 19 | raise unittest.SkipTest("SDK doesn't contain a cross-canadian toolchain") |
| 20 | |
| 21 | def test_cpio(self): |
| 22 | self.assertEqual(self.project.run_configure(), 0, |
| 23 | msg="Running configure failed") |
| 24 | |
| 25 | self.assertEqual(self.project.run_make(), 0, |
| 26 | msg="Running make failed") |
| 27 | |
| 28 | self.assertEqual(self.project.run_install(), 0, |
| 29 | msg="Running make install failed") |
| 30 | |
| 31 | @classmethod |
| 32 | def tearDownClass(self): |
| 33 | self.project.clean() |