summaryrefslogtreecommitdiff
path: root/test-cli/test/helpers/testsrv_db.py
diff options
context:
space:
mode:
authorHector Fernandez <hector@iatec.biz>2020-03-13 12:17:51 +0100
committerHector Fernandez <hector@iatec.biz>2020-03-19 21:31:03 +0100
commite74e0a36d9ad6a01c04500f3a24cb0ef5dd0b283 (patch)
tree9532b642b798498ed46dea08623c08314c7c873f /test-cli/test/helpers/testsrv_db.py
parent41ffba6a76a80a7ef4553cb8856393dd209d172e (diff)
downloadboard-e74e0a36d9ad6a01c04500f3a24cb0ef5dd0b283.zip
board-e74e0a36d9ad6a01c04500f3a24cb0ef5dd0b283.tar.gz
board-e74e0a36d9ad6a01c04500f3a24cb0ef5dd0b283.tar.bz2
Added final flashing tasks: eeprom and nand.
Diffstat (limited to 'test-cli/test/helpers/testsrv_db.py')
-rw-r--r--test-cli/test/helpers/testsrv_db.py49
1 files changed, 44 insertions, 5 deletions
diff --git a/test-cli/test/helpers/testsrv_db.py b/test-cli/test/helpers/testsrv_db.py
index 9fb61fd..c9372fc 100644
--- a/test-cli/test/helpers/testsrv_db.py
+++ b/test-cli/test/helpers/testsrv_db.py
@@ -51,14 +51,13 @@ class TestSrv_Database(object):
try:
res = self.__sqlObject.db_execute_query(sql)
# print(res)
- return res;
+ return res
except Exception as err:
r = find_between(str(err), '#', '#')
# print(r)
return None
def get_test_params_list(self, testid):
- '''get the board test list'''
sql = "SELECT * FROM isee.f_get_test_params_list({})".format(testid)
# print('>>>' + sql)
try:
@@ -71,7 +70,6 @@ class TestSrv_Database(object):
return None
def open_test(self, board_uuid):
- '''get the board test list'''
sql = "SELECT * FROM isee.f_open_test('{}')".format(board_uuid)
# print('>>>' + sql)
try:
@@ -84,7 +82,6 @@ class TestSrv_Database(object):
return None
def run_test(self, testid_ctl, testid):
- '''get the board test list'''
sql = "SELECT isee.f_run_test({},{})".format(testid_ctl, testid)
# print('>>>' + sql)
try:
@@ -95,7 +92,6 @@ class TestSrv_Database(object):
return None
def finish_test(self, testid_ctl, testid, newstatus):
- '''get the board test list'''
sql = "SELECT isee.f_finish_test({},{},'{}')".format(testid_ctl, testid, newstatus)
# print('>>>' + sql)
try:
@@ -117,3 +113,46 @@ class TestSrv_Database(object):
# print(r)
return None
+ def get_board_macaddr(self, board_uuid):
+ sql = "SELECT * FROM isee.f_get_board_macaddr('{}')".format(board_uuid)
+ # print('>>>' + sql)
+ try:
+ res = self.__sqlObject.db_execute_query(sql)
+ # print(res)
+ return res[0][0]
+ except Exception as err:
+ r = find_between(str(err), '#', '#')
+ # print(r)
+ return None
+
+ def create_process(self, testid_ctl):
+ sql = "SELECT * FROM isee.f_create_process({})".format(testid_ctl)
+ # print('>>>' + sql)
+ try:
+ res = self.__sqlObject.db_execute_query(sql)
+ # print(res)
+ return res[0][0]
+ except Exception as err:
+ r = find_between(str(err), '#', '#')
+ # print(r)
+ return None
+
+ def create_task_result(self, taskid_ctl, name, newstatus):
+ sql = "SELECT isee.f_create_task_result({},'{}','{}')".format(taskid_ctl, name, newstatus)
+ # print('>>>' + sql)
+ try:
+ self.__sqlObject.db_execute_query(sql)
+ except Exception as err:
+ r = find_between(str(err), '#', '#')
+ # print(r)
+ return None
+
+ def update_taskctl_status(self, taskid_ctl, newstatus):
+ sql = "SELECT isee.f_update_taskctl_status({},'{}')".format(taskid_ctl, newstatus)
+ # print('>>>' + sql)
+ try:
+ self.__sqlObject.db_execute_query(sql)
+ except Exception as err:
+ r = find_between(str(err), '#', '#')
+ # print(r)
+ return None