summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest
diff options
context:
space:
mode:
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>2018-02-12 13:05:19 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-02-24 10:31:45 +0000
commit6bb3595ec58db98f94b95b332adb7582f9c34929 (patch)
treee2bff6fdad6a90e0f8abdf276dcd4c6b9423ba57 /meta/lib/oeqa/selftest
parentd9046f8fd88108b006bf0615d56a826552b986a2 (diff)
downloadpoky-6bb3595ec58db98f94b95b332adb7582f9c34929.tar.gz
oe-selftest: fix tests to reflect man->man-db transition
Rather than apply a patch twice, an incorrect patch is applied (as the new man-db recipe does not have any patches yet). (From OE-Core rev: a8bf4da183824caa5fceaf7546db52daa05f8662) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest')
-rw-r--r--meta/lib/oeqa/selftest/cases/bbtests.py29
1 files changed, 14 insertions, 15 deletions
diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py b/meta/lib/oeqa/selftest/cases/bbtests.py
index 4c82049032..350614967c 100644
--- a/meta/lib/oeqa/selftest/cases/bbtests.py
+++ b/meta/lib/oeqa/selftest/cases/bbtests.py
@@ -64,15 +64,14 @@ class BitbakeTests(OESelftestTestCase):
64 64
65 @OETestID(108) 65 @OETestID(108)
66 def test_invalid_patch(self): 66 def test_invalid_patch(self):
67 # This patch already exists in SRC_URI so adding it again will cause the 67 # This patch should fail to apply.
68 # patch to fail. 68 self.write_recipeinc('man-db', 'FILESEXTRAPATHS_prepend := "${THISDIR}/files:"\nSRC_URI += "file://0001-Test-patch-here.patch"')
69 self.write_recipeinc('man', 'SRC_URI += "file://man-1.5h1-make.patch"')
70 self.write_config("INHERIT_remove = \"report-error\"") 69 self.write_config("INHERIT_remove = \"report-error\"")
71 result = bitbake('man -c patch', ignore_status=True) 70 result = bitbake('man-db -c patch', ignore_status=True)
72 self.delete_recipeinc('man') 71 self.delete_recipeinc('man-db')
73 bitbake('-cclean man') 72 bitbake('-cclean man-db')
74 line = self.getline(result, "Function failed: patch_do_patch") 73 line = self.getline(result, "Function failed: patch_do_patch")
75 self.assertTrue(line and line.startswith("ERROR:"), msg = "Repeated patch application didn't fail. bitbake output: %s" % result.output) 74 self.assertTrue(line and line.startswith("ERROR:"), msg = "Incorrectly formed patch application didn't fail. bitbake output: %s" % result.output)
76 75
77 @OETestID(1354) 76 @OETestID(1354)
78 def test_force_task_1(self): 77 def test_force_task_1(self):
@@ -132,17 +131,17 @@ class BitbakeTests(OESelftestTestCase):
132 @OETestID(168) 131 @OETestID(168)
133 def test_invalid_recipe_src_uri(self): 132 def test_invalid_recipe_src_uri(self):
134 data = 'SRC_URI = "file://invalid"' 133 data = 'SRC_URI = "file://invalid"'
135 self.write_recipeinc('man', data) 134 self.write_recipeinc('man-db', data)
136 self.write_config("""DL_DIR = \"${TOPDIR}/download-selftest\" 135 self.write_config("""DL_DIR = \"${TOPDIR}/download-selftest\"
137SSTATE_DIR = \"${TOPDIR}/download-selftest\" 136SSTATE_DIR = \"${TOPDIR}/download-selftest\"
138INHERIT_remove = \"report-error\" 137INHERIT_remove = \"report-error\"
139""") 138""")
140 self.track_for_cleanup(os.path.join(self.builddir, "download-selftest")) 139 self.track_for_cleanup(os.path.join(self.builddir, "download-selftest"))
141 140
142 bitbake('-ccleanall man') 141 bitbake('-ccleanall man-db')
143 result = bitbake('-c fetch man', ignore_status=True) 142 result = bitbake('-c fetch man-db', ignore_status=True)
144 bitbake('-ccleanall man') 143 bitbake('-ccleanall man-db')
145 self.delete_recipeinc('man') 144 self.delete_recipeinc('man-db')
146 self.assertEqual(result.status, 1, msg="Command succeded when it should have failed. bitbake output: %s" % result.output) 145 self.assertEqual(result.status, 1, msg="Command succeded when it should have failed. bitbake output: %s" % result.output)
147 self.assertTrue('Fetcher failure: Unable to find file file://invalid anywhere. The paths that were searched were:' in result.output, msg = "\"invalid\" file \ 146 self.assertTrue('Fetcher failure: Unable to find file file://invalid anywhere. The paths that were searched were:' in result.output, msg = "\"invalid\" file \
148doesn't exist, yet no error message encountered. bitbake output: %s" % result.output) 147doesn't exist, yet no error message encountered. bitbake output: %s" % result.output)
@@ -222,9 +221,9 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\"
222INHERIT_remove = \"report-error\" 221INHERIT_remove = \"report-error\"
223""") 222""")
224 self.track_for_cleanup(os.path.join(self.builddir, "download-selftest")) 223 self.track_for_cleanup(os.path.join(self.builddir, "download-selftest"))
225 self.write_recipeinc('man',"\ndo_fail_task () {\nexit 1 \n}\n\naddtask do_fail_task before do_fetch\n" ) 224 self.write_recipeinc('man-db',"\ndo_fail_task () {\nexit 1 \n}\n\naddtask do_fail_task before do_fetch\n" )
226 runCmd('bitbake -c cleanall man xcursor-transparent-theme') 225 runCmd('bitbake -c cleanall man-db xcursor-transparent-theme')
227 result = runCmd('bitbake -c unpack -k man xcursor-transparent-theme', ignore_status=True) 226 result = runCmd('bitbake -c unpack -k man-db xcursor-transparent-theme', ignore_status=True)
228 errorpos = result.output.find('ERROR: Function failed: do_fail_task') 227 errorpos = result.output.find('ERROR: Function failed: do_fail_task')
229 manver = re.search("NOTE: recipe xcursor-transparent-theme-(.*?): task do_unpack: Started", result.output) 228 manver = re.search("NOTE: recipe xcursor-transparent-theme-(.*?): task do_unpack: Started", result.output)
230 continuepos = result.output.find('NOTE: recipe xcursor-transparent-theme-%s: task do_unpack: Started' % manver.group(1)) 229 continuepos = result.output.find('NOTE: recipe xcursor-transparent-theme-%s: task do_unpack: Started' % manver.group(1))