change(system): enabled pthread, ringbuf and event tests

This commit is contained in:
Marius Vikhammer 2023-12-20 12:01:44 +08:00
parent 1606d60c07
commit 8fe0f99368
5 changed files with 8 additions and 24 deletions

View File

@ -14,24 +14,10 @@ def test_esp_event(dut: Dut) -> None:
@pytest.mark.esp32
@pytest.mark.host_test
@pytest.mark.qemu
@pytest.mark.parametrize('qemu_extra_args', [
'-global driver=timer.esp32.timg,property=wdt_disable,value=true',
], indirect=True) # need to disable wdt since it is not synchronized with target cpu clock on QEMU for ESP32
def test_esp_event_qemu_esp32(dut: Dut) -> None:
for case in dut.test_menu:
if 'qemu-ignore' not in case.groups and not case.is_ignored and case.type == 'normal':
dut._run_normal_case(case)
@pytest.mark.esp32c3
@pytest.mark.host_test
@pytest.mark.qemu
@pytest.mark.parametrize('qemu_extra_args', [
'-icount 3',
], indirect=True) # need to add -icount 3 to make WDT accurate on QEMU for ESP32-C3
def test_esp_event_qemu_esp32c3(dut: Dut) -> None:
def test_esp_event_qemu(dut: Dut) -> None:
for case in dut.test_menu:
if 'qemu-ignore' not in case.groups and not case.is_ignored and case.type == 'normal':
dut._run_normal_case(case)

View File

@ -0,0 +1,3 @@
# This "default" configuration is appended to all other configurations
# The contents of "sdkconfig.debug_helpers" is also appended to all other configurations (see CMakeLists.txt)
CONFIG_ESP_TASK_WDT_INIT=n

View File

@ -2,7 +2,7 @@
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.16)
list(PREPEND SDKCONFIG_DEFAULTS "$ENV{IDF_PATH}/tools/test_apps/configs/sdkconfig.debug_helpers")
list(PREPEND SDKCONFIG_DEFAULTS "$ENV{IDF_PATH}/tools/test_apps/configs/sdkconfig.debug_helpers" "sdkconfig.defaults")
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
set(COMPONENTS main)

View File

@ -72,8 +72,7 @@ static void thread_main()
}
}
// IDF-6423 - assert and crash when running this testcase on QEMU
TEST_CASE("pthread C++", "[pthread][qemu-ignore]")
TEST_CASE("pthread C++", "[pthread]")
{
global_sp_mtx.reset(new int(1));
global_sp_recur_mtx.reset(new int(-1000));

View File

@ -45,9 +45,7 @@ def test_pthread_single_core(dut: Dut) -> None:
indirect=True,
)
def test_pthread_tls(dut: Dut) -> None:
dut.expect_exact('Press ENTER to see the list of tests')
dut.write('[thread-specific]')
dut.expect_unity_test_output(timeout=300)
dut.run_all_single_board_cases(group='thread-specific', timeout=300)
@pytest.mark.generic
@ -59,9 +57,7 @@ def test_pthread_tls(dut: Dut) -> None:
indirect=True,
)
def test_pthread_single_core_tls(dut: Dut) -> None:
dut.expect_exact('Press ENTER to see the list of tests')
dut.write('[thread-specific]')
dut.expect_unity_test_output(timeout=300)
dut.run_all_single_board_cases(group='thread-specific', timeout=300)
@pytest.mark.host_test