Exemple #1
0
 def test_create(self):
     t = Target('dummy')
     cp = FakeConsoleDriver(t, "console")
     d = BareboxDriver(t, "barebox")
     assert (isinstance(d, BareboxDriver))
     assert (isinstance(d, CommandProtocol))
     assert (isinstance(d, LinuxBootProtocol))
Exemple #2
0
def test_create_barebox(target):
    console = FakeConsoleDriver(target, "console")
    power = FakePowerDriver(target, "power")
    barebox = BareboxDriver(target, "barebox")
    shell = ShellDriver(target, "shell", prompt='root@dummy', login_prompt='login:'******'root')
    s = BareboxStrategy(target, "strategy")

    assert isinstance(s, Strategy)
    assert target.get_driver(BareboxStrategy) is s
    assert target.get_driver(Strategy) is s

    assert s.state is BindingState.bound
Exemple #3
0
def test_create_uboot(target):
    console = FakeConsoleDriver(target)
    power = FakePowerDriver(target)
    barebox = UBootDriver(target)
    shell = ShellDriver(target,
                        prompt='root@dummy',
                        login_prompt='login:'******'root')
    s = UBootStrategy(target)

    assert isinstance(s, Strategy)
    assert target.get_driver(UBootStrategy) is s
    assert target.get_driver(Strategy) is s

    assert s.state is BindingState.bound
Exemple #4
0
def target_with_fakeconsole():
    t = Target('dummy')
    cp = FakeConsoleDriver(t, "console")
    return t