Lines Matching refs:f

72         self.server_output_file = open(f"{TEST_DIR}/{str(arg_chip)}_server.out", "a")
202 f"{TEST_DIR}/images/ram_helloworld/helloworld-{arg_chip}.bin",
210 print(f'\nRunning the "{args}" command...')
246 f"--before default_reset read_flash {offset} {length} {dump_file.name}"
249 cmd += f" --spi-connection {spi_connection}"
251 with open(dump_file.name, "rb") as f:
252 rb = f.read()
256 ), f"read_flash length {length} offset {offset:#x} yielded {len(rb)} bytes!"
266 ), f"First difference at offset {offs:#x} Expected {ct_b} got {rb_b}"
272 with open(compare_to, "rb") as f:
273 ct = f.read()
276 f"WARNING: Expected length {len(ct)} doesn't match comparison {len(rb)}"
278 print(f"Readback {len(rb)} bytes")
349 ), f"Encrypted write failed: file mismatch at byte position {i}"
410 fd, f = tempfile.mkstemp(suffix=".hex")
412 self.run_esptool(f"merge_bin --format hex 0x0 images/one_kb.bin -o {f}")
415 self.run_esptool(f"write_flash 0x0 {f}")
418 os.unlink(f)
424 self.run_esptool(f"merge_bin --format hex 0x0 images/sector.bin -o {f1}")
428 f"merge_bin --format hex 0x1000 images/fifty_kb.bin -o {f2}"
431 self.run_esptool(f"write_flash 0x0 {f1} 0x1000 {f2}")
439 fd, f = tempfile.mkstemp(suffix=".hex")
442 f"merge_bin --format hex 0x1000 images/fifty_kb.bin -o {f}"
446 self.run_esptool(f"write_flash 0x0 images/sector.bin 0x1000 {f}")
450 os.unlink(f)
492 with open("images/sector.bin", "rb") as f:
493 ct = f.read()
578 self.run_esptool(f"write_flash 0x10000 {input_file.name}")
592 self.run_esptool(f"write_flash 0x10000 {input_file.name}")
761 print(f"RTC_CNTL_SWD_CONF_REG: {output}")
781 assert f"Chip ID: {esp.IMAGE_CHIP_ID}" in res
834 image = f"images/bootloader_{arg_chip}.bin"
836 with open(image, "rb") as f:
837 f.seek(0, 2)
838 image_len = f.tell()
839 self.run_esptool(f"write_flash -fs keep {offset} {image}")
849 self.run_esptool(f"write_flash -fs detect {offset} images/one_kb.bin")
854 f"--no-stub read_flash -fs detect {offset} 1024 {dump_file.name}"
856 with open(dump_file.name, "rb") as f:
857 rb = f.read()
860 ), f"read_flash length {length} offset {offset:#x} yielded {len(rb)} bytes!"
865 with open("images/one_kb.bin", "rb") as f:
866 ct = f.read()
887 res = self.run_esptool(f"@{arg_file.name}")
947 f"write_flash --spi-connection {self.conn} 0x0 images/sector.bin"
955 f"write_flash --spi-connection {self.conn} 0x0 images/one_kb.bin"
966 f"--no-stub write_flash --spi-connection {self.conn} 0x0 images/sector.bin"
974 f"--no-stub write_flash --spi-connection {self.conn} 0x0 images/one_kb.bin"
1121 self.BL_IMAGE = f"images/bootloader_{arg_chip}.bin"
1123 with open(self.BL_IMAGE, "rb") as f:
1124 self.header = f.read(8)
1132 self.run_esptool(f"write_flash -fs keep {self.flash_offset:#x} {self.BL_IMAGE}")
1136 f"write_flash -fm keep -ff keep -fs keep "
1137 f"{self.flash_offset:#x} {self.BL_IMAGE}"
1142 f"verify_flash -fs keep {self.flash_offset:#x} {self.BL_IMAGE}"
1152 f"write_flash -fs detect {self.flash_offset:#x} {self.BL_IMAGE}"
1165 f"write_flash -fs 2MB -fm dout -ff 80m "
1166 f"{self.flash_offset:#x} {self.BL_IMAGE}"
1182 f"verify_flash -fs 2MB -fm dout -ff 80m "
1183 f"{self.flash_offset:#x} {self.BL_IMAGE}"
1185 self.run_esptool_error(f"verify_flash {self.flash_offset:#x} {self.BL_IMAGE}")
1207 print(f"Output: {output}")
1217 self.run_esptool(f"load_ram images/ram_helloworld/helloworld-{arg_chip}.bin")
1228 fd, f = tempfile.mkstemp(suffix=".hex")
1231 f"merge_bin --format hex -o {f} 0x0 "
1232 f"images/ram_helloworld/helloworld-{arg_chip}.bin"
1236 self.run_esptool(f"load_ram {f}")
1241 os.unlink(f)
1274 bl_image = f"images/bootloader_{arg_chip}.bin"
1277 f"write_flash -fm dout -ff 20m {bl_offset:#x} {bl_image}"
1293 f"write_flash -fm dout -ff 20m {bl_offset:#x} {image}"
1304 assert f"Detecting chip type... {expected_chip_name}" in output
1305 assert f"Chip is {expected_chip_name}" in output
1322 port=f"rfc2217://localhost:{str(server.port)}?ign_set_control",
1328 rfc2217_port = f"rfc2217://localhost:{str(server.port)}?ign_set_control"
1384 print(f"Using test address {test_addr:#x}")
1428 res = self.run_esptool(f"write_flash_status {match.group(1)}")
1429 assert f"Initial flash status: {match.group(1)}" in res
1430 assert f"Setting flash status: {match.group(1)}" in res
1431 assert f"After flash status: {match.group(1)}" in res
1466 with open(image, "rb") as f:
1467 f.seek(offset)
1468 rb = f.read(length)
1469 with open(compare_to, "rb") as f:
1470 ct = f.read()
1473 f"WARNING: Expected length {len(ct)} doesn't match comparison {len(rb)}"
1475 print(f"Readback {len(rb)} bytes")
1529 assert f"Loaded custom configuration from {config_file_path}" in output
1537 assert f"Loaded custom configuration from {config_file_path}" not in output
1543 assert f"Ignoring invalid config file {config_file_path}" in output
1561 assert f"Loaded custom configuration from {config_file_path}" in output
1569 assert f"Loaded custom configuration from {config_file_path}" not in output
1576 assert f"Loaded custom configuration from {config_file_path}" in output
1596 assert f"Loaded custom configuration from {config_file_path}" in output
1606 assert f"Loaded custom configuration from {config_file_path}" in output
1614 f"open_port_attempts = {connect_attempts}\n"
1621 assert f"Loaded custom configuration from {config_file_path}" in output