summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/bbtests.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/bbtests.py')
-rw-r--r--meta/lib/oeqa/selftest/cases/bbtests.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py b/meta/lib/oeqa/selftest/cases/bbtests.py
index dc423ec439..0b88316950 100644
--- a/meta/lib/oeqa/selftest/cases/bbtests.py
+++ b/meta/lib/oeqa/selftest/cases/bbtests.py
@@ -148,9 +148,6 @@ INHERIT_remove = \"report-error\"
148 self.delete_recipeinc('man-db') 148 self.delete_recipeinc('man-db')
149 self.assertEqual(result.status, 1, msg="Command succeded when it should have failed. bitbake output: %s" % result.output) 149 self.assertEqual(result.status, 1, msg="Command succeded when it should have failed. bitbake output: %s" % result.output)
150 self.assertIn('Fetcher failure: Unable to find file file://invalid anywhere. The paths that were searched were:', result.output) 150 self.assertIn('Fetcher failure: Unable to find file file://invalid anywhere. The paths that were searched were:', result.output)
151 line = self.getline(result, 'Fetcher failure for URL: \'file://invalid\'. Unable to fetch URL from any source.')
152 self.assertTrue(line and line.startswith("ERROR:"), msg = "\"invalid\" file \
153doesn't exist, yet fetcher didn't report any error. bitbake output: %s" % result.output)
154 151
155 def test_rename_downloaded_file(self): 152 def test_rename_downloaded_file(self):
156 # TODO unique dldir instead of using cleanall 153 # TODO unique dldir instead of using cleanall
@@ -160,7 +157,7 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\"
160""") 157""")
161 self.track_for_cleanup(os.path.join(self.builddir, "download-selftest")) 158 self.track_for_cleanup(os.path.join(self.builddir, "download-selftest"))
162 159
163 data = 'SRC_URI = "${GNU_MIRROR}/aspell/aspell-${PV}.tar.gz;downloadfilename=test-aspell.tar.gz"' 160 data = 'SRC_URI = "https://downloads.yoctoproject.org/mirror/sources/aspell-${PV}.tar.gz;downloadfilename=test-aspell.tar.gz"'
164 self.write_recipeinc('aspell', data) 161 self.write_recipeinc('aspell', data)
165 result = bitbake('-f -c fetch aspell', ignore_status=True) 162 result = bitbake('-f -c fetch aspell', ignore_status=True)
166 self.delete_recipeinc('aspell') 163 self.delete_recipeinc('aspell')
@@ -188,6 +185,10 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\"
188 self.assertTrue(find, "No version returned for searched recipe. bitbake output: %s" % result.output) 185 self.assertTrue(find, "No version returned for searched recipe. bitbake output: %s" % result.output)
189 186
190 def test_prefile(self): 187 def test_prefile(self):
188 # Test when the prefile does not exist
189 result = runCmd('bitbake -r conf/prefile.conf', ignore_status=True)
190 self.assertEqual(1, result.status, "bitbake didn't error and should have when a specified prefile didn't exist: %s" % result.output)
191 # Test when the prefile exists
191 preconf = os.path.join(self.builddir, 'conf/prefile.conf') 192 preconf = os.path.join(self.builddir, 'conf/prefile.conf')
192 self.track_for_cleanup(preconf) 193 self.track_for_cleanup(preconf)
193 ftools.write_file(preconf ,"TEST_PREFILE=\"prefile\"") 194 ftools.write_file(preconf ,"TEST_PREFILE=\"prefile\"")
@@ -198,6 +199,10 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\"
198 self.assertIn('localconf', result.output) 199 self.assertIn('localconf', result.output)
199 200
200 def test_postfile(self): 201 def test_postfile(self):
202 # Test when the postfile does not exist
203 result = runCmd('bitbake -R conf/postfile.conf', ignore_status=True)
204 self.assertEqual(1, result.status, "bitbake didn't error and should have when a specified postfile didn't exist: %s" % result.output)
205 # Test when the postfile exists
201 postconf = os.path.join(self.builddir, 'conf/postfile.conf') 206 postconf = os.path.join(self.builddir, 'conf/postfile.conf')
202 self.track_for_cleanup(postconf) 207 self.track_for_cleanup(postconf)
203 ftools.write_file(postconf , "TEST_POSTFILE=\"postfile\"") 208 ftools.write_file(postconf , "TEST_POSTFILE=\"postfile\"")