mirror of
				https://github.com/espressif/esp-idf.git
				synced 2025-10-30 20:51:41 +00: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) |             f.write(chr(0xFF) * size) | ||||||
|  |  | ||||||
|     @_uses_esptool |     @_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. |         :param output_file: output file name, if relative path, will use sdk path as base path. | ||||||
|         :keyword partition: partition name, dump the partition. |         :keyword partition: partition name, dump the partition. | ||||||
| @@ -576,10 +585,13 @@ class IDFQEMUDUT(IDFDUT): | |||||||
|         self.qemu.expect_exact(b"(qemu)") |         self.qemu.expect_exact(b"(qemu)") | ||||||
|  |  | ||||||
|     def erase_partition(self, partition): |     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): |     def erase_flash(self): | ||||||
|         raise NotImplementedError("method not dump_flush not implemented") |         raise NotImplementedError("method erase_flash not implemented") | ||||||
|  |  | ||||||
|  |     def dump_flash(self, output_file, **kwargs): | ||||||
|  |         raise NotImplementedError("method dump_flash not implemented") | ||||||
|  |  | ||||||
|     @classmethod |     @classmethod | ||||||
|     def list_available_ports(cls): |     def list_available_ports(cls): | ||||||
|   | |||||||
| @@ -139,7 +139,7 @@ class PanicTestMixin(object): | |||||||
|         log_folder = self.app.get_log_folder(TEST_SUITE) |         log_folder = self.app.get_log_folder(TEST_SUITE) | ||||||
|         coredump_file_name = os.path.join(log_folder, "coredump_data_" + self.test_name + ".bin") |         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) |         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") |         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) |         self._call_espcoredump(["--core-format", "raw"], coredump_file_name, output_file_name) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Aditya Patwardhan
					Aditya Patwardhan