summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime/cases
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-06-23 12:27:51 +0100
commit14203b2cb9aa62f55cb12230ac8012b3cd995be7 (patch)
tree35c57df14760e300ea3941bedd3442f920c0f2b7 /meta/lib/oeqa/runtime/cases
parent9b251dcaffe52d32c1faf41ab57ab414fbc29722 (diff)
downloadopenembedded-core-contrib-14203b2cb9aa62f55cb12230ac8012b3cd995be7.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. 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>
Diffstat (limited to 'meta/lib/oeqa/runtime/cases')
-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 1b1474adcf..a9572c81f0 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')