Skip to contentSkip to conversation

test/py: fix NameError exception if bdi cmd is not supported

PATCH Superseded Heiko Schocher 3 participants 3 messages May 6, 2016 – May 30, 2016

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 test/py: fix NameError exception if bdi cmd is not supported

test/py raises an error, if a board has not enabled bdi command

Quoted 1 line

pytest.skip('bdinfo command not supported')

E NameError: global name 'pytest' is not defined

import pytest in test/py/u_boot_utils.py fixes this.

---
found on the corvus board, which does not support this command. For interests:
I integrated test/py into tbot, and catch test/py results, see as a demo:
http://xeidos.ddns.net/tests/test_db_auslesen.php

 test/py/u_boot_utils.py | 1 +
 1 file changed, 1 insertion(+)
test/py/u_boot_utils.py +1 -0
index 72d24e4..1d7b12a 100644
@@ -9,6 +9,7 @@ import os
 import os.path
 import sys
 import time
+import pytest
 
 def md5sum_data(data):
     """Calculate the MD5 hash of some data.
Signature · 1 line
2.5.5
#1 lore raw

PATCH 1/1 test/py: fix NameError exception if bdi cmd is not supported

Quoted 6 lines · Heiko Schocher

test/py raises an error, if a board has not enabled bdi command

Quoted 1 line

pytest.skip('bdinfo command not supported')

E NameError: global name 'pytest' is not defined

import pytest in test/py/u_boot_utils.py fixes this.

Nit: The import statements were sorted before this patch.

#2 lore raw
In reply to Heiko Schocher
Quoted 9 lines · Heiko Schocher

test/py raises an error, if a board has not enabled bdi command

Quoted 1 line

pytest.skip('bdinfo command not supported')

E NameError: global name 'pytest' is not defined

import pytest in test/py/u_boot_utils.py fixes this.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160530/7a561731/attachment.sig>