diff options
author | Vyacheslav Yurkov <uvv.mail@gmail.com> | 2024-01-16 09:23:26 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-01-19 12:21:22 +0000 |
commit | a075bf502eedf41aa76b50597d05111a7bb3eaf8 (patch) | |
tree | 00ae6bc8bf48c2e11e74cdf4d6a22c6441bb6783 /meta/lib/oeqa/selftest/cases | |
parent | b6766e0ac2a61ec915a3a97cd827bd4aa93fab2b (diff) | |
download | poky-a075bf502eedf41aa76b50597d05111a7bb3eaf8.tar.gz |
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>
Diffstat (limited to 'meta/lib/oeqa/selftest/cases')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/recipetool.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py b/meta/lib/oeqa/selftest/cases/recipetool.py index 356bb4a746..83848d6170 100644 --- a/meta/lib/oeqa/selftest/cases/recipetool.py +++ b/meta/lib/oeqa/selftest/cases/recipetool.py | |||
@@ -744,14 +744,14 @@ class RecipetoolCreateTests(RecipetoolBase): | |||
744 | def test_recipetool_create_git_srcbranch(self): | 744 | def test_recipetool_create_git_srcbranch(self): |
745 | self._test_recipetool_create_git('git://git.yoctoproject.org/matchbox-keyboard;protocol=https', 'matchbox-keyboard-0-1') | 745 | self._test_recipetool_create_git('git://git.yoctoproject.org/matchbox-keyboard;protocol=https', 'matchbox-keyboard-0-1') |
746 | 746 | ||
747 | def _go_urifiy(self, url, version, modulepath = None, pathmajor = None, subdir = None): | ||
748 | modulepath = ",path='%s'" % modulepath if len(modulepath) else '' | ||
749 | pathmajor = ",pathmajor='%s'" % pathmajor if len(pathmajor) else '' | ||
750 | subdir = ",subdir='%s'" % subdir if len(subdir) else '' | ||
751 | return "${@go_src_uri('%s','%s'%s%s%s)}" % (url, version, modulepath, pathmajor, subdir) | ||
752 | |||
747 | def test_recipetool_create_go(self): | 753 | def test_recipetool_create_go(self): |
748 | # Basic test to check go recipe generation | 754 | # Basic test to check go recipe generation |
749 | def urifiy(url, version, modulepath = None, pathmajor = None, subdir = None): | ||
750 | modulepath = ",path='%s'" % modulepath if len(modulepath) else '' | ||
751 | pathmajor = ",pathmajor='%s'" % pathmajor if len(pathmajor) else '' | ||
752 | subdir = ",subdir='%s'" % subdir if len(subdir) else '' | ||
753 | return "${@go_src_uri('%s','%s'%s%s%s)}" % (url, version, modulepath, pathmajor, subdir) | ||
754 | |||
755 | temprecipe = os.path.join(self.tempdir, 'recipe') | 755 | temprecipe = os.path.join(self.tempdir, 'recipe') |
756 | os.makedirs(temprecipe) | 756 | os.makedirs(temprecipe) |
757 | 757 | ||
@@ -919,7 +919,7 @@ class RecipetoolCreateTests(RecipetoolBase): | |||
919 | 919 | ||
920 | src_uri = set() | 920 | src_uri = set() |
921 | for d in dependencies: | 921 | for d in dependencies: |
922 | src_uri.add(urifiy(*d)) | 922 | src_uri.add(self._go_urifiy(*d)) |
923 | 923 | ||
924 | checkvars = {} | 924 | checkvars = {} |
925 | checkvars['GO_DEPENDENCIES_SRC_URI'] = src_uri | 925 | checkvars['GO_DEPENDENCIES_SRC_URI'] = src_uri |