[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RISU PATCH v6 10/10] new: run_risu.sh script
From: |
Alex Bennée |
Subject: |
[Qemu-devel] [RISU PATCH v6 10/10] new: run_risu.sh script |
Date: |
Wed, 21 Jun 2017 16:42:44 +0100 |
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 <address@hidden>
---
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 <address@hidden> - 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=( "address@hidden" $f )
+ else
+ failed=( "address@hidden" $f )
+ fi
+ else
+ missing=( "address@hidden" $f )
+ fi
+done
+
+if test address@hidden -gt 0; then
+ echo "Tests missing address@hidden trace files:"
+ for m in "address@hidden"; do
+ echo "$m"
+ done
+fi
+
+if test address@hidden -gt 0; then
+ echo "Passed address@hidden tests:"
+ for p in "address@hidden"; do
+ echo "$p"
+ done
+fi
+
+if test address@hidden -gt 0; then
+ echo "Failed address@hidden tests:"
+ for f in "address@hidden"; do
+ echo "$f"
+ done
+fi
+
+exit address@hidden
--
2.13.0
- [Qemu-devel] [RISU PATCH v6 02/10] build-all-archs: support cross building via docker, (continued)
- [Qemu-devel] [RISU PATCH v6 04/10] risu: paramterise send/receive functions, Alex Bennée, 2017/06/21
- [Qemu-devel] [RISU PATCH v6 01/10] README: document the coding style used for risu, Alex Bennée, 2017/06/21
- [Qemu-devel] [RISU PATCH v6 03/10] risu: a bit more verbosity when starting, Alex Bennée, 2017/06/21
- [Qemu-devel] [RISU PATCH v6 07/10] risu: handle trace through stdin/stdout, Alex Bennée, 2017/06/21
- [Qemu-devel] [RISU PATCH v6 06/10] risu: add simple trace and replay support, Alex Bennée, 2017/06/21
- [Qemu-devel] [RISU PATCH v6 05/10] risu: add header to trace stream, Alex Bennée, 2017/06/21
- [Qemu-devel] [RISU PATCH v6 10/10] new: run_risu.sh script,
Alex Bennée <=
- [Qemu-devel] [RISU PATCH v6 08/10] risu: add support compressed tracefiles, Alex Bennée, 2017/06/21
- [Qemu-devel] [RISU PATCH v6 09/10] new: record_traces.sh helper script, Alex Bennée, 2017/06/21
- Re: [Qemu-devel] [RISU PATCH v6 00/10] Record/replay patches, Peter Maydell, 2017/06/29