mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-devtest
synced 2026-01-15 02:22:56 +01:00
21 lines
736 B
Python
21 lines
736 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
from devtest.os import TestCase
|
|
from devtest.os.test import *
|
|
|
|
class Eth1(TestCase): # export
|
|
|
|
def __init__(self, regex = None, act_timeout=30, total_timeout=None):
|
|
self.regex = regex
|
|
self.act_timeout = act_timeout
|
|
self.total_timeout = total_timeout
|
|
|
|
async def _run(self, env, machine, phase):
|
|
console = get_console(env)
|
|
regex = self.regex
|
|
if regex is None:
|
|
regex = "Searching for eth1 driver: found"
|
|
if await expect(console, regex=regex, subject="load eth1 driver",
|
|
act_timeout=self.act_timeout, total_timeout=self.total_timeout) is None:
|
|
return "timed out waiting for set eth1 driver"
|
|
return None
|