diff options
| -rw-r--r-- | meta/lib/oeqa/selftest/cases/recipetool.py | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py b/meta/lib/oeqa/selftest/cases/recipetool.py index 5694d6fb69..83361814df 100644 --- a/meta/lib/oeqa/selftest/cases/recipetool.py +++ b/meta/lib/oeqa/selftest/cases/recipetool.py | |||
| @@ -451,18 +451,19 @@ class RecipetoolCreateTests(RecipetoolBase): | |||
| 451 | self._test_recipe_contents(recipefile, checkvars, inherits) | 451 | self._test_recipe_contents(recipefile, checkvars, inherits) |
| 452 | 452 | ||
| 453 | def test_recipetool_create_github(self): | 453 | def test_recipetool_create_github(self): |
| 454 | # Basic test to see if github URL mangling works | 454 | # Basic test to see if github URL mangling works. Deliberately use an |
| 455 | # older release of Meson at present so we don't need a toml parser. | ||
| 455 | temprecipe = os.path.join(self.tempdir, 'recipe') | 456 | temprecipe = os.path.join(self.tempdir, 'recipe') |
| 456 | os.makedirs(temprecipe) | 457 | os.makedirs(temprecipe) |
| 457 | recipefile = os.path.join(temprecipe, 'meson_git.bb') | 458 | recipefile = os.path.join(temprecipe, 'python3-meson_git.bb') |
| 458 | srcuri = 'https://github.com/mesonbuild/meson;rev=1.3.1' | 459 | srcuri = 'https://github.com/mesonbuild/meson;rev=0.52.1' |
| 459 | cmd = ['recipetool', 'create', '-o', temprecipe, srcuri] | 460 | cmd = ['recipetool', 'create', '-o', temprecipe, srcuri] |
| 460 | result = runCmd(cmd) | 461 | result = runCmd(cmd) |
| 461 | self.assertTrue(os.path.isfile(recipefile), msg="recipe %s not created for command %s, output %s" % (recipefile, " ".join(cmd), result.output)) | 462 | self.assertTrue(os.path.isfile(recipefile), msg="recipe %s not created for command %s, output %s" % (recipefile, " ".join(cmd), result.output)) |
| 462 | checkvars = {} | 463 | checkvars = {} |
| 463 | checkvars['LICENSE'] = set(['Apache-2.0', 'Proprietary', 'Unknown']) | 464 | checkvars['LICENSE'] = set(['Apache-2.0', "Unknown"]) |
| 464 | checkvars['SRC_URI'] = 'git://github.com/mesonbuild/meson;protocol=https;branch=1.3' | 465 | checkvars['SRC_URI'] = 'git://github.com/mesonbuild/meson;protocol=https;branch=0.52' |
| 465 | inherits = ['python_setuptools_build_meta'] | 466 | inherits = ['setuptools3'] |
| 466 | self._test_recipe_contents(recipefile, checkvars, inherits) | 467 | self._test_recipe_contents(recipefile, checkvars, inherits) |
| 467 | 468 | ||
| 468 | def test_recipetool_create_python3_setuptools(self): | 469 | def test_recipetool_create_python3_setuptools(self): |
| @@ -676,18 +677,19 @@ class RecipetoolCreateTests(RecipetoolBase): | |||
| 676 | self._test_recipe_contents(recipefile, checkvars, inherits) | 677 | self._test_recipe_contents(recipefile, checkvars, inherits) |
| 677 | 678 | ||
| 678 | def test_recipetool_create_github_tarball(self): | 679 | def test_recipetool_create_github_tarball(self): |
| 679 | # Basic test to ensure github URL mangling doesn't apply to release tarballs | 680 | # Basic test to ensure github URL mangling doesn't apply to release tarballs. |
| 681 | # Deliberately use an older release of Meson at present so we don't need a toml parser. | ||
| 680 | temprecipe = os.path.join(self.tempdir, 'recipe') | 682 | temprecipe = os.path.join(self.tempdir, 'recipe') |
| 681 | os.makedirs(temprecipe) | 683 | os.makedirs(temprecipe) |
| 682 | pv = '1.3.1' | 684 | pv = '0.52.1' |
| 683 | recipefile = os.path.join(temprecipe, 'meson_%s.bb' % pv) | 685 | recipefile = os.path.join(temprecipe, 'python3-meson_%s.bb' % pv) |
| 684 | srcuri = 'https://github.com/mesonbuild/meson/releases/download/%s/meson-%s.tar.gz' % (pv, pv) | 686 | srcuri = 'https://github.com/mesonbuild/meson/releases/download/%s/meson-%s.tar.gz' % (pv, pv) |
| 685 | result = runCmd('recipetool create -o %s %s' % (temprecipe, srcuri)) | 687 | result = runCmd('recipetool create -o %s %s' % (temprecipe, srcuri)) |
| 686 | self.assertTrue(os.path.isfile(recipefile)) | 688 | self.assertTrue(os.path.isfile(recipefile)) |
| 687 | checkvars = {} | 689 | checkvars = {} |
| 688 | checkvars['LICENSE'] = set(['Apache-2.0', 'Proprietary', 'Unknown']) | 690 | checkvars['LICENSE'] = set(['Apache-2.0']) |
| 689 | checkvars['SRC_URI'] = 'https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${PV}.tar.gz' | 691 | checkvars['SRC_URI'] = 'https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${PV}.tar.gz' |
| 690 | inherits = ['python_setuptools_build_meta'] | 692 | inherits = ['setuptools3'] |
| 691 | self._test_recipe_contents(recipefile, checkvars, inherits) | 693 | self._test_recipe_contents(recipefile, checkvars, inherits) |
| 692 | 694 | ||
| 693 | def _test_recipetool_create_git(self, srcuri, branch=None): | 695 | def _test_recipetool_create_git(self, srcuri, branch=None): |
