nuttx/tools/ci/testrun/script/test_example/test_example.py
vela-mib 8ff3b90742 add open posix test cases on qemu and sim on CI
Signed-off-by: vela-mib <vela-mib@xiaomi.com>
2024-03-21 18:42:47 +08:00

31 lines
622 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):
ret = p.sendCommand("pipe", "redirect_reader: Returning success", timeout=60)
assert ret == 0
def test_popen(p):
ret = p.sendCommand("popen", "Calling pclose()")
assert ret == 0
def test_usrsocktest(p):
ret = p.sendCommand("usrsocktest", "FAILED:0", timeout=60)
assert ret == 0