summaryrefslogtreecommitdiff
path: root/test-cli/test/flashers
diff options
context:
space:
mode:
Diffstat (limited to 'test-cli/test/flashers')
-rw-r--r--test-cli/test/flashers/__init__.py0
-rw-r--r--test-cli/test/flashers/flasher.py10
-rw-r--r--test-cli/test/flashers/flasher_sopa0000.py13
3 files changed, 23 insertions, 0 deletions
diff --git a/test-cli/test/flashers/__init__.py b/test-cli/test/flashers/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test-cli/test/flashers/__init__.py
diff --git a/test-cli/test/flashers/flasher.py b/test-cli/test/flashers/flasher.py
new file mode 100644
index 0000000..d962fca
--- /dev/null
+++ b/test-cli/test/flashers/flasher.py
@@ -0,0 +1,10 @@
+from test.flashers.flasher_sopa0000 import flash_sopa0000
+
+
+def flash(modelid):
+ result = None
+
+ if modelid.find("SOPA0000") == 0:
+ result = flash_sopa0000()
+
+ return result
diff --git a/test-cli/test/flashers/flasher_sopa0000.py b/test-cli/test/flashers/flasher_sopa0000.py
new file mode 100644
index 0000000..818be91
--- /dev/null
+++ b/test-cli/test/flashers/flasher_sopa0000.py
@@ -0,0 +1,13 @@
+from test.helpers.syscmd import SysCommand
+
+
+def flash_sopa0000():
+ print("Sart programming Nand memory...")
+ str_cmd = "/usr/bin/igep-flash --skip-nandtest --image /opt/firmware/demo-ti-image-*-*.tar* >/dev/null 2>&1"
+ sync_command = SysCommand("sync_command", str_cmd)
+ if sync_command.execute() != 0:
+ print("Flasher: Could not complete flashing task.")
+ return 1
+ else:
+ print("Flasher: NAND memory flashed succesfully.")
+ return 0