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: 778991 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wt8Kn1W34z9ryv for ; Thu, 22 Jun 2017 01:49:49 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="dvilbpLP"; dkim-atps=neutral Received: from localhost ([::1]:54771 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNht4-0004fd-Tg for incoming@patchwork.ozlabs.org; Wed, 21 Jun 2017 11:49:46 -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=20Benn=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=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 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[@]}