Skip to contentSkip to conversation

tests: py: fix NameError exception if bdi cmd is not supported

PATCH New Heiko Schocher 2 participants 2 messages May 9, 2016 – May 13, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 tests: 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

Changes in v2:
- add comment from Stephen Warren
sort import statements

 test/py/u_boot_utils.py | 1 +
 1 file changed, 1 insertion(+)
test/py/u_boot_utils.py +1 -0
index 72d24e4..9d243e0 100644
@@ -7,6 +7,7 @@
 import hashlib
 import os
 import os.path
+import pytest
 import sys
 import time
 
Signature · 1 line
2.5.5
#1 lore raw

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

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/20160513/adebec87/attachment.sig>