Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 1 | # |
| 2 | # SPDX-License-Identifier: MIT |
| 3 | # |
| 4 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 5 | from oeqa.runtime.case import OERuntimeTestCase |
| 6 | from oeqa.core.decorator.depends import OETestDepends |
Brad Bishop | 977dc1a | 2019-02-06 16:01:43 -0500 | [diff] [blame] | 7 | from oeqa.runtime.decorator.package import OEHasPackage |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 8 | |
| 9 | from oeqa.runtime.utils.targetbuildproject import TargetBuildProject |
| 10 | |
| 11 | class BuildCpioTest(OERuntimeTestCase): |
| 12 | |
| 13 | @classmethod |
| 14 | def setUpClass(cls): |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 15 | uri = 'https://downloads.yoctoproject.org/mirror/sources/cpio-2.13.tar.gz' |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 16 | cls.project = TargetBuildProject(cls.tc.target, |
| 17 | uri, |
| 18 | dl_dir = cls.tc.td['DL_DIR']) |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 19 | |
| 20 | @classmethod |
| 21 | def tearDownClass(cls): |
| 22 | cls.project.clean() |
| 23 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 24 | @OETestDepends(['ssh.SSHTest.test_ssh']) |
Brad Bishop | 977dc1a | 2019-02-06 16:01:43 -0500 | [diff] [blame] | 25 | @OEHasPackage(['gcc']) |
| 26 | @OEHasPackage(['make']) |
| 27 | @OEHasPackage(['autoconf']) |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 28 | def test_cpio(self): |
Brad Bishop | 977dc1a | 2019-02-06 16:01:43 -0500 | [diff] [blame] | 29 | self.project.download_archive() |
Andrew Geissler | 635e0e4 | 2020-08-21 15:58:33 -0500 | [diff] [blame] | 30 | self.project.run_configure('--disable-maintainer-mode', |
| 31 | 'sed -i -e "/char \*program_name/d" src/global.c;') |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 32 | self.project.run_make() |
| 33 | self.project.run_install() |