From c9fe59d7c5e815fb6453f50d0f15699ea6799129 Mon Sep 17 00:00:00 2001 From: Aníbal Limón Date: Sun, 27 Nov 2016 17:51:53 -0600 Subject: oeqa/sdk/cases: Migrate tests to the new OEQA framework MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary of the changes: - Remove auto extend_path using pkgutil at __init__, is not needed. - Change base class to OESDKTestCase. - Add td_vars attr to set dependencies of certain variables in test data. - Change skips from module level to class level because Test context (tc) now isn't at module level. - Variable names changes to be consistent (i.e. sdktestdir -> sdk_dir). [YOCTO #10599] - Don't use bb.utils functions use instead remove_safe and shutil for copy files. - SDKBuildProject pass test data variables instead of call getVar inside. [YOCTO #10231] (From OE-Core rev: 91cd1ed19a3f34c29cd77eb136036975fe465444) Signed-off-by: Aníbal Limón Signed-off-by: Mariano Lopez Signed-off-by: Richard Purdie --- meta/lib/oeqa/sdk/cases/buildcvs.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'meta/lib/oeqa/sdk/cases/buildcvs.py') diff --git a/meta/lib/oeqa/sdk/cases/buildcvs.py b/meta/lib/oeqa/sdk/cases/buildcvs.py index c7146fa4af..ee7fb73803 100644 --- a/meta/lib/oeqa/sdk/cases/buildcvs.py +++ b/meta/lib/oeqa/sdk/cases/buildcvs.py @@ -1,13 +1,16 @@ -from oeqa.oetest import oeSDKTest, skipModule -from oeqa.utils.decorators import * -from oeqa.utils.targetbuild import SDKBuildProject +from oeqa.sdk.case import OESDKTestCase +from oeqa.sdk.utils.sdkbuildproject import SDKBuildProject -class BuildCvsTest(oeSDKTest): +class BuildCvsTest(OESDKTestCase): + td_vars = ['TEST_LOG_DIR', 'DATETIME'] @classmethod def setUpClass(self): - self.project = SDKBuildProject(oeSDKTest.tc.sdktestdir + "/cvs/", oeSDKTest.tc.sdkenv, oeSDKTest.tc.d, - "http://ftp.gnu.org/non-gnu/cvs/source/feature/1.12.13/cvs-1.12.13.tar.bz2") + dl_dir = self.td.get('DL_DIR', None) + + self.project = SDKBuildProject(self.tc.sdk_dir + "/cvs/", self.tc.sdk_env, + "http://ftp.gnu.org/non-gnu/cvs/source/feature/1.12.13/cvs-1.12.13.tar.bz2", + self.td['TEST_LOG_DIR'], self.td['DATETIME'], dl_dir=dl_dir) self.project.download_archive() def test_cvs(self): -- cgit v1.2.3-54-g00ecf