summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2018-12-07 14:43:07 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-08 00:12:34 +0000
commit6c41de48db76087fee596d9440d8f05346ab1094 (patch)
tree68da9a1120152ddb3d3f95a5c55e2b2b9bb88c72
parent208dadb8f1864aca88c69766f3bfb37a2ef4953c (diff)
downloadopenembedded-core-contrib-6c41de48db76087fee596d9440d8f05346ab1094.tar.gz
openembedded-core-contrib-6c41de48db76087fee596d9440d8f05346ab1094.tar.bz2
openembedded-core-contrib-6c41de48db76087fee596d9440d8f05346ab1094.zip
oeqa/selftest/context: ensure log directory exists
Ensure log directory exists to avoid the following error. FileNotFoundError: [Errno 2] No such file or directory: '/.../build-selftest/tmp/log/oe-selftest-results-20181207043431.log' Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oeqa/selftest/context.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/context.py b/meta/lib/oeqa/selftest/context.py
index c521290327..c56e53dcdd 100644
--- a/meta/lib/oeqa/selftest/context.py
+++ b/meta/lib/oeqa/selftest/context.py
@@ -108,6 +108,7 @@ class OESelftestTestContextExecutor(OETestContextExecutor):
logdir = os.environ.get("BUILDDIR")
if 'LOG_DIR' in bbvars:
logdir = bbvars['LOG_DIR']
+ bb.utils.mkdirhier(logdir)
args.output_log = logdir + '/%s-results-%s.log' % (self.name, args.test_start_time)
super(OESelftestTestContextExecutor, self)._process_args(logger, args)