From patchwork Wed Jun 21 15:42:44 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: 106108 Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp1997857qgd; Wed, 21 Jun 2017 08:50:35 -0700 (PDT) X-Received: by 10.200.3.222 with SMTP id z30mr2073163qtg.185.1498060235793; Wed, 21 Jun 2017 08:50:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498060235; cv=none; d=google.com; s=arc-20160816; b=VYvZarm2u0ZJR9sk5G58aZI63lB8xz3cwZaYqVL/H7cnI3yFCYxyeYWTTN4OIO/+Es /wMvGuqLrkWa7pD8aHMFUypzOJ7eOiHY3AJ5vZSTzE9JHsYLWJ8V1I7dCadv+zIkGmON AbPJDrBl5GrlbFuHPUqH7a4yNrV99JWSgw/1bRQ8N5YWpQYgnRUUZoGqXrPxkIsNSVuX MqHU274lJGjpmEH9Rren1X7EwkDNoRF6CvM1fjtrMpBAQ41CI/v6lclLi4zuJcKfFsTS 9x1AqW2hDIA2M3J63iBvT162ZS4LKBris/ptiMBmG+5KjfKqalmAMb4voYom+kAtdBAT jsgw== 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=TS8I+7Fd2WGVDf15A4Nyo0UTKamV+GqrLlmrO6dVpaM=; b=KAkUVfrDz/KtK0wd7rH/urDTcWsjsCGIilaB/eGrQTwXSX4prCtlwTqdSsMBye1UFv VPkA6xzpkUg2xn+a6O3chfCP3SjRmdfyRPB17cUDIeu+JT+pJe7PsB9EPrj1v4nXpxST ezWbNOhYLCzWSCkUPNlvKHeL3nh5KempxxIkB1G7uS6U4tdiYGqifEbtHZi0sg3TGWx3 Zroq7jST8Qx/6fMb45WNQ3c7ojQSZLUpcheX8Wn4SgVUYUIl8OtJZY1BepNf4EAewlsX uWTMGdtTKPUbD+sAsp2gPq779ZWuAIDEIP/oApILfkVVZeLPnBJW2vD1zlXH7BPbZqeC nBuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.b=dvilbpLP; 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 q51si15025256qtc.220.2017.06.21.08.50.35 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 21 Jun 2017 08:50:35 -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 header.b=dvilbpLP; 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]:54778 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNhtp-0005nr-BQ for patch@linaro.org; Wed, 21 Jun 2017 11:50:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52538) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNhls-0006Iq-1J for qemu-devel@nongnu.org; Wed, 21 Jun 2017 11:42:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNhlr-0002sv-0y for qemu-devel@nongnu.org; Wed, 21 Jun 2017 11:42:20 -0400 Received: from mail-wr0-x230.google.com ([2a00:1450:400c:c0c::230]:33594) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dNhlq-0002sP-RL for qemu-devel@nongnu.org; Wed, 21 Jun 2017 11:42:18 -0400 Received: by mail-wr0-x230.google.com with SMTP id r103so140136018wrb.0 for ; Wed, 21 Jun 2017 08:42:18 -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=TS8I+7Fd2WGVDf15A4Nyo0UTKamV+GqrLlmrO6dVpaM=; b=dvilbpLPd943omd8FNXlrfxRjjoRFU+qd6aBl8xKu1qGIKwdv6wCrl+8Fq86ssuUfS AZFXC63HF6zULAnnyf6EIqrbp8qEM7iVV57a9cUX2ova9VnF4+srw/dlK9ue3yXozt47 P1m7UEMQSpa8Pg1kt2EN4My6mgg1ryAvb9Bys= 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=TS8I+7Fd2WGVDf15A4Nyo0UTKamV+GqrLlmrO6dVpaM=; b=Zlywn9p2ccQ7zTrEwtcxYtzy4peGy4NT9sSF0rI0ys465pSBltZxyWqtPMWWC5jrpu r/lX/zBRQK8fkt5EKF2gjaZXKEb9AHszTM0IOmbVQyuEfB/uC8YfHlplveQMulvg3+9v 5mqmJUuMNZRABhdk+t5KxT+6aPSkiMmDmM4ABoU/a3cCSkDXJe/nM7wlMvbCZ7nnfRHO mK6jdWjxYUtEF33NE3/3r2QM3MKevplMOms+3+jbN27E1bJjGy93+EO9Dswt/RUvGueg 0/BO1l175UzbDw9amzRzjuCakX82xkYcXBXh9XBJSvkQWDhg6mJfveOydV7txt7ndUOA zWfg== X-Gm-Message-State: AKS2vOxOS0f71lzA57ynaqEtZJjRotusm/UVDfrFETV28OY2niCk9ijm OcGJFMohZTDPLYlY X-Received: by 10.223.128.80 with SMTP id 74mr25291492wrk.9.1498059737782; Wed, 21 Jun 2017 08:42:17 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id u18sm13460209wrc.14.2017.06.21.08.42.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Jun 2017 08:42:12 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 8FEA63E0FA1; Wed, 21 Jun 2017 16:42:51 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Wed, 21 Jun 2017 16:42:44 +0100 Message-Id: <20170621154244.28309-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170621154244.28309-1-alex.bennee@linaro.org> References: <20170621154244.28309-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:c0c::230 Subject: [Qemu-devel] [RISU PATCH v6 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 --- v6 - moved into contrib/ v5 - author, license, usage header v3 - tweak to allow specifying RISU binary --- contrib/run_risu.sh | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100755 contrib/run_risu.sh -- 2.13.0 diff --git a/contrib/run_risu.sh b/contrib/run_risu.sh new file mode 100755 index 0000000..439cd36 --- /dev/null +++ b/contrib/run_risu.sh @@ -0,0 +1,66 @@ +#!/bin/bash +# +# Run risu against a set of binaries + trace files +# +# Copyright (c) 2017 Linaro Limited +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Alex Bennée - initial implementation +# +# Usage: +# (optional) export QEMU=/path/to/qemu +# (optional) export RISU=/path/to/risu +# ./run_risu.sh ./testcases.aarch64/*.bin + +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[@]}