summaryrefslogtreecommitdiff
path: root/test-cli/test/helpers/testsrv_db.py
diff options
context:
space:
mode:
Diffstat (limited to 'test-cli/test/helpers/testsrv_db.py')
-rw-r--r--test-cli/test/helpers/testsrv_db.py37
1 files changed, 18 insertions, 19 deletions
diff --git a/test-cli/test/helpers/testsrv_db.py b/test-cli/test/helpers/testsrv_db.py
index 94181f9..f08cb17 100644
--- a/test-cli/test/helpers/testsrv_db.py
+++ b/test-cli/test/helpers/testsrv_db.py
@@ -19,12 +19,12 @@ class TestSrv_Database(object):
def __init__(self):
pass
- def open (self, filename):
- '''Open database connection'''
- self.__xml_setup = XMLSetup(filename)
+ def open (self, xmlObj):
+ self.__xml_setup = xmlObj;
self.__sqlObject = PgSQLConnection()
return self.__sqlObject.db_connect(self.__xml_setup.getdbConnectionStr())
+
def create_board(self, processor_id, model_id, variant, bmac = None):
'''create a new board'''
if bmac is None:
@@ -95,7 +95,20 @@ class TestSrv_Database(object):
def getboard_comp_test_list(self, board_uuid):
'''get the board test list'''
- sql = "SELECT isee.gettestcompletelist('{}')".format(board_uuid)
+ sql = "SELECT * FROM isee.gettestcompletelist('{}')".format(board_uuid)
+ #print('>>>' + sql)
+ try:
+ res = self.__sqlObject.db_execute_query(sql)
+ #print(res)
+ return res;
+ except Exception as err:
+ r = find_between(str(err), '#', '#')
+ #print(r)
+ return None
+
+ def getboard_test_variables(self, board_uuid, testdefid):
+ '''get the board test list'''
+ sql = "SELECT * FROM isee.getboardtestvariables('{}', '{}')".format(board_uuid, testdefid)
#print('>>>' + sql)
try:
res = self.__sqlObject.db_execute_query(sql)
@@ -159,18 +172,4 @@ class TestSrv_Database(object):
except Exception as err:
r = find_between(str(err), '#', '#')
#print(r)
- return None
-
- def getboard_eeprom(self, board_uuid):
- '''get the board eeprom struct '''
- sql = "SELECT isee.getboard_eeprom('{}')".format(board_uuid)
- #print('>>>' + sql)
- try:
- res = self.__sqlObject.db_execute_query(sql)
- #print(res)
- return res;
- except Exception as err:
- r = find_between(str(err), '#', '#')
- #print(r)
- return None
- \ No newline at end of file
+ return None \ No newline at end of file