File: test_barebox.py

package info (click to toggle)
labgrid 25.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,796 kB
  • sloc: python: 21,352; sh: 846; makefile: 35
file content (14 lines) | stat: -rw-r--r-- 397 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
def test_target(target):
    barebox = target.get_driver("CommandProtocol")
    target.activate(barebox)

    stdout, stderr, returncode = barebox.run("version")
    assert returncode == 0
    assert stdout
    assert not stderr
    assert "barebox" in "\n".join(stdout)

    stdout, stderr, returncode = barebox.run("false")
    assert returncode == 1
    assert not stdout
    assert not stderr