summaryrefslogtreecommitdiff
path: root/test-cli/test_main.py
diff options
context:
space:
mode:
Diffstat (limited to 'test-cli/test_main.py')
-rw-r--r--test-cli/test_main.py19
1 files changed, 18 insertions, 1 deletions
diff --git a/test-cli/test_main.py b/test-cli/test_main.py
index 6a8ed7e..3c4d1cb 100644
--- a/test-cli/test_main.py
+++ b/test-cli/test_main.py
@@ -24,6 +24,7 @@ from test.tests.qrtc import Qrtc
from test.tests.qduplex_ser import Qduplex
from test.tests.qamp import Qamp
from test.tests.qflash import Qflasher
+from test.helpers.finisher import Finisher
from test.helpers.globalVariables import globalVar
# define clear function
@@ -80,7 +81,23 @@ def testsuite():
def finish_test():
psdb = TestSrv_Database()
psdb.open("setup.xml")
- psdb.close_testbatch(globalVar.g_uuid, globalVar.testid_ctl)
+ auxs = psdb.close_testbatch(globalVar.g_uuid, globalVar.testid_ctl)
+ globalVar.fstatus = auxs[0][0]
+ # Burn eeprom struct
+ psdb = TestSrv_Database()
+ psdb.open("setup.xml")
+ # We should call getboard_eeprom only if test was ok
+ if globalVar.fstatus:
+ aux = psdb.getboard_eeprom(globalVar.g_uuid)
+ finish = Finisher(aux)
+ finish.end_ok()
+ else:
+ finish = Finisher(globalVar.g_uuid)
+ finish.end_fail()
+ # Update set_test current_test with 'END' so that it finally gets painted in green
+ psdb = TestSrv_Database()
+ psdb.open("setup.xml")
+ psdb.update_set_test_row(globalVar.station, globalVar.testid_ctl, globalVar.g_uuid, "END","FINISH")
def main():
#addtesttomodel()