From patchwork Mon Jun 19 10:46:55 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: 105820 Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp810304qgd; Mon, 19 Jun 2017 03:50:43 -0700 (PDT) X-Received: by 10.31.223.129 with SMTP id w123mr12787754vkg.84.1497869443724; Mon, 19 Jun 2017 03:50:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497869443; cv=none; d=google.com; s=arc-20160816; b=t2pXEPHHNymCYoBzfYI5V2GGE0Kx5DfyEXBn8akwZl3790fRnTmG7EVeNoYZclLApr NczBvfH44XMp/OZgX6uu7gJ+V/iKize+QL7AVWjjcLGeeRes6RmBuCPaAJNI3toDFgyC rBNZ3D6oXvgFgGF6NlmpQoZq/ds41c1sxOoN48V0MWre2f//FFhHkszZhLPGlwgbHr4y LJDRCGSC63RFZt0OmivCKVeqMmt/YKkmeg4sqbmw9iiqCvZGFsmzYCdxuFeY8Py9roBX MbBudBvJ85J/MPYEBI8HPnTBeRzR2giB9WyOPIiAkKS0kOA07FZBhf2AyHH1ANMnKCZ+ KkWg== 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=1Ok/BKHGAzCqK7vI7/u/MjjM5SPi7nSgtGgFSdHiU/U=; b=ZmJvzpEhCRf/aKrcvf3VmYSsSiYWeRbTX3v9TJzzSEMIqRw5T0ZMGjlLTJiPxaVUzr WwFk7JzorDqgOaf+qeyJLffhpGclneXYm/UaHALulOdMH0STQNvOfsoWlqQ5tVeoGnSx ThcMSsaJCT1d3dSjQlBkc3sf/QBue82/EWA2zd9H1LXlKRD0a+RnDUWea/BMWUIpSum3 IHsx9roDN308iWTJU+brAoZViHfmAIyIy2kNl9XK+X8I+I69wEiLGoUnpHjIvKv+Ux4f Wyo4yaRVl8MCGt/BHNqnBkCJRsg5wRZUArtXCsY3v5rfg1pRrmTTjtVVz9yZ2IVlI3AN eEBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.b=cgzwW5ln; 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 l22si4754560uah.284.2017.06.19.03.50.43 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 19 Jun 2017 03:50:43 -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=cgzwW5ln; 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]:41665 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMuGZ-0002WJ-82 for patch@linaro.org; Mon, 19 Jun 2017 06:50:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40785) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMuCa-0007Tl-MC for qemu-devel@nongnu.org; Mon, 19 Jun 2017 06:46:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dMuCW-0004xP-Ah for qemu-devel@nongnu.org; Mon, 19 Jun 2017 06:46:36 -0400 Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]:35197) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dMuCW-0004wG-4W for qemu-devel@nongnu.org; Mon, 19 Jun 2017 06:46:32 -0400 Received: by mail-wm0-x235.google.com with SMTP id x70so75454190wme.0 for ; Mon, 19 Jun 2017 03:46:31 -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=1Ok/BKHGAzCqK7vI7/u/MjjM5SPi7nSgtGgFSdHiU/U=; b=cgzwW5lnlIDP8xuBwl67KwTJhtqVP6UUyL126k+nv/3ekSjL80SVi3EOUVp6p8huv1 kSX0ZUlKuAUC7mfSBfe+Xnuof/x8WlCHoSfwO/uMmH4ZSSfn1V+XhJ2JrNFmVnFgDDWc 9tvZW6scoA1pDfn1+yB7iAaFvLUNuksakeiJ8= 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=1Ok/BKHGAzCqK7vI7/u/MjjM5SPi7nSgtGgFSdHiU/U=; b=arUcf4SDTd0MFtQ6JjT/ohN3TlEbYCI5i7+Od72FhA98Whic0aRNfa3cVP2gdRgLBv 4M1ZotkOn4A0hp2qpzA42VteoYrBcvUpsT8+oxiJjkxIgfbpfKjSxgF8e61M4XWcqd/g j51GU3hHMtp6mQqJ1R6642GzpyCVlxar2lMXKGVmAjEQWLZLyfHp5m21ktdJKhAV9xst UDyFy4OUQvOo288WZfnhT7PjJVS1urt/KIJALrSZaoFr7wQy3BMvyyKOxDNlW7GNCzFS RxwP/2OUTk0FFe3g655Lmxq9oS7HRkcV02JUcmBJWPufR+7M+LERVjtYIqDQJHeyCsiI 6WxQ== X-Gm-Message-State: AKS2vOwPF89bPA+f3frJPg+T82aYChua157MmbGo8tRNzPQwWjhO+jKW RZIUi4fpIOw5UOg9 X-Received: by 10.28.236.134 with SMTP id h6mr14600755wmi.1.1497869191010; Mon, 19 Jun 2017 03:46:31 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id a128sm8612423wmh.8.2017.06.19.03.46.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Jun 2017 03:46:26 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 9BA2E3E0CEF; Mon, 19 Jun 2017 11:47:00 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Mon, 19 Jun 2017 11:46:55 +0100 Message-Id: <20170619104655.31104-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170619104655.31104-1-alex.bennee@linaro.org> References: <20170619104655.31104-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::235 Subject: [Qemu-devel] [RISU PATCH v5 13/13] 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 --- v5 - author, license, usage header v3 - tweak to allow specifying RISU binary --- run_risu.sh | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 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..439cd36 --- /dev/null +++ b/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[@]}