summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/recipetool.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-12-22 17:03:18 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-12-28 09:25:14 +0000
commitc2435b11812b32d967253794a7fff59bab2f49df (patch)
treedf8b306d744d61eaf090ad3b6de69ae458c77ccb /meta/lib/oeqa/selftest/recipetool.py
parent891673101ed1e01e9acce852bd74f2763cc72c61 (diff)
downloadpoky-c2435b11812b32d967253794a7fff59bab2f49df.tar.gz
oe-selftest: add tests for simple devtool add / recipetool create URL case
Add an oe-selftest test case for the newly supported syntax with only the remote URL specified (auto-detecting name and version). (From OE-Core rev: 7c7df9f62fe15578af0420c63e320c317e058708) 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/selftest/recipetool.py')
-rw-r--r--meta/lib/oeqa/selftest/recipetool.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/recipetool.py b/meta/lib/oeqa/selftest/recipetool.py
index bbfce7c394..34e383f772 100644
--- a/meta/lib/oeqa/selftest/recipetool.py
+++ b/meta/lib/oeqa/selftest/recipetool.py
@@ -401,6 +401,25 @@ class RecipetoolTests(RecipetoolBase):
401 inherits = ['autotools', 'pkgconfig'] 401 inherits = ['autotools', 'pkgconfig']
402 self._test_recipe_contents(recipefile, checkvars, inherits) 402 self._test_recipe_contents(recipefile, checkvars, inherits)
403 403
404 def test_recipetool_create_simple(self):
405 # Try adding a recipe
406 temprecipe = os.path.join(self.tempdir, 'recipe')
407 os.makedirs(temprecipe)
408 pv = '1.7.3.0'
409 srcuri = 'http://www.dest-unreach.org/socat/download/socat-%s.tar.bz2' % pv
410 result = runCmd('recipetool create %s -o %s' % (srcuri, temprecipe))
411 dirlist = os.listdir(temprecipe)
412 if len(dirlist) < 1 or not os.path.isfile(os.path.join(temprecipe, dirlist[0])):
413 self.fail('recipetool did not create recipe file; output:\n%s' % result.output)
414 self.assertEqual(dirlist[0], 'socat_%s.bb' % pv, 'Recipe file incorrectly named')
415 checkvars = {}
416 checkvars['LICENSE'] = 'Unknown GPLv2'
417 checkvars['LIC_FILES_CHKSUM'] = 'file://COPYING.OpenSSL;md5=5c9bccc77f67a8328ef4ebaf468116f4 file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263'
418 # We don't check DEPENDS since they are variable for this recipe depending on what's in the sysroot
419 checkvars['S'] = None
420 checkvars['SRC_URI'] = srcuri.replace(pv, '${PV}')
421 inherits = ['autotools']
422 self._test_recipe_contents(os.path.join(temprecipe, dirlist[0]), checkvars, inherits)
404 423
405class RecipetoolAppendsrcBase(RecipetoolBase): 424class RecipetoolAppendsrcBase(RecipetoolBase):
406 def _try_recipetool_appendsrcfile(self, testrecipe, newfile, destfile, options, expectedlines, expectedfiles): 425 def _try_recipetool_appendsrcfile(self, testrecipe, newfile, destfile, options, expectedlines, expectedfiles):