Explorar o código

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'

(From OE-Core rev: c54411d0e03fe1cea8b6bb0c80dea029dd264f36)

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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Chen Qi %!s(int64=6) %!d(string=hai) anos
pai
achega
70f57755d7
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      meta/lib/oeqa/selftest/context.py

+ 1 - 0
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)