File: test_watchdog.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 (16 lines) | stat: -rw-r--r-- 392 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import pytest


def test_watchdog(command):
    stdout, stderr, returncode = command.run("wd 1")
    if returncode == 127:
        pytest.skip("wd command not available")
    assert returncode == 0
    assert not stderr
    assert not stdout

    command._await_prompt()

    stdout = command.run_check("echo ${global.system.reset}")
    assert len(stdout) == 1
    assert stdout[0] == "WDG"