From a463e80d4341e1898e2b87cf0363c9b47df48e72 Mon Sep 17 00:00:00 2001 From: David Cermak Date: Thu, 2 Apr 2020 17:50:35 +0200 Subject: [PATCH 1/2] ci: fix ttfw ignoring test failure if exception in print_debug_info --- tools/ci/python_packages/tiny_test_fw/Env.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/ci/python_packages/tiny_test_fw/Env.py b/tools/ci/python_packages/tiny_test_fw/Env.py index ac30833c86..d54535351e 100644 --- a/tools/ci/python_packages/tiny_test_fw/Env.py +++ b/tools/ci/python_packages/tiny_test_fw/Env.py @@ -185,9 +185,9 @@ class Env(object): dut_close_errors = [] for dut_name in self.allocated_duts: dut = self.allocated_duts[dut_name]["dut"] - if dut_debug: - dut.print_debug_info() try: + if dut_debug: + dut.print_debug_info() dut.close() except Exception as e: dut_close_errors.append(e) From e57dbf7c27c29c7c000f9fcaa33a75c30f056df1 Mon Sep 17 00:00:00 2001 From: David Cermak Date: Sun, 5 Apr 2020 20:06:28 +0200 Subject: [PATCH 2/2] http-server-example: correction of regex waiting to acquire IP address Since the recent refactoring of spi bus_lock comonent introduced heavy logging under debug/verbose level of verbosity, the http-server test executed in the CI became less stable due to complicated regex. Fixed by removing the first optional group --- .../http_server/ws_echo_server/ws_server_example_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/protocols/http_server/ws_echo_server/ws_server_example_test.py b/examples/protocols/http_server/ws_echo_server/ws_server_example_test.py index f7d8ad26f7..3dd77b4697 100644 --- a/examples/protocols/http_server/ws_echo_server/ws_server_example_test.py +++ b/examples/protocols/http_server/ws_echo_server/ws_server_example_test.py @@ -114,8 +114,8 @@ def test_examples_protocol_http_ws_echo_server(env, extra_data): # Parse IP address of STA Utility.console_log("Waiting to connect with AP") - got_ip = dut1.expect(re.compile(r"(?:[\s\S]*)IPv4 address: (\d+.\d+.\d+.\d+)"), timeout=60)[0] - got_port = dut1.expect(re.compile(r"(?:[\s\S]*)Starting server on port: '(\d+)'"), timeout=60)[0] + got_ip = dut1.expect(re.compile(r"IPv4 address: (\d+.\d+.\d+.\d+)"), timeout=60)[0] + got_port = dut1.expect(re.compile(r"Starting server on port: '(\d+)'"), timeout=60)[0] Utility.console_log("Got IP : " + got_ip) Utility.console_log("Got Port : " + got_port)