Received: from eggs.gnu.org ([2001:4830:134:3::10]:60613) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cCqFf-00034T-Lu for qemu-devel@nongnu.org; Fri, 02 Dec 2016 10:59:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cCqFb-00051M-M7 for qemu-devel@nongnu.org; Fri, 02 Dec 2016 10:59:55 -0500 Received: from mail-wj0-x230.google.com ([2a00:1450:400c:c01::230]:34093) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cCqFb-00050h-Ez for qemu-devel@nongnu.org; Fri, 02 Dec 2016 10:59:51 -0500 Received: by mail-wj0-x230.google.com with SMTP id mp19so236247307wjc.1 for ; Fri, 02 Dec 2016 07:59:51 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Fri, 2 Dec 2016 15:59:35 +0000 Message-Id: <20161202155935.3130-10-alex.bennee@linaro.org> In-Reply-To: <20161202155935.3130-1-alex.bennee@linaro.org> References: <20161202155935.3130-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [RISU PATCH 9/9] new: run_risu.sh script List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: peter.maydell@linaro.org Cc: qemu-devel@nongnu.org, joserz@linux.vnet.ibm.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= 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 --- run_risu.sh | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100755 run_risu.sh diff --git a/run_risu.sh b/run_risu.sh new file mode 100755 index 0000000..8a91e1a --- /dev/null +++ b/run_risu.sh @@ -0,0 +1,51 @@ +#!/bin/bash +# +# Run risu against a set of binaries + trace files +# +# +#set -e + +passed=() +failed=() +missing=() + +script_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P) +risu_path=${script_dir}/risu + +for f in $@; do + t="$f.trace" + echo "Running $f against $t" + if [ -e $t ]; then + ${QEMU} ${risu_path} $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[@]} -- 2.10.2