blob: e29bf16ccb0d0ec8ba455522c71c2863a1e7fddb [file] [log] [blame]
Brad Bishopc342db32019-05-15 21:57:59 -04001#
2# SPDX-License-Identifier: MIT
3#
4
Brad Bishop6e60e8b2018-02-01 10:27:11 -05005from oeqa.runtime.case import OERuntimeTestCase
6from oeqa.core.decorator.depends import OETestDepends
Brad Bishop977dc1a2019-02-06 16:01:43 -05007from oeqa.runtime.decorator.package import OEHasPackage
Brad Bishop6e60e8b2018-02-01 10:27:11 -05008
9from oeqa.runtime.utils.targetbuildproject import TargetBuildProject
10
11class BuildCpioTest(OERuntimeTestCase):
12
13 @classmethod
14 def setUpClass(cls):
Andrew Geissler82c905d2020-04-13 13:39:40 -050015 uri = 'https://downloads.yoctoproject.org/mirror/sources/cpio-2.13.tar.gz'
Brad Bishop6e60e8b2018-02-01 10:27:11 -050016 cls.project = TargetBuildProject(cls.tc.target,
17 uri,
18 dl_dir = cls.tc.td['DL_DIR'])
Brad Bishop6e60e8b2018-02-01 10:27:11 -050019
20 @classmethod
21 def tearDownClass(cls):
22 cls.project.clean()
23
Brad Bishop6e60e8b2018-02-01 10:27:11 -050024 @OETestDepends(['ssh.SSHTest.test_ssh'])
Brad Bishop977dc1a2019-02-06 16:01:43 -050025 @OEHasPackage(['gcc'])
26 @OEHasPackage(['make'])
27 @OEHasPackage(['autoconf'])
Brad Bishop6e60e8b2018-02-01 10:27:11 -050028 def test_cpio(self):
Brad Bishop977dc1a2019-02-06 16:01:43 -050029 self.project.download_archive()
Andrew Geissler635e0e42020-08-21 15:58:33 -050030 self.project.run_configure('--disable-maintainer-mode',
31 'sed -i -e "/char \*program_name/d" src/global.c;')
Brad Bishop6e60e8b2018-02-01 10:27:11 -050032 self.project.run_make()
33 self.project.run_install()