blob: 333dc7c226d7d4bb54a29ab9365acdc3db0dbb83 [file] [log] [blame]
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001import unittest
2from oeqa.sdk.case import OESDKTestCase
3from oeqa.sdk.utils.sdkbuildproject import SDKBuildProject
4
5class 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()