diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2016-01-19 00:18:33 +1300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-19 17:24:53 +0000 |
commit | 2c8c9fe3b4e2d3a0910d567e99f0b268a854c0fe (patch) | |
tree | 863a899e78f3213f75729db08efc6cfed1a4a51c /meta/lib/oeqa | |
parent | 3eb397fab6a5c5a86ac4eb30c5159f19e8ebf796 (diff) | |
download | poky-2c8c9fe3b4e2d3a0910d567e99f0b268a854c0fe.tar.gz |
recipetool: create: add basic support for extracting dependencies from cmake
Add support for extracting dependencies from CMakeLists.txt. There's
still a bunch of things missing that are outside the scope of OE-Core
and we still lack a proper extension mechanism, but this is a good
start.
This also adds an oe-selftest test to exercise the new code a bit.
Implements [YOCTO #7635].
(From OE-Core rev: 77e73e6930381fdbd6e78d3913d6467572e16568)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r-- | meta/lib/oeqa/selftest/recipetool.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/recipetool.py b/meta/lib/oeqa/selftest/recipetool.py index 927da73e6f..b4d33bc35d 100644 --- a/meta/lib/oeqa/selftest/recipetool.py +++ b/meta/lib/oeqa/selftest/recipetool.py | |||
@@ -422,6 +422,23 @@ class RecipetoolTests(RecipetoolBase): | |||
422 | inherits = ['autotools'] | 422 | inherits = ['autotools'] |
423 | self._test_recipe_contents(os.path.join(temprecipe, dirlist[0]), checkvars, inherits) | 423 | self._test_recipe_contents(os.path.join(temprecipe, dirlist[0]), checkvars, inherits) |
424 | 424 | ||
425 | def test_recipetool_create_cmake(self): | ||
426 | # Try adding a recipe | ||
427 | temprecipe = os.path.join(self.tempdir, 'recipe') | ||
428 | os.makedirs(temprecipe) | ||
429 | recipefile = os.path.join(temprecipe, 'navit_0.5.0.bb') | ||
430 | srcuri = 'http://downloads.sourceforge.net/project/navit/v0.5.0/navit-0.5.0.tar.gz' | ||
431 | result = runCmd('recipetool create -o %s %s' % (temprecipe, srcuri)) | ||
432 | self.assertTrue(os.path.isfile(recipefile)) | ||
433 | checkvars = {} | ||
434 | checkvars['LICENSE'] = set(['Unknown', 'GPLv2', 'LGPLv2']) | ||
435 | checkvars['SRC_URI'] = 'http://downloads.sourceforge.net/project/navit/v${PV}/navit-${PV}.tar.gz' | ||
436 | checkvars['SRC_URI[md5sum]'] = '242f398e979a6b8c0f3c802b63435b68' | ||
437 | checkvars['SRC_URI[sha256sum]'] = '13353481d7fc01a4f64e385dda460b51496366bba0fd2cc85a89a0747910e94d' | ||
438 | checkvars['DEPENDS'] = set(['freetype', 'zlib', 'openssl', 'glib-2.0', 'virtual/libgl', 'virtual/egl', 'gtk+', 'libpng', 'libsdl', 'freeglut', 'dbus-glib']) | ||
439 | inherits = ['cmake', 'python-dir', 'gettext', 'pkgconfig'] | ||
440 | self._test_recipe_contents(recipefile, checkvars, inherits) | ||
441 | |||
425 | class RecipetoolAppendsrcBase(RecipetoolBase): | 442 | class RecipetoolAppendsrcBase(RecipetoolBase): |
426 | def _try_recipetool_appendsrcfile(self, testrecipe, newfile, destfile, options, expectedlines, expectedfiles): | 443 | def _try_recipetool_appendsrcfile(self, testrecipe, newfile, destfile, options, expectedlines, expectedfiles): |
427 | cmd = 'recipetool appendsrcfile %s %s %s %s %s' % (options, self.templayerdir, testrecipe, newfile, destfile) | 444 | cmd = 'recipetool appendsrcfile %s %s %s %s %s' % (options, self.templayerdir, testrecipe, newfile, destfile) |