nuttx/tools/ci/testrun/script/test_example/test_example.py
Tomasz 'CeDeROM' CEDRO 833f7a5a3e Updated python scripts interpreter invocation in tools/.
* Using call to portable `#!/usr/bin/env python3` syntax.
* Updated python interpreter call in `tools/ci/testrun` (please verify).

Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
2023-02-19 14:15:27 +08:00

34 lines
704 B
Python

#!/usr/bin/env python3
# encoding: utf-8
import pytest
pytestmark = [pytest.mark.common, pytest.mark.qemu]
def test_hello(p):
ret = p.sendCommand("hello", "Hello, World!!")
assert ret == 0
def test_helloxx(p):
ret = p.sendCommand("helloxx", "Hello, World!!")
assert ret == 0
def test_pipe(p):
p.sendCommand("umount /tmp")
ret = p.sendCommand("pipe", "redirect_reader: Returning success", 60)
assert ret == 0
p.sendCommand("\n")
p.sendCommand("mount -t tmpfs /tmp")
def test_popen(p):
ret = p.sendCommand("popen", "Calling pclose()")
assert ret == 0
def test_usrsocktest(p):
ret = p.sendCommand("usrsocktest", "FAILED:0", 60)
assert ret == 0