summaryrefslogtreecommitdiff
path: root/test-cli/test/helpers/testsrv_db.py
diff options
context:
space:
mode:
authorHector Fernandez <hector@iatec.biz>2020-03-06 12:46:27 +0100
committerHector Fernandez <hector@iatec.biz>2020-03-06 12:46:27 +0100
commit9f07a57d89a927aa9b172c1bf20c7ab563658c73 (patch)
tree3691cb8d09862db185a628c7bb07df6dd50a64bb /test-cli/test/helpers/testsrv_db.py
parent98d40cecc9818360984188755e455aa53933aab0 (diff)
downloadboard-9f07a57d89a927aa9b172c1bf20c7ab563658c73.zip
board-9f07a57d89a927aa9b172c1bf20c7ab563658c73.tar.gz
board-9f07a57d89a927aa9b172c1bf20c7ab563658c73.tar.bz2
Fixed multiple errors.
Diffstat (limited to 'test-cli/test/helpers/testsrv_db.py')
-rw-r--r--test-cli/test/helpers/testsrv_db.py26
1 files changed, 12 insertions, 14 deletions
diff --git a/test-cli/test/helpers/testsrv_db.py b/test-cli/test/helpers/testsrv_db.py
index b7b75b1..d937d3e 100644
--- a/test-cli/test/helpers/testsrv_db.py
+++ b/test-cli/test/helpers/testsrv_db.py
@@ -27,11 +27,13 @@ class TestSrv_Database(object):
def create_board(self, processor_id, model_id, variant, station, bmac=None):
'''create a new board'''
if bmac is None:
- sql = "SELECT isee.f_create_board('{}', '{}', '{}', NULL, '{}');".format(processor_id, model_id, variant,
- station)
+ sql = "SELECT * FROM isee.f_create_board('{}', '{}', '{}', NULL, '{}');".format(processor_id, model_id,
+ variant,
+ station)
else:
- sql = "SELECT isee.f_create_board('{}', '{}', '{}', '{}', '{}');".format(processor_id, model_id, variant,
- bmac, station)
+ sql = "SELECT * FROM isee.f_create_board('{}', '{}', '{}', '{}', '{}');".format(processor_id, model_id,
+ variant,
+ bmac, station)
# print('>>>' + sql)
try:
res = self.__sqlObject.db_execute_query(sql)
@@ -57,7 +59,7 @@ class TestSrv_Database(object):
def get_test_params_list(self, testid):
'''get the board test list'''
- sql = "SELECT * FROM isee.f_get_test_params_list('{}')".format(testid)
+ sql = "SELECT * FROM isee.f_get_test_params_list({})".format(testid)
# print('>>>' + sql)
try:
res = self.__sqlObject.db_execute_query(sql)
@@ -75,7 +77,7 @@ class TestSrv_Database(object):
try:
res = self.__sqlObject.db_execute_query(sql)
# print(res)
- return res
+ return res[0][0]
except Exception as err:
r = find_between(str(err), '#', '#')
# print(r)
@@ -83,12 +85,10 @@ class TestSrv_Database(object):
def run_test(self, testid_ctl, testid):
'''get the board test list'''
- sql = "SELECT * FROM isee.f_run_test('{}','{}')".format(testid_ctl, testid)
+ sql = "SELECT isee.f_run_test({},{})".format(testid_ctl, testid)
# print('>>>' + sql)
try:
- res = self.__sqlObject.db_execute_query(sql)
- # print(res)
- return res
+ self.__sqlObject.db_execute_query(sql)
except Exception as err:
r = find_between(str(err), '#', '#')
# print(r)
@@ -96,12 +96,10 @@ class TestSrv_Database(object):
def finish_test(self, testid_ctl, testid, newstatus):
'''get the board test list'''
- sql = "SELECT * FROM isee.f_finish_test('{}','{}','{}')".format(testid_ctl, testid, newstatus)
+ sql = "SELECT isee.f_finish_test({},{},'{}')".format(testid_ctl, testid, newstatus)
# print('>>>' + sql)
try:
- res = self.__sqlObject.db_execute_query(sql)
- # print(res)
- return res
+ self.__sqlObject.db_execute_query(sql)
except Exception as err:
r = find_between(str(err), '#', '#')
# print(r)