| 1 | import pytest |
| 2 | |
| 3 | |
| 4 | def test_watchdog(command): |
| 5 | stdout, stderr, returncode = command.run("wd 1") |
| 6 | if returncode == 127: |
| 7 | pytest.skip("wd command not available") |
| 8 | assert returncode == 0 |
| 9 | assert not stderr |
| 10 | assert not stdout |
| 11 | |
| 12 | command._await_prompt() |
| 13 | |
| 14 | stdout = command.run_check("echo ${global.system.reset}") |
| 15 | assert len(stdout) == 1 |
| 16 | assert stdout[0] == "WDG" |