mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 12:10:59 +00:00
ci: all jobs use python3 by default
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import re
|
||||
import os
|
||||
import struct
|
||||
import socket
|
||||
import http.server
|
||||
from threading import Thread
|
||||
@@ -334,12 +335,12 @@ def test_examples_protocol_advanced_https_ota_example_random(env, extra_data):
|
||||
random_bin_size = 32000
|
||||
# check and log bin size
|
||||
binary_file = os.path.join(dut1.app.binary_path, random_bin_name)
|
||||
fo = open(binary_file, "w+")
|
||||
fo = open(binary_file, "wb+")
|
||||
# First byte of binary file is always set to zero. If first byte is generated randomly,
|
||||
# in some cases it may generate 0xE9 which will result in failure of testcase.
|
||||
fo.write(str(0))
|
||||
fo.write(struct.pack("B", 0))
|
||||
for i in range(random_bin_size - 1):
|
||||
fo.write(str(random.randrange(0,255,1)))
|
||||
fo.write(struct.pack("B", random.randrange(0,255,1)))
|
||||
fo.close()
|
||||
bin_size = os.path.getsize(binary_file)
|
||||
ttfw_idf.log_performance("advanced_https_ota_bin_size", "{}KB".format(bin_size // 1024))
|
||||
|
Reference in New Issue
Block a user