From patchwork Fri Jun 2 16:08:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 101290 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp480181qge; Fri, 2 Jun 2017 09:21:59 -0700 (PDT) X-Received: by 10.200.53.51 with SMTP id y48mr665615qtb.98.1496420519093; Fri, 02 Jun 2017 09:21:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496420519; cv=none; d=google.com; s=arc-20160816; b=wOrRIQkBR55LuDsnrlCFLX4bnVoas9UV7cnrWiGllG2czh0NWuFMCNV6p9fi3CcVGK o/DXmPUj1LothpDnSCpSRDoYPisHZP8ULFb+2aCxnMdN7xeYm/4eqMjNaqyMrbKni166 BZnAmWgqF+buU9mq4ZkfpNmMFd48pm2g71X3m4ElRlkMOHGw7902R9WsN70eaoisSwd0 gYOsKpSK25pFJHE0u3wXK1ss6yT/oiWKqR/Y5nnWBcGp42e+5r7lCT1q5dTgm/NZaQBL rqNublCP8OUaNHxXSb/3J8vJFmqrXGVOhjlXeaqoPOz9t4oxAlPYlHAwiP30RBvahLUn vj3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=kVUVMW/AsmLeYm1c7h4wJg2rsGFgMmHVI2Sldv2IKGY=; b=tZ7Kq6gYCrWHgaQk0QwtpPMmX/X2yKsZF0BZ9D/sdAAE4TcFZ0kz8KAPy7AQxWwZF8 BXQ8ETqKRjXkyH3NpPoPYCaUjDU2r68i7GzNhSUyrke+I0cfsSW4HvqRUcy13MpLYbYo +ElzjRjmdrAVS50+fdpEgsQalXw6Vl0R0PwfFQz1x4rypMwDlhzxuHt/e2p5Kxm2Uzvv vTFjseJneVBbRTwSsJmUhqEK+jhwIBqgqP1BG0knZw0Ko8k8tD4ZFJO259ZE86Gl1dGY mZ5pI8VCx6bXZT4SI1ItK1p0/dpRHxu50hBCuLjUHtDZktRvS/aXB0JZaOYjIQlZRWeW KB0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id d80si5072039qkg.202.2017.06.02.09.21.58 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 02 Jun 2017 09:21:59 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:50639 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dGpKm-00013L-Et for patch@linaro.org; Fri, 02 Jun 2017 12:21:56 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54532) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dGp84-000671-RD for qemu-devel@nongnu.org; Fri, 02 Jun 2017 12:08:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dGp82-00054t-NB for qemu-devel@nongnu.org; Fri, 02 Jun 2017 12:08:48 -0400 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]:37139) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dGp82-00054A-Gs for qemu-devel@nongnu.org; Fri, 02 Jun 2017 12:08:46 -0400 Received: by mail-wm0-x232.google.com with SMTP id d127so30559941wmf.0 for ; Fri, 02 Jun 2017 09:08:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kVUVMW/AsmLeYm1c7h4wJg2rsGFgMmHVI2Sldv2IKGY=; b=C5YKLzKQQKnisbuJhTP9Dw8NKMdFEdxxzq+Rs3+WRjbKtVNh5IyNssO/zspHYbzHE8 fpPX6bFd4GtRwya/JKayLyoSp76PGuYgqNTqLFKrbyaQsA3QRMsyhRxsnfwWtKfMXQi6 yAZ4z4ObMRnzdlq0vs9k7XtA/N7H3l1bciVBw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kVUVMW/AsmLeYm1c7h4wJg2rsGFgMmHVI2Sldv2IKGY=; b=sp4X5qKLknunkleOzKXGrVCeoGlsg6JvfX/J0x4DtPGoK+EV5viOH9+QkDUSHG2Dkl Nv2rH6+j/BGmO6VnUz3ZJNAi660dBe9ihkCawqvUYSbNT21s/GQLEzJpGGgbJzUiMGKy RY/BSfAJXbfuBDCuIm4zpcwJbxvXym3NtJAXFTC0n/HKIIh5wI6BMLpe0+HcqAAyTqHZ kUOneCJCOuI6ZhU54FNXWPGeYo3qgt/j3h1Mo4tbnPEoIlb1pgpEy8av47jBq6LtzSQj Pd1e0GodOZfxda56Jyg1nebQVgln4y++d2BHu5ccD4h6oBTD1n4/q/gA8aG2GBnGmn+u RMhg== X-Gm-Message-State: AODbwcCHiyX3POJcvK3EtVlrhev7xaAxvvEYyXTEVJT8w1A+AUNHg11s CtBQ7j3dVT7/KvW8 X-Received: by 10.28.14.205 with SMTP id 196mr41789wmo.13.1496419725444; Fri, 02 Jun 2017 09:08:45 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id a9sm43284977wrc.22.2017.06.02.09.08.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Jun 2017 09:08:41 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id C9ABC3E0488; Fri, 2 Jun 2017 17:08:54 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Fri, 2 Jun 2017 17:08:48 +0100 Message-Id: <20170602160848.4913-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170602160848.4913-1-alex.bennee@linaro.org> References: <20170602160848.4913-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::232 Subject: [Qemu-devel] [RISU PATCH v4 10/10] new: run_risu.sh script X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" A simple script to work through running all of a bunch of files with record/playback traces. Dumps a summary and the number of failed tests at the end. Signed-off-by: Alex Bennée --- v3 - tweak to allow specifying RISU binary --- run_risu.sh | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100755 run_risu.sh -- 2.13.0 diff --git a/run_risu.sh b/run_risu.sh new file mode 100755 index 0000000..7740d6f --- /dev/null +++ b/run_risu.sh @@ -0,0 +1,53 @@ +#!/bin/bash +# +# Run risu against a set of binaries + trace files +# +# +#set -e + +passed=() +failed=() +missing=() + +if test -z "$RISU"; then + script_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P) + RISU=${script_dir}/risu +fi + +for f in $@; do + t="$f.trace" + echo "Running $f against $t" + if [ -e $t ]; then + ${QEMU} ${RISU} $f -t $t + if [ $? == 0 ]; then + passed=( "${passed[@]}" $f ) + else + failed=( "${failed[@]}" $f ) + fi + else + missing=( "${missing[@]}" $f ) + fi +done + +if test ${#missing[@]} -gt 0; then + echo "Tests missing ${#missing[@]} trace files:" + for m in "${missing[@]}"; do + echo "$m" + done +fi + +if test ${#passed[@]} -gt 0; then + echo "Passed ${#passed[@]} tests:" + for p in "${passed[@]}"; do + echo "$p" + done +fi + +if test ${#failed[@]} -gt 0; then + echo "Failed ${#failed[@]} tests:" + for f in "${failed[@]}"; do + echo "$f" + done +fi + +exit ${#failed[@]}