[FL-2887] actions unit tests runner (#1920)
Co-authored-by: Konstantin Volkov <k.volkov@flipperdevices.com> Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
committed by
GitHub
parent
be3ee9f2fe
commit
492f147568
@@ -21,6 +21,11 @@ class Main(App):
|
||||
self.parser_mkdir.add_argument("flipper_path", help="Flipper path")
|
||||
self.parser_mkdir.set_defaults(func=self.mkdir)
|
||||
|
||||
self.parser_format = self.subparsers.add_parser(
|
||||
"format_ext", help="Format flash card"
|
||||
)
|
||||
self.parser_format.set_defaults(func=self.format_ext)
|
||||
|
||||
self.parser_remove = self.subparsers.add_parser(
|
||||
"remove", help="Remove file/directory"
|
||||
)
|
||||
@@ -275,6 +280,17 @@ class Main(App):
|
||||
storage.stop()
|
||||
return 0
|
||||
|
||||
def format_ext(self):
|
||||
if not (storage := self._get_storage()):
|
||||
return 1
|
||||
|
||||
self.logger.debug("Formatting /ext SD card")
|
||||
|
||||
if not storage.format_ext():
|
||||
self.logger.error(f"Error: {storage.last_error}")
|
||||
storage.stop()
|
||||
return 0
|
||||
|
||||
def stress(self):
|
||||
self.logger.error("This test is wearing out flash memory.")
|
||||
self.logger.error("Never use it with internal storage(/int)")
|
||||
|
Reference in New Issue
Block a user