From patchwork Fri May 6 05:33:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Schocher X-Patchwork-Id: 619141 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3r1L756lYcz9t43 for ; Fri, 6 May 2016 15:34:08 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 65327A754E; Fri, 6 May 2016 07:34:03 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kg1cG--IaWVZ; Fri, 6 May 2016 07:34:03 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 836DBA74E0; Fri, 6 May 2016 07:34:02 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 41952A74E0 for ; Fri, 6 May 2016 07:34:00 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EutQvQu7sAm8 for ; Fri, 6 May 2016 07:34:00 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from pollux.denx.de (host-82-135-33-74.customer.m-online.net [82.135.33.74]) by theia.denx.de (Postfix) with ESMTP id D01E8A74A8 for ; Fri, 6 May 2016 07:33:55 +0200 (CEST) Received: by pollux.denx.de (Postfix, from userid 515) id 8F2241FEE; Fri, 6 May 2016 07:33:53 +0200 (CEST) From: Heiko Schocher To: u-boot@lists.denx.de Date: Fri, 6 May 2016 07:33:51 +0200 Message-Id: <1462512831-29758-1-git-send-email-hs@denx.de> X-Mailer: git-send-email 2.5.5 Cc: Stephen Warren Subject: [U-Boot] [PATCH] test/py: fix NameError exception if bdi cmd is not supported X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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 Reviewed-by: Stephen Warren --- 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(+) 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.