]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/selftest/context: ensure log directory exists
authorChen Qi <Qi.Chen@windriver.com>
Fri, 7 Dec 2018 06:43:07 +0000 (14:43 +0800)
committerArmin Kuster <akuster808@gmail.com>
Thu, 3 Oct 2019 15:03:52 +0000 (08:03 -0700)
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>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
meta/lib/oeqa/selftest/context.py

index c5212903276be647a8853350c9fb6b2fe9f5e240..c56e53dcdd34d3d2363b419957cddde23b48454b 100644 (file)
@@ -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)