summaryrefslogtreecommitdiff
path: root/test-cli/test/tasks
diff options
context:
space:
mode:
authorHector Fernandez <hector@iatec.biz>2020-07-01 10:45:34 +0200
committerHector Fernandez <hector@iatec.biz>2020-07-01 10:45:34 +0200
commit34df86b37d6838b115e65e5f3a332344afeb86b8 (patch)
tree946e1d7d6d55a4339e453c84c4fbbf4b785a1712 /test-cli/test/tasks
parent9ac8a326412b04e4873b883c2f2a056ca0b22480 (diff)
downloadboard-34df86b37d6838b115e65e5f3a332344afeb86b8.zip
board-34df86b37d6838b115e65e5f3a332344afeb86b8.tar.gz
board-34df86b37d6838b115e65e5f3a332344afeb86b8.tar.bz2
Changes to adapt to new way to save results in DB. Created audio test. Added protections against unexpected status in DB.
Diffstat (limited to 'test-cli/test/tasks')
-rw-r--r--test-cli/test/tasks/flasheeprom.py2
-rw-r--r--test-cli/test/tasks/generatedmesg.py17
2 files changed, 1 insertions, 18 deletions
diff --git a/test-cli/test/tasks/flasheeprom.py b/test-cli/test/tasks/flasheeprom.py
index 71c1bdd..feeb04c 100644
--- a/test-cli/test/tasks/flasheeprom.py
+++ b/test-cli/test/tasks/flasheeprom.py
@@ -21,7 +21,7 @@ def _generate_data_bytes(boarduuid, mac0, mac1):
def _generate_output_data(data_rx):
- boarduuid = data_rx[8:44].decode('ascii') # no 8:45 porque el \0 final hace que no funcione postgresql
+ 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))
diff --git a/test-cli/test/tasks/generatedmesg.py b/test-cli/test/tasks/generatedmesg.py
deleted file mode 100644
index aa9d9ce..0000000
--- a/test-cli/test/tasks/generatedmesg.py
+++ /dev/null
@@ -1,17 +0,0 @@
-import sh
-
-
-def generate_dmesg(tidctl, pgObj):
- print("Start getting DMESG...")
- p = sh.dmesg("--color=never")
- if p.exit_code != 0:
- print("DMESG: Unknown error.")
- return 1
- else:
- # save dmesg in a file
- with open('/tmp/dmesg.txt', 'w') as outfile:
- n = outfile.write(p.stdout.decode('ascii'))
- # save dmesg result in DB
- pgObj.upload_dmesg(tidctl, '/tmp/dmesg.txt')
- print("DMESG: saved succesfully.")
- return 0