mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 13:29:49 +00:00
oeqa/selftest/recipetool: Move helper function to the class scope
(From OE-Core rev: 89d37266524ca3e7c9eaf9141b30055ebc39aa76) Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
b6766e0ac2
commit
a075bf502e
@@ -744,14 +744,14 @@ class RecipetoolCreateTests(RecipetoolBase):
|
|||||||
def test_recipetool_create_git_srcbranch(self):
|
def test_recipetool_create_git_srcbranch(self):
|
||||||
self._test_recipetool_create_git('git://git.yoctoproject.org/matchbox-keyboard;protocol=https', 'matchbox-keyboard-0-1')
|
self._test_recipetool_create_git('git://git.yoctoproject.org/matchbox-keyboard;protocol=https', 'matchbox-keyboard-0-1')
|
||||||
|
|
||||||
|
def _go_urifiy(self, url, version, modulepath = None, pathmajor = None, subdir = None):
|
||||||
|
modulepath = ",path='%s'" % modulepath if len(modulepath) else ''
|
||||||
|
pathmajor = ",pathmajor='%s'" % pathmajor if len(pathmajor) else ''
|
||||||
|
subdir = ",subdir='%s'" % subdir if len(subdir) else ''
|
||||||
|
return "${@go_src_uri('%s','%s'%s%s%s)}" % (url, version, modulepath, pathmajor, subdir)
|
||||||
|
|
||||||
def test_recipetool_create_go(self):
|
def test_recipetool_create_go(self):
|
||||||
# Basic test to check go recipe generation
|
# Basic test to check go recipe generation
|
||||||
def urifiy(url, version, modulepath = None, pathmajor = None, subdir = None):
|
|
||||||
modulepath = ",path='%s'" % modulepath if len(modulepath) else ''
|
|
||||||
pathmajor = ",pathmajor='%s'" % pathmajor if len(pathmajor) else ''
|
|
||||||
subdir = ",subdir='%s'" % subdir if len(subdir) else ''
|
|
||||||
return "${@go_src_uri('%s','%s'%s%s%s)}" % (url, version, modulepath, pathmajor, subdir)
|
|
||||||
|
|
||||||
temprecipe = os.path.join(self.tempdir, 'recipe')
|
temprecipe = os.path.join(self.tempdir, 'recipe')
|
||||||
os.makedirs(temprecipe)
|
os.makedirs(temprecipe)
|
||||||
|
|
||||||
@@ -919,7 +919,7 @@ class RecipetoolCreateTests(RecipetoolBase):
|
|||||||
|
|
||||||
src_uri = set()
|
src_uri = set()
|
||||||
for d in dependencies:
|
for d in dependencies:
|
||||||
src_uri.add(urifiy(*d))
|
src_uri.add(self._go_urifiy(*d))
|
||||||
|
|
||||||
checkvars = {}
|
checkvars = {}
|
||||||
checkvars['GO_DEPENDENCIES_SRC_URI'] = src_uri
|
checkvars['GO_DEPENDENCIES_SRC_URI'] = src_uri
|
||||||
|
|||||||
Reference in New Issue
Block a user