Skip to contentSkip to conversation

oeqa/selftest/context: ensure log directory exists

PATCH New Chen Qi 1 participant 2 messages Dec 7, 2018

lore
Share & tools
lore

Chen Qi

author
#0 lore raw

cover oeqa/selftest/context: ensure log directory exists

The following changes since commit 6f2ef620d90ab39870bb6c02183249e0e1045aeb:

oeqa/selftest/esdk: Fix typo causing test failure (2018-12-06 23:27:50 +0000)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib ChenQi/selftest_log
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/selftest_log

Chen Qi (1):
oeqa/selftest/context: ensure log directory exists

 meta/lib/oeqa/selftest/context.py | 1 +
 1 file changed, 1 insertion(+)
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH 1/1 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'

---
 meta/lib/oeqa/selftest/context.py | 1 +
 1 file changed, 1 insertion(+)
meta/lib/oeqa/selftest/context.py +1 -0
index c521290..c56e53d 100644
@@ -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)
Signature · 1 line
1.9.1