summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorAndrej Valek <andrej.valek@siemens.com>2020-06-22 19:33:07 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-07-02 16:12:36 +0100
commitc330f617044953bbcdb3b23b0770904ede4d1302 (patch)
tree9958b6a582f35d708e589e4a31dd72c174482d34 /meta/lib
parent4d1b2cecef15a88e1b861c37c4d8bacf59805c47 (diff)
downloadpoky-c330f617044953bbcdb3b23b0770904ede4d1302.tar.gz
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 <andrej.valek@siemens.com> Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 14203b2cb9aa62f55cb12230ac8012b3cd995be7) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/runtime/cases/ptest.py4
1 files changed, 4 insertions, 0 deletions
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):
42 # testdata.json is generated. 42 # testdata.json is generated.
43 if not test_log_dir: 43 if not test_log_dir:
44 test_log_dir = os.path.join(self.td.get('WORKDIR', ''), 'testimage') 44 test_log_dir = os.path.join(self.td.get('WORKDIR', ''), 'testimage')
45 # Make the test output path absolute, otherwise the output content will be
46 # created relative to current directory
47 if not os.path.isabs(test_log_dir):
48 test_log_dir = os.path.join(self.td.get('TOPDIR', ''), test_log_dir)
45 # Don't use self.td.get('DATETIME'), it's from testdata.json, not 49 # Don't use self.td.get('DATETIME'), it's from testdata.json, not
46 # up-to-date, and may cause "File exists" when re-reun. 50 # up-to-date, and may cause "File exists" when re-reun.
47 timestamp = datetime.datetime.now().strftime('%Y%m%d%H%M%S') 51 timestamp = datetime.datetime.now().strftime('%Y%m%d%H%M%S')