mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-devtest
synced 2026-01-15 10:23:32 +01:00
Fix errors reported by mypy
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
17bbc88b86
commit
25f44f3bcf
2 changed files with 8 additions and 4 deletions
|
|
@ -1,8 +1,10 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from os.path import *
|
from os.path import *
|
||||||
|
|
||||||
|
import jwutils
|
||||||
from jwutils.log import *
|
from jwutils.log import *
|
||||||
from devtest.os import misc, test, tcf, TestCase
|
from devtest.os import test, tcf, TestCase
|
||||||
|
|
||||||
class CompareCmdOutput(TestCase): # export
|
class CompareCmdOutput(TestCase): # export
|
||||||
|
|
||||||
|
|
@ -28,7 +30,7 @@ class CompareCmdOutput(TestCase): # export
|
||||||
|
|
||||||
async def _run(self, env, machine, phase):
|
async def _run(self, env, machine, phase):
|
||||||
console = test.get_console(env)
|
console = test.get_console(env)
|
||||||
ret = await misc.cmd_exec(console, self._cmd, log_act=INFO,
|
ret = await jwutils.misc.cmd_exec(console, self._cmd, log_act=INFO,
|
||||||
act_timeout=self._act_timeout, total_timeout=self._total_timeout)
|
act_timeout=self._act_timeout, total_timeout=self._total_timeout)
|
||||||
if self._cmd in ret: ret.remove(self._cmd)
|
if self._cmd in ret: ret.remove(self._cmd)
|
||||||
ret = self._filter(ret)
|
ret = self._filter(ret)
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
|
|
||||||
|
import jwutils
|
||||||
from jwutils.log import *
|
from jwutils.log import *
|
||||||
from devtest.os import TestCase, misc
|
from devtest.os import TestCase
|
||||||
from devtest.os.test import *
|
from devtest.os.test import *
|
||||||
|
|
||||||
class GrepLog(TestCase): # export
|
class GrepLog(TestCase): # export
|
||||||
|
|
@ -18,7 +20,7 @@ class GrepLog(TestCase): # export
|
||||||
rx_list = self.regex if type(self.regex) == list else [ self.regex ]
|
rx_list = self.regex if type(self.regex) == list else [ self.regex ]
|
||||||
for rx in rx_list:
|
for rx in rx_list:
|
||||||
if self.log_glob == 'journal':
|
if self.log_glob == 'journal':
|
||||||
ret = await misc.cmd_exec(console, 'journalctl -b | grep "{}"'.format(rx),
|
ret = await jwutils.misc.cmd_exec(console, 'journalctl -b | grep "{}"'.format(rx),
|
||||||
act_timeout=self.act_timeout, total_timeout=self.total_timeout)
|
act_timeout=self.act_timeout, total_timeout=self.total_timeout)
|
||||||
else:
|
else:
|
||||||
ret = await grep_log(console, rx, log_glob=self.log_glob,
|
ret = await grep_log(console, rx, log_glob=self.log_glob,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue