forked from espressif/esp-idf
Merge branch 'fix/protocol_example_tests' into 'master'
Fix/protocol example tests See merge request espressif/esp-idf!18698
This commit is contained in:
@@ -51,7 +51,7 @@ def test_examples_esp_local_ctrl(dut: Dut) -> None:
|
|||||||
dut.expect('control: esp_local_ctrl service started with name : my_esp_ctrl_device')
|
dut.expect('control: esp_local_ctrl service started with name : my_esp_ctrl_device')
|
||||||
|
|
||||||
def dut_expect_read() -> None:
|
def dut_expect_read() -> None:
|
||||||
dut.expect_exact('control: Reading property : timestamp (us)')
|
dut.expect_exact('control: Reading property : timestamp (us)', timeout=20)
|
||||||
dut.expect_exact('control: Reading property : property1')
|
dut.expect_exact('control: Reading property : property1')
|
||||||
dut.expect_exact('control: Reading property : property2')
|
dut.expect_exact('control: Reading property : property2')
|
||||||
dut.expect_exact('control: Reading property : property3')
|
dut.expect_exact('control: Reading property : property3')
|
||||||
|
@@ -65,4 +65,4 @@ def test_examples_security_flash_encryption(dut: Dut) -> None:
|
|||||||
'NVS partition "custom_nvs" is encrypted.'
|
'NVS partition "custom_nvs" is encrypted.'
|
||||||
]
|
]
|
||||||
for line in lines:
|
for line in lines:
|
||||||
dut.expect(line, timeout=2)
|
dut.expect(line, timeout=20)
|
||||||
|
@@ -6,6 +6,7 @@
|
|||||||
from __future__ import print_function, unicode_literals
|
from __future__ import print_function, unicode_literals
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
import errno
|
||||||
import http.client
|
import http.client
|
||||||
import logging
|
import logging
|
||||||
from builtins import str
|
from builtins import str
|
||||||
@@ -146,6 +147,11 @@ def test_put_handler(ip, port, verbosity=False):
|
|||||||
except http.client.HTTPException:
|
except http.client.HTTPException:
|
||||||
# Catch socket error as we tried to communicate with an already closed socket
|
# Catch socket error as we tried to communicate with an already closed socket
|
||||||
pass
|
pass
|
||||||
|
except IOError as err:
|
||||||
|
if err.errno == errno.EPIPE:
|
||||||
|
# Sometimes Broken Pipe error is returned
|
||||||
|
# when sending data to a closed socket
|
||||||
|
pass
|
||||||
|
|
||||||
except http.client.HTTPException:
|
except http.client.HTTPException:
|
||||||
verbose_print(verbosity, 'Socket closed by server')
|
verbose_print(verbosity, 'Socket closed by server')
|
||||||
|
Reference in New Issue
Block a user