blob: b28cc3a595ed6b978aeedbe74e7d8ae283d08daa [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
5
6class 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 Bishop1a4b7ee2018-12-16 17:11:34 -080020 if not (self.tc.hasHostPackage("packagegroup-cross-canadian-%s" % machine) or
21 self.tc.hasHostPackage("^gcc-", regex=True)):
Brad Bishop6e60e8b2018-02-01 10:27:11 -050022 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()