From 78e4b0ff96d62f32a1c711906bb31b65bf2dcba1 Mon Sep 17 00:00:00 2001 From: Jakob Hasse Date: Mon, 4 Nov 2019 11:26:23 +0800 Subject: [PATCH] CXX: enable exceptions ESP32S2-beta Closes IDF-1039 * Enabled test cases for -fno-exceptions to S2-beta again * Added different reset tag for S2-beta --- components/cxx/test/test_cxx.cpp | 4 ++-- tools/unit-test-app/unit_test.py | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/components/cxx/test/test_cxx.cpp b/components/cxx/test/test_cxx.cpp index 8b8fdafd23..027fb6730f 100644 --- a/components/cxx/test/test_cxx.cpp +++ b/components/cxx/test/test_cxx.cpp @@ -398,14 +398,14 @@ TEST_CASE("c++ exceptions emergency pool", "[cxx] [exceptions] [ignore]") #else // !CONFIG_COMPILER_CXX_EXCEPTIONS -TEST_CASE_ESP32("std::out_of_range exception when -fno-exceptions", "[cxx][reset=abort,SW_CPU_RESET]") +TEST_CASE("std::out_of_range exception when -fno-exceptions", "[cxx][reset=abort,SW_CPU_RESET]") { std::vector v(10); v.at(20) = 42; TEST_FAIL_MESSAGE("Unreachable because we are aborted on the line above"); } -TEST_CASE_ESP32("std::bad_alloc exception when -fno-exceptions", "[cxx][reset=abort,SW_CPU_RESET]") +TEST_CASE("std::bad_alloc exception when -fno-exceptions", "[cxx][reset=abort,SW_CPU_RESET]") { std::string s = std::string(2000000000, 'a'); (void)s; diff --git a/tools/unit-test-app/unit_test.py b/tools/unit-test-app/unit_test.py index c6ed79b747..c2a41a1b8b 100755 --- a/tools/unit-test-app/unit_test.py +++ b/tools/unit-test-app/unit_test.py @@ -28,7 +28,10 @@ import ttfw_idf UT_APP_BOOT_UP_DONE = "Press ENTER to see the list of tests." -RESET_PATTERN = re.compile(r"(ets [\w]{3}\s+[\d]{1,2} [\d]{4} [\d]{2}:[\d]{2}:[\d]{2}[^()]*\([\w].*?\))") + +# matches e.g.: "rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)" +RESET_PATTERN = re.compile(r"(rst:0x[0-9a-fA-F]*\s\([\w].*?\),boot:0x[0-9a-fA-F]*\s\([\w].*?\))") + EXCEPTION_PATTERN = re.compile(r"(Guru Meditation Error: Core\s+\d panic'ed \([\w].*?\))") ABORT_PATTERN = re.compile(r"(abort\(\) was called at PC 0x[a-fA-F\d]{8} on core \d)") FINISH_PATTERN = re.compile(r"1 Tests (\d) Failures (\d) Ignored")