summaryrefslogtreecommitdiff
path: root/test-cli
diff options
context:
space:
mode:
authorHector Fernandez <hector@iatec.biz>2020-04-01 11:45:07 +0200
committerHector Fernandez <hector@iatec.biz>2020-04-13 09:55:40 +0200
commit0c610ebbef5928f17ec8c14d872b4d4298d3c4fb (patch)
treeb7574997e4286759a8a98a86814be814d8bdadb0 /test-cli
parent686893803c05fedd38a24bb1f661f8aeb7c652fe (diff)
downloadboard-0c610ebbef5928f17ec8c14d872b4d4298d3c4fb.zip
board-0c610ebbef5928f17ec8c14d872b4d4298d3c4fb.tar.gz
board-0c610ebbef5928f17ec8c14d872b4d4298d3c4fb.tar.bz2
Modificada la IP del servidor. Arreglado error al enviar los datos de la eeprom grabada a la BD.
Diffstat (limited to 'test-cli')
-rw-r--r--test-cli/setup.xml2
-rw-r--r--test-cli/test/flashers/flasheeprom.py9
-rw-r--r--test-cli/test/helpers/testsrv_db.py4
3 files changed, 8 insertions, 7 deletions
diff --git a/test-cli/setup.xml b/test-cli/setup.xml
index e17a1d5..d0ca7e1 100644
--- a/test-cli/setup.xml
+++ b/test-cli/setup.xml
@@ -3,7 +3,7 @@
<setup>
<test idline="1"/> <!-- Test line identify -->
<board model="SOPA0000" variant="BW2Q-QXXX"/>
- <db dbname="testsrv" type="PgSQLConnection" host="192.168.8.100" port="5432" user="admin" password="Idkfa2009" /> <!-- database setup -->
+ <db dbname="testsrv" type="PgSQLConnection" host="192.168.2.130" port="5432" user="admin" password="Idkfa2009" /> <!-- database setup -->
</setup>
</data>
diff --git a/test-cli/test/flashers/flasheeprom.py b/test-cli/test/flashers/flasheeprom.py
index fe1a4b2..71c1bdd 100644
--- a/test-cli/test/flashers/flasheeprom.py
+++ b/test-cli/test/flashers/flasheeprom.py
@@ -1,5 +1,6 @@
import os
import binascii
+from test.helpers.globalVariables import globalVar
def _generate_data_bytes(boarduuid, mac0, mac1):
@@ -20,12 +21,12 @@ def _generate_data_bytes(boarduuid, mac0, mac1):
def _generate_output_data(data_rx):
- boarduuid = data_rx[8:45].decode()
- mac0 = binascii.hexlify(data_rx[45:51]).decode()
- mac1 = binascii.hexlify(data_rx[51:57]).decode()
+ boarduuid = data_rx[8:44].decode('ascii') # no 8:45 porque el \0 final hace que no funcione postgresql
+ mac0 = binascii.hexlify(data_rx[45:51]).decode('ascii')
+ mac1 = binascii.hexlify(data_rx[51:57]).decode('ascii')
smac0 = ':'.join(mac0[i:i + 2] for i in range(0, len(mac0), 2))
smac1 = ':'.join(mac1[i:i + 2] for i in range(0, len(mac1), 2))
- eepromdata = "UUID:" + boarduuid + " MAC0:" + smac0 + " MAC1:" + smac1
+ eepromdata = "UUID " + boarduuid + " , MAC0 " + smac0 + " , MAC1 " + smac1
return eepromdata
diff --git a/test-cli/test/helpers/testsrv_db.py b/test-cli/test/helpers/testsrv_db.py
index bf51acf..d563e74 100644
--- a/test-cli/test/helpers/testsrv_db.py
+++ b/test-cli/test/helpers/testsrv_db.py
@@ -139,12 +139,12 @@ class TestSrv_Database(object):
def create_task_result(self, taskid_ctl, name, newstatus, newinfo=None):
sql = "SELECT isee.f_create_task_result({},'{}','{}','{}')".format(taskid_ctl, name, newstatus, newinfo)
- # print('>>>' + sql)
+ print('>>>' + sql)
try:
self.__sqlObject.db_execute_query(sql)
except Exception as err:
r = find_between(str(err), '#', '#')
- # print(r)
+ print(r)
return None
def update_taskctl_status(self, taskid_ctl, newstatus):