From 8e4e03c2a32a6fff6e07f01ed36481e6e7ee0b4a Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 24 Sep 2014 14:16:52 +0000 Subject: bitbake: fetch: Extend testing of subdir unpack parameter and fix This fixes urls of the form file://some/path/file;subdir=b. It also adds in a couple of tests so we now tests these corner cases. (Bitbake rev: 46306912a96444790efa9418d934dfdd36773ba1) Signed-off-by: Richard Purdie --- bitbake/lib/bb/tests/fetch.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bitbake/lib/bb/tests/fetch.py') diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py index 7df7a0ef51..d95b43a5e3 100644 --- a/bitbake/lib/bb/tests/fetch.py +++ b/bitbake/lib/bb/tests/fetch.py @@ -444,6 +444,13 @@ class FetcherLocalTest(FetcherTest): tree = self.fetchUnpack(['file://dir/subdir/e']) self.assertEqual(tree, ['dir/subdir/e']) + def test_local_subdirparam(self): + tree = self.fetchUnpack(['file://a;subdir=bar']) + self.assertEqual(tree, ['bar/a']) + + def test_local_deepsubdirparam(self): + tree = self.fetchUnpack(['file://dir/subdir/e;subdir=bar']) + self.assertEqual(tree, ['bar/dir/subdir/e']) class FetcherNetworkTest(FetcherTest): -- cgit v1.2.3-54-g00ecf