From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail5.wrs.com (mail5.windriver.com [192.103.53.11]) by mail.openembedded.org (Postfix) with ESMTP id CA89F78D34 for ; Tue, 25 Sep 2018 15:07:47 +0000 (UTC) Received: from ALA-HCB.corp.ad.wrs.com (ala-hcb.corp.ad.wrs.com [147.11.189.41]) by mail5.wrs.com (8.15.2/8.15.2) with ESMTPS id w8PF7MlD022724 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL) for ; Tue, 25 Sep 2018 08:07:38 -0700 Received: from msp-lpggp1.wrs.com (172.25.34.110) by ALA-HCB.corp.ad.wrs.com (147.11.189.41) with Microsoft SMTP Server id 14.3.408.0; Tue, 25 Sep 2018 08:07:32 -0700 From: Mark Hatle To: Date: Tue, 25 Sep 2018 11:07:07 -0400 Message-ID: <20180925150708.2983-3-mark.hatle@windriver.com> X-Mailer: git-send-email 2.16.0.rc2 In-Reply-To: <20180925150708.2983-1-mark.hatle@windriver.com> References: <20180925150708.2983-1-mark.hatle@windriver.com> MIME-Version: 1.0 Subject: [PATCH 2/3] lib/layerindexlib/tests/cooker.py: Fix topdir to use an absolute (real) path X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussion that advance bitbake development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Sep 2018 15:07:47 -0000 Content-Type: text/plain 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. Signed-off-by: Mark Hatle --- lib/layerindexlib/tests/cooker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/layerindexlib/tests/cooker.py b/lib/layerindexlib/tests/cooker.py index 9ce6e8c..46d006b 100644 --- a/lib/layerindexlib/tests/cooker.py +++ b/lib/layerindexlib/tests/cooker.py @@ -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 = 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) -- 1.8.3.1