From c330f617044953bbcdb3b23b0770904ede4d1302 Mon Sep 17 00:00:00 2001 From: Andrej Valek Date: Mon, 22 Jun 2020 19:33:07 +0200 Subject: oeqa/runtime/cases/ptest: Make output content path absolute The output content is created in current directory, because json content has no defined absolute path to WORKDIR as in bitbake. (From OE-Core rev: 394d90efdc8d06dc61114bf6279ba6d094667289) Signed-off-by: Andrej Valek Signed-off-by: Peter Marko Signed-off-by: Richard Purdie (cherry picked from commit 14203b2cb9aa62f55cb12230ac8012b3cd995be7) Signed-off-by: Steve Sakoman Signed-off-by: Richard Purdie --- meta/lib/oeqa/runtime/cases/ptest.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'meta/lib') diff --git a/meta/lib/oeqa/runtime/cases/ptest.py b/meta/lib/oeqa/runtime/cases/ptest.py index 99a44f0767..ef0470da7e 100644 --- a/meta/lib/oeqa/runtime/cases/ptest.py +++ b/meta/lib/oeqa/runtime/cases/ptest.py @@ -42,6 +42,10 @@ class PtestRunnerTest(OERuntimeTestCase): # testdata.json is generated. if not test_log_dir: test_log_dir = os.path.join(self.td.get('WORKDIR', ''), 'testimage') + # Make the test output path absolute, otherwise the output content will be + # created relative to current directory + if not os.path.isabs(test_log_dir): + test_log_dir = os.path.join(self.td.get('TOPDIR', ''), test_log_dir) # Don't use self.td.get('DATETIME'), it's from testdata.json, not # up-to-date, and may cause "File exists" when re-reun. timestamp = datetime.datetime.now().strftime('%Y%m%d%H%M%S') -- cgit v1.2.3-54-g00ecf