From patchwork Wed Nov 18 03:20:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Warren X-Patchwork-Id: 545856 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 A8A87141448 for ; Wed, 18 Nov 2015 14:21:34 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 116204B861; Wed, 18 Nov 2015 04:21:12 +0100 (CET) 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 VC-fwBjVlovh; Wed, 18 Nov 2015 04:21:11 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 58DE54B862; Wed, 18 Nov 2015 04:20:59 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B42FB4B7F5 for ; Wed, 18 Nov 2015 04:20:24 +0100 (CET) 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 8IIpeDMAynQI for ; Wed, 18 Nov 2015 04:20:24 +0100 (CET) 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 avon.wwwdotorg.org (avon.wwwdotorg.org [70.85.31.133]) by theia.denx.de (Postfix) with ESMTPS id 6F9EE4B7EF for ; Wed, 18 Nov 2015 04:20:24 +0100 (CET) Received: from severn.wwwdotorg.org (unknown [192.168.65.5]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by avon.wwwdotorg.org (Postfix) with ESMTPS id CAA976704; Tue, 17 Nov 2015 20:19:56 -0700 (MST) Received: from dart.wwwdotorg.org (localhost [127.0.0.1]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by severn.wwwdotorg.org (Postfix) with ESMTPSA id 943BDE5422; Tue, 17 Nov 2015 20:20:18 -0700 (MST) From: Stephen Warren To: Tom Rini Date: Tue, 17 Nov 2015 20:20:03 -0700 Message-Id: <1447816804-6312-6-git-send-email-swarren@wwwdotorg.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1447816804-6312-1-git-send-email-swarren@wwwdotorg.org> References: <1447816804-6312-1-git-send-email-swarren@wwwdotorg.org> X-NVConfidentiality: public X-Virus-Scanned: clamav-milter 0.98.6 at avon.wwwdotorg.org X-Virus-Status: Clean Cc: u-boot@lists.denx.de, Stephen Warren Subject: [U-Boot] [PATCH 5/6] test/py: replace cmd_repeat.sh with Python 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" From: Stephen Warren This moves this test into the new infra-structure, and also allows it to work on real hardware, not just sandbox. Signed-off-by: Stephen Warren Reviewed-by: Tom Rini --- test/cmd_repeat.sh | 29 ----------------------------- test/py/test_md.py | 10 ++++++++++ 2 files changed, 10 insertions(+), 29 deletions(-) delete mode 100755 test/cmd_repeat.sh diff --git a/test/cmd_repeat.sh b/test/cmd_repeat.sh deleted file mode 100755 index 990e79900f47..000000000000 --- a/test/cmd_repeat.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -# Test for U-Boot cli including command repeat - -BASE="$(dirname $0)" -. $BASE/common.sh - -run_test() { - ./${OUTPUT_DIR}/u-boot <${tmp} -check_results ${tmp} -rm ${tmp} -echo "Test passed" diff --git a/test/py/test_md.py b/test/py/test_md.py index 49cdd2685234..9667fd4f2217 100644 --- a/test/py/test_md.py +++ b/test/py/test_md.py @@ -10,3 +10,13 @@ def test_md(uboot_console): uboot_console.run_command("mw " + addr + " " + val) response = uboot_console.run_command("md " + addr + " 10") assert(expected_response in response) + +@pytest.mark.buildconfigspec("cmd_memory") +def test_md_repeat(uboot_console): + addr_base = "%08x" % uboot_console.config.ram_base + words = 0x10 + addr_repeat = "%08x" % (uboot_console.config.ram_base + (words * 4)) + uboot_console.run_command("md %s %x" % (addr_base, words)) + response = uboot_console.run_command("") + expected_response = addr_repeat + ": " + assert(expected_response in response)