summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/tests/fetch.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/tests/fetch.py')
-rw-r--r--bitbake/lib/bb/tests/fetch.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py
index d7c73dda02..0fd2c02163 100644
--- a/bitbake/lib/bb/tests/fetch.py
+++ b/bitbake/lib/bb/tests/fetch.py
@@ -508,6 +508,15 @@ class FetcherLocalTest(FetcherTest):
508 tree = self.fetchUnpack(['file://dir/subdir/e;subdir=bar']) 508 tree = self.fetchUnpack(['file://dir/subdir/e;subdir=bar'])
509 self.assertEqual(tree, ['bar/dir/subdir/e']) 509 self.assertEqual(tree, ['bar/dir/subdir/e'])
510 510
511 def test_local_absolutedir(self):
512 # Unpacking to an absolute path that is a subdirectory of the root
513 # should work
514 tree = self.fetchUnpack(['file://a;subdir=%s' % os.path.join(self.unpackdir, 'bar')])
515
516 # Unpacking to an absolute path outside of the root should fail
517 with self.assertRaises(bb.fetch2.UnpackError):
518 self.fetchUnpack(['file://a;subdir=/bin/sh'])
519
511class FetcherNetworkTest(FetcherTest): 520class FetcherNetworkTest(FetcherTest):
512 521
513 if os.environ.get("BB_SKIP_NETTESTS") == "yes": 522 if os.environ.get("BB_SKIP_NETTESTS") == "yes":