aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/tests/fetch.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-09-24 14:16:52 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-09-29 12:07:47 +0100
commit46306912a96444790efa9418d934dfdd36773ba1 (patch)
tree6155aa4d524f42c4ff237a799558ffbc593f36e1 /lib/bb/tests/fetch.py
parent836a986b365eb9798563ec08d90b346596de7791 (diff)
downloadbitbake-contrib-46306912a96444790efa9418d934dfdd36773ba1.tar.gz
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/tests/fetch.py')
-rw-r--r--lib/bb/tests/fetch.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/bb/tests/fetch.py b/lib/bb/tests/fetch.py
index 7df7a0ef5..d95b43a5e 100644
--- a/lib/bb/tests/fetch.py
+++ b/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):