path: root/meta/lib/oeqa
diff options
authorPaul Eggleton <>2016-03-14 08:59:03 +1300
committerRichard Purdie <>2016-03-20 07:44:01 +0000
commitb8b778345eb0997c2cd952a1f61fdd2050b6b894 (patch)
tree95698a0f34ba7c5c9a45187a91cdd69146bcaf5a /meta/lib/oeqa
parent300f858ba07c938427ccd05a3d7220027a03d461 (diff)
recipetool: create: don't create extra files directory unconditionally
The extra directory next to the recipe should only be created if there are files to put into it; currently only the npm plugin does this. I didn't notice the issue earlier because the test was actually able to succeed under these circumstances if the recipe file came first in the directory listing, which was a fault in my original oe-selftest test; apparently on some YP autobuilder machines the order came out reversed. With this change we can put the oe-selftest test that highlighted the issue back to the way it was, with an extra check to reinforce that only a single file should be created. Signed-off-by: Paul Eggleton <> Signed-off-by: Richard Purdie <>
Diffstat (limited to 'meta/lib/oeqa')
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/lib/oeqa/selftest/ b/meta/lib/oeqa/selftest/
index 72ee110876..a04ee87db2 100644
--- a/meta/lib/oeqa/selftest/
+++ b/meta/lib/oeqa/selftest/
@@ -410,9 +410,11 @@ class RecipetoolTests(RecipetoolBase):
srcuri = '' % pv
result = runCmd('recipetool create %s -o %s' % (srcuri, temprecipe))
dirlist = os.listdir(temprecipe)
- if len(dirlist) < 1 or not os.path.isfile(os.path.join(temprecipe, '' % pv)):
+ if len(dirlist) > 1:
+'recipetool created more than just one file; output:\n%s\ndirlist:\n%s' % (result.output, str(dirlist)))
+ if len(dirlist) < 1 or not os.path.isfile(os.path.join(temprecipe, dirlist[0])):'recipetool did not create recipe file; output:\n%s\ndirlist:\n%s' % (result.output, str(dirlist)))
- self.assertIn('' % pv, dirlist, 'Recipe file incorrectly named')
+ self.assertEqual(dirlist[0], '' % pv, 'Recipe file incorrectly named')
checkvars = {}
checkvars['LICENSE'] = set(['Unknown', 'GPLv2'])
checkvars['LIC_FILES_CHKSUM'] = set(['file://COPYING.OpenSSL;md5=5c9bccc77f67a8328ef4ebaf468116f4', 'file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263'])