mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 19:24:33 +02:00
ttfw/IDFDUT: i) Added option to erase_flash in the IDFDUT class
ii) Renamed the method dump_flush to dump_flash
This commit is contained in:
@@ -334,9 +334,18 @@ class IDFDUT(DUT.SerialDUT):
|
||||
f.write(chr(0xFF) * size)
|
||||
|
||||
@_uses_esptool
|
||||
def dump_flush(self, esp, output_file, **kwargs):
|
||||
def erase_flash(self, esp):
|
||||
"""
|
||||
dump flush
|
||||
erase the flash completely
|
||||
|
||||
:return: None
|
||||
"""
|
||||
esp.erase_flash()
|
||||
|
||||
@_uses_esptool
|
||||
def dump_flash(self, esp, output_file, **kwargs):
|
||||
"""
|
||||
dump flash
|
||||
|
||||
:param output_file: output file name, if relative path, will use sdk path as base path.
|
||||
:keyword partition: partition name, dump the partition.
|
||||
@@ -576,10 +585,13 @@ class IDFQEMUDUT(IDFDUT):
|
||||
self.qemu.expect_exact(b"(qemu)")
|
||||
|
||||
def erase_partition(self, partition):
|
||||
raise NotImplementedError("method not erase_partition not implemented")
|
||||
raise NotImplementedError("method erase_partition not implemented")
|
||||
|
||||
def dump_flush(self, output_file, **kwargs):
|
||||
raise NotImplementedError("method not dump_flush not implemented")
|
||||
def erase_flash(self):
|
||||
raise NotImplementedError("method erase_flash not implemented")
|
||||
|
||||
def dump_flash(self, output_file, **kwargs):
|
||||
raise NotImplementedError("method dump_flash not implemented")
|
||||
|
||||
@classmethod
|
||||
def list_available_ports(cls):
|
||||
|
@@ -139,7 +139,7 @@ class PanicTestMixin(object):
|
||||
log_folder = self.app.get_log_folder(TEST_SUITE)
|
||||
coredump_file_name = os.path.join(log_folder, "coredump_data_" + self.test_name + ".bin")
|
||||
Utility.console_log("Writing flash binary core dump to " + coredump_file_name)
|
||||
self.dump_flush(coredump_file_name, partition="coredump")
|
||||
self.dump_flash(coredump_file_name, partition="coredump")
|
||||
|
||||
output_file_name = os.path.join(log_folder, "coredump_flash_result_" + self.test_name + ".txt")
|
||||
self._call_espcoredump(["--core-format", "raw"], coredump_file_name, output_file_name)
|
||||
|
Reference in New Issue
Block a user