diff mbox

[U-Boot] test/py: fix NameError exception if bdi cmd is not supported

Message ID 1462512831-29758-1-git-send-email-hs@denx.de
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Heiko Schocher May 6, 2016, 5:33 a.m. UTC
test/py raises an error, if a board has not enabled bdi command

>           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.

Signed-off-by: Heiko Schocher <hs@denx.de>
---
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(+)

Comments

Stephen Warren May 6, 2016, 3:25 p.m. UTC | #1
On 05/05/2016 11:33 PM, Heiko Schocher wrote:
> test/py raises an error, if a board has not enabled bdi command
>
>>            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.

Reviewed-by: Stephen Warren <swarren@nvidia.com>

Nit: The import statements were sorted before this patch.
Tom Rini May 30, 2016, 5:56 p.m. UTC | #2
On Fri, May 06, 2016 at 07:33:51AM +0200, Heiko Schocher wrote:

> test/py raises an error, if a board has not enabled bdi command
> 
> >           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.
> 
> Signed-off-by: Heiko Schocher <hs@denx.de>
> Reviewed-by: Stephen Warren <swarren@nvidia.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/test/py/u_boot_utils.py b/test/py/u_boot_utils.py
index 72d24e4..1d7b12a 100644
--- a/test/py/u_boot_utils.py
+++ b/test/py/u_boot_utils.py
@@ -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.