]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: lib/layerindexlib/tests/cooker.py: Fix topdir to use an absolute (real)...
authorMark Hatle <mark.hatle@windriver.com>
Tue, 25 Sep 2018 15:15:52 +0000 (11:15 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 26 Sep 2018 14:14:33 +0000 (15:14 +0100)
The test case needs to access test case files.  Different versions of python
may return absolute or relative locations in __file__.  Use the same approach
as other test cases in determining the location of the test files.

(Bitbake rev: 80fe44889a858bddaca230c2d49ccabfcbc236a3)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/layerindexlib/tests/cooker.py

index 9ce6e8c3aebbaae9d01df5862494484ed68bec98..fdbf0911030e600a2500f50d4f00cabdd1446ebc 100644 (file)
@@ -32,7 +32,7 @@ class LayerIndexCookerTest(LayersTest):
         # configure the test data.  But we can emulate the basics of the layer.conf
         # files, so that is what we will do.
 
-        new_topdir = os.path.join(os.path.dirname(__file__), "testdata")
+        new_topdir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "testdata")
         new_bbpath = os.path.join(new_topdir, "build")
 
         self.d.setVar('TOPDIR', new_topdir)