mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00

All build project test cases will try to copy the requested source artefacts from DL_DIR before fetching. This testcase is referencing bzipped tarball whereas the recipe fetches a gzipped tarball. Switch to fetching the gzipped tarball in the test case so that we're able to use a cached tarball from DL_DIR (From OE-Core rev: 27a5883e8ae01e69f5425efe8b035bea7087b2f9) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
34 lines
1.2 KiB
Python
34 lines
1.2 KiB
Python
import unittest
|
|
from oeqa.sdk.case import OESDKTestCase
|
|
from oeqa.sdk.utils.sdkbuildproject import SDKBuildProject
|
|
|
|
class BuildCpioTest(OESDKTestCase):
|
|
td_vars = ['DATETIME']
|
|
|
|
@classmethod
|
|
def setUpClass(self):
|
|
dl_dir = self.td.get('DL_DIR', None)
|
|
|
|
self.project = SDKBuildProject(self.tc.sdk_dir + "/cpio/", self.tc.sdk_env,
|
|
"https://ftp.gnu.org/gnu/cpio/cpio-2.12.tar.gz",
|
|
self.tc.sdk_dir, self.td['DATETIME'], dl_dir=dl_dir)
|
|
self.project.download_archive()
|
|
|
|
machine = self.td.get("MACHINE")
|
|
if not self.tc.hasHostPackage("packagegroup-cross-canadian-%s" % machine):
|
|
raise unittest.SkipTest("SDK doesn't contain a cross-canadian toolchain")
|
|
|
|
def test_cpio(self):
|
|
self.assertEqual(self.project.run_configure(), 0,
|
|
msg="Running configure failed")
|
|
|
|
self.assertEqual(self.project.run_make(), 0,
|
|
msg="Running make failed")
|
|
|
|
self.assertEqual(self.project.run_install(), 0,
|
|
msg="Running make install failed")
|
|
|
|
@classmethod
|
|
def tearDownClass(self):
|
|
self.project.clean()
|