From d4020f0bce8c7841879736cd00ec64d617111c80 Mon Sep 17 00:00:00 2001 From: Hector Fernandez Date: Thu, 23 Apr 2020 14:14:02 +0200 Subject: Modified nand memory flasher --- test-cli/.idea/workspace.xml | 6 +++--- test-cli/test/__init__.pyc | Bin 114 -> 124 bytes test-cli/test/flashers/flashmemory.py | 4 ++-- test-cli/test/helpers/__init__.pyc | Bin 122 -> 132 bytes test-cli/test_main.py | 7 ++++--- 5 files changed, 9 insertions(+), 8 deletions(-) (limited to 'test-cli') diff --git a/test-cli/.idea/workspace.xml b/test-cli/.idea/workspace.xml index d36015c..2439fd2 100644 --- a/test-cli/.idea/workspace.xml +++ b/test-cli/.idea/workspace.xml @@ -3,9 +3,8 @@ - - - + + + diff --git a/test-cli/test/__init__.pyc b/test-cli/test/__init__.pyc index cd50092..3248efc 100644 Binary files a/test-cli/test/__init__.pyc and b/test-cli/test/__init__.pyc differ diff --git a/test-cli/test/flashers/flashmemory.py b/test-cli/test/flashers/flashmemory.py index c7267c6..3be56d7 100644 --- a/test-cli/test/flashers/flashmemory.py +++ b/test-cli/test/flashers/flashmemory.py @@ -1,9 +1,9 @@ import sh -def flash_memory(imagefile): +def flash_memory(imagepath): print("Start programming Nand memory...") - p = sh.bash("/usr/bin/igep-flash", "--skip-nandtest", "--image", "/opt/firmware/" + imagefile) + 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 diff --git a/test-cli/test/helpers/__init__.pyc b/test-cli/test/helpers/__init__.pyc index 7d1c907..01014e2 100644 Binary files a/test-cli/test/helpers/__init__.pyc and b/test-cli/test/helpers/__init__.pyc differ diff --git a/test-cli/test_main.py b/test-cli/test_main.py index 23250ca..3034e77 100644 --- a/test-cli/test_main.py +++ b/test-cli/test_main.py @@ -156,10 +156,11 @@ def main(): # flash non-volatile memory resultmemory = 0 - if "image" in varlist and len(varlist["image"]) > 0: - resultmemory = flash_memory(varlist["image"]) + if ("flashimagepath" in varlist and len(varlist["flashimagepath"]) > 0: + resultmemory = flash_memory(varlist["flashimagepath"]) psdbObj.create_task_result(globalVar.taskid_ctl, "FLASHMEMORY", - "TASK_OK" if resultmemory == 0 else "TASK_FAIL", varlist["image"]) + "TASK_OK" if resultmemory == 0 else "TASK_FAIL", + varlist["flashimagepath"]) # update status with the result if resulteeprom == 0 and resultmemory == 0: -- cgit v1.1