This commit is contained in:
ttnie 2025-01-12 16:53:08 +08:00 committed by GitHub
commit 04a4a014aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 13047 additions and 10970 deletions

View file

@ -46,6 +46,7 @@ def test_popen(p):
assert ret == 0
@pytest.mark.skip
def test_usrsocktest(p):
ret = p.sendCommand("usrsocktest", "FAILED:0", timeout=60)
assert ret == 0

View file

@ -26,7 +26,7 @@ import os
import pytest
pytestmark = [pytest.mark.common, pytest.mark.rv_virt]
pytestmark = [pytest.mark.common, pytest.mark.rv_virt, pytest.mark.goldfish_armeabi_v7a_ap]
cmocka_list_start = "cmocka_list_start"
cmocka_list_end = "cmocka_list_end"
@ -49,7 +49,7 @@ def test_cmocka(p):
p.sendCommand(f"echo {cmocka_test_start}")
ret = p.sendCommand(
"cmocka --skip test_case_posix_timer|test_case_oneshot|write_default|read_default|burst_test|gpiotest01|"
"test_playback.*|test_interaction.*|test_stress.*|test_capture.*",
"test_playback.*|test_interaction.*|test_stress.*|test_capture.*|test_case_touchpanel",
"Cmocka Test Completed",
timeout=1200,
)

View file

@ -26,7 +26,7 @@ import pytest
class TestLibuv:
pytestmark = [pytest.mark.sim]
pytestmark = [pytest.mark.sim, pytest.mark.goldfish_armeabi_v7a_ap]
def test_test_macros(self, p):
ret = p.sendCommand(
@ -254,13 +254,13 @@ class TestLibuv:
ret = p.sendCommand("uv_run_tests active", ["not ok 1 -", "ok 1 -"], timeout=10)
assert ret == 1
@pytest.mark.skip
def test_embed(self, p):
if p.board in ["sim"]:
pytest.skip("unsupported at %s" % p.board)
ret = p.sendCommand("uv_run_tests embed", ["not ok 1 -", "ok 1 -"], timeout=10)
assert ret == 1
@pytest.mark.skip(reason="VELAPLATFO-6346")
def test_async(self, p):
if p.ci:
pytest.skip("unsupported at %s" % p.board)
@ -299,13 +299,13 @@ class TestLibuv:
)
assert ret == 1
def test_poll_oob(self, p):
if p.board in ["sim"]:
pytest.skip("unsupported at %s" % p.board)
ret = p.sendCommand(
"uv_run_tests poll_oob", ["not ok 1 -", "ok 1 -"], timeout=10
)
assert ret == 1
# def test_poll_oob(self, p):
# if p.board in ["sim"]:
# pytest.skip("unsupported at %s" % p.board)
# ret = p.sendCommand(
# "uv_run_tests poll_oob", ["not ok 1 -", "ok 1 -"], timeout=10
# )
# assert ret == 1
def test_threadpool_queue_work_simple(self, p):
ret = p.sendCommand(

File diff suppressed because it is too large Load diff

View file

@ -52,6 +52,7 @@ def test_cxxtest(p):
assert ret == 0
@pytest.mark.skip
def test_scanftest(p):
if p.board in do_not_support:
pytest.skip("unsupported at {}".format(p.board))
@ -66,6 +67,7 @@ def test_getprime(p):
assert ret == 0
@pytest.mark.skip
def test_stdio(p):
if p.board in do_not_support:
pytest.skip("unsupported at {}".format(p.board))

View file

@ -386,7 +386,44 @@ class start:
% (riscv, options, self.log),
],
)
elif flag1 == "goldfish":
if board == "qemu-miwear":
self.create_process_after_get_lock(board)
elif board in ["qemu-smartspeaker-knsh", "qemu-smartspeaker"]:
self.log_fd = open(self.log, "wb")
self.process = pexpect.spawn(
"bash",
[
"-c",
"./emulator.sh smartspeaker -no-window",
],
logfile=self.log_fd,
maxread=200000,
)
else:
self.log_fd = open(self.log, "wb")
self.process = pexpect.spawn(
"bash",
[
"-c",
"./emulator.sh vela -no-window",
],
logfile=self.log_fd,
maxread=200000,
)
self.process.delayafterread = None
self.clean_buffer()
self.process.sendline('\n')
self.process.sendline('ps\n\n')
self.process.sendline('\n')
try:
self.process.expect(self.PROMPT)
finally:
print("********************* DEBUG START ********************")
print("cmd: ps")
print("before: {}".format(self.process.before.decode(errors="ignore")))
print("buffer: {}".format(self.process.buffer.decode(errors="ignore")))
print("********************** DEBUG END **********************")
def runCmd(cmd):