diff options
author | Paulo Neves <ptsneves@gmail.com> | 2022-07-08 22:54:07 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-07-15 12:22:08 +0100 |
commit | 9b398909bd446c32923e80125c4555463f87fa8e (patch) | |
tree | e3af178fec3ebddd99f83365ef50137e3175bea4 /bitbake/lib/bb/tests/fetch.py | |
parent | 43fa40ba51741fc9663680901346f8f64b534ff5 (diff) | |
download | poky-9b398909bd446c32923e80125c4555463f87fa8e.tar.gz |
bitbake: fetch: bb.fatal when trying to checksum non-existing files
If the local fetcher was not able to find the file anywhere but it
was included in the SRC_URI for checksumming just make it a fatal
error. Ensure a list of searched locations is included too to match
the runtime error that would have resulted.
(Bitbake rev: 5e3b2ad90d9cd0f248b1cb740637caa24442d101)
Signed-off-by: Paulo Neves <ptsneves@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/tests/fetch.py')
-rw-r--r-- | bitbake/lib/bb/tests/fetch.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py index ee41bff43e..20d7953f35 100644 --- a/bitbake/lib/bb/tests/fetch.py +++ b/bitbake/lib/bb/tests/fetch.py | |||
@@ -693,6 +693,11 @@ class FetcherLocalTest(FetcherTest): | |||
693 | flst.sort() | 693 | flst.sort() |
694 | return flst | 694 | return flst |
695 | 695 | ||
696 | def test_local_checksum_fails_no_file(self): | ||
697 | self.d.setVar("SRC_URI", "file://404") | ||
698 | with self.assertRaises(bb.BBHandledException): | ||
699 | bb.fetch.get_checksum_file_list(self.d) | ||
700 | |||
696 | def test_local(self): | 701 | def test_local(self): |
697 | tree = self.fetchUnpack(['file://a', 'file://dir/c']) | 702 | tree = self.fetchUnpack(['file://a', 'file://dir/c']) |
698 | self.assertEqual(tree, ['a', 'dir/c']) | 703 | self.assertEqual(tree, ['a', 'dir/c']) |