mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/ota_tests_python3' into 'master'
ota: Fix UnicodeDecodeError in example_tests See merge request espressif/esp-idf!10746
This commit is contained in:
commit
d5929bd737
@ -234,8 +234,8 @@ def test_examples_protocol_advanced_https_ota_example_truncated_bin(env, extra_d
|
||||
truncated_bin_size = 64000
|
||||
# check and log bin size
|
||||
binary_file = os.path.join(dut1.app.binary_path, bin_name)
|
||||
f = open(binary_file, "r+")
|
||||
fo = open(os.path.join(dut1.app.binary_path, truncated_bin_name), "w+")
|
||||
f = open(binary_file, "rb+")
|
||||
fo = open(os.path.join(dut1.app.binary_path, truncated_bin_name), "wb+")
|
||||
fo.write(f.read(truncated_bin_size))
|
||||
fo.close()
|
||||
f.close()
|
||||
@ -285,8 +285,8 @@ def test_examples_protocol_advanced_https_ota_example_truncated_header(env, extr
|
||||
truncated_bin_size = 180
|
||||
# check and log bin size
|
||||
binary_file = os.path.join(dut1.app.binary_path, bin_name)
|
||||
f = open(binary_file, "r+")
|
||||
fo = open(os.path.join(dut1.app.binary_path, truncated_bin_name), "w+")
|
||||
f = open(binary_file, "rb+")
|
||||
fo = open(os.path.join(dut1.app.binary_path, truncated_bin_name), "wb+")
|
||||
fo.write(f.read(truncated_bin_size))
|
||||
fo.close()
|
||||
f.close()
|
||||
|
@ -201,8 +201,8 @@ def test_examples_protocol_native_ota_example_truncated_bin(env, extra_data):
|
||||
truncated_bin_size = 64000
|
||||
# check and log bin size
|
||||
binary_file = os.path.join(dut1.app.binary_path, bin_name)
|
||||
f = open(binary_file, "r+")
|
||||
fo = open(os.path.join(dut1.app.binary_path, truncated_bin_name), "w+")
|
||||
f = open(binary_file, "rb+")
|
||||
fo = open(os.path.join(dut1.app.binary_path, truncated_bin_name), "wb+")
|
||||
fo.write(f.read(truncated_bin_size))
|
||||
fo.close()
|
||||
f.close()
|
||||
@ -252,8 +252,8 @@ def test_examples_protocol_native_ota_example_truncated_header(env, extra_data):
|
||||
truncated_bin_size = 180
|
||||
# check and log bin size
|
||||
binary_file = os.path.join(dut1.app.binary_path, bin_name)
|
||||
f = open(binary_file, "r+")
|
||||
fo = open(os.path.join(dut1.app.binary_path, truncated_bin_name), "w+")
|
||||
f = open(binary_file, "rb+")
|
||||
fo = open(os.path.join(dut1.app.binary_path, truncated_bin_name), "wb+")
|
||||
fo.write(f.read(truncated_bin_size))
|
||||
fo.close()
|
||||
f.close()
|
||||
|
Loading…
Reference in New Issue
Block a user