summaryrefslogtreecommitdiff
path: root/test-cli/test/tasks/flashmemory.py
diff options
context:
space:
mode:
Diffstat (limited to 'test-cli/test/tasks/flashmemory.py')
-rw-r--r--test-cli/test/tasks/flashmemory.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/test-cli/test/tasks/flashmemory.py b/test-cli/test/tasks/flashmemory.py
new file mode 100644
index 0000000..3be56d7
--- /dev/null
+++ b/test-cli/test/tasks/flashmemory.py
@@ -0,0 +1,12 @@
+import sh
+
+
+def flash_memory(imagepath):
+ print("Start programming Nand memory...")
+ p = sh.bash("/usr/bin/igep-flash", "--skip-nandtest", "--image", imagepath)
+ if p.exit_code != 0:
+ print("Flasher: Could not complete flashing task.")
+ return 1
+ else:
+ print("Flasher: NAND memory flashed succesfully.")
+ return 0