From: "Alex Bennée" <alex.bennee@linaro.org>
To: peter.maydell@linaro.org
Cc: qemu-devel@nongnu.org, "Alex Bennée" <alex.bennee@linaro.org>
Subject: [Qemu-devel] [RISU PATCH v4 10/10] new: run_risu.sh script
Date: Fri, 2 Jun 2017 17:08:48 +0100 [thread overview]
Message-ID: <20170602160848.4913-11-alex.bennee@linaro.org> (raw)
In-Reply-To: <20170602160848.4913-1-alex.bennee@linaro.org>
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 <alex.bennee@linaro.org>
---
v3
- tweak to allow specifying RISU binary
---
run_risu.sh | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)
create mode 100755 run_risu.sh
diff --git a/run_risu.sh b/run_risu.sh
new file mode 100755
index 0000000..7740d6f
--- /dev/null
+++ b/run_risu.sh
@@ -0,0 +1,53 @@
+#!/bin/bash
+#
+# Run risu against a set of binaries + trace files
+#
+#
+#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[@]}
--
2.13.0
prev parent reply other threads:[~2017-06-02 16:08 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-02 16:08 [Qemu-devel] [RISU PATCH v4 00/10] record/replay patches Alex Bennée
2017-06-02 16:08 ` [Qemu-devel] [RISU PATCH v4 01/10] .gitignore: ignore build directories Alex Bennée
2017-06-06 9:51 ` Peter Maydell
2017-06-02 16:08 ` [Qemu-devel] [RISU PATCH v4 02/10] build-all-archs: support cross building via docker Alex Bennée
2017-06-02 16:08 ` [Qemu-devel] [RISU PATCH v4 03/10] build-all-archs: support --static flag Alex Bennée
2017-06-02 16:08 ` [Qemu-devel] [RISU PATCH v4 04/10] risu: a bit more verbosity when running Alex Bennée
2017-06-06 9:55 ` Peter Maydell
2017-06-02 16:08 ` [Qemu-devel] [RISU PATCH v4 05/10] risu: paramterise send/receive functions Alex Bennée
2017-06-06 9:57 ` Peter Maydell
2017-06-06 10:13 ` Alex Bennée
2017-06-06 11:37 ` Peter Maydell
2017-06-02 16:08 ` [Qemu-devel] [RISU PATCH v4 06/10] risu: add header to trace stream Alex Bennée
2017-06-02 16:08 ` [Qemu-devel] [RISU PATCH v4 07/10] risu: add simple trace and replay support Alex Bennée
2017-06-06 13:39 ` Peter Maydell
2017-06-06 14:19 ` Alex Bennée
2017-06-06 14:32 ` Peter Maydell
2017-06-02 16:08 ` [Qemu-devel] [RISU PATCH v4 08/10] risu: add support compressed tracefiles Alex Bennée
2017-06-06 13:45 ` Peter Maydell
2017-06-06 14:24 ` Alex Bennée
2017-06-02 16:08 ` [Qemu-devel] [RISU PATCH v4 09/10] new: record_traces.sh helper script Alex Bennée
2017-06-06 13:47 ` Peter Maydell
2017-06-06 14:25 ` Alex Bennée
2017-06-02 16:08 ` Alex Bennée [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170602160848.4913-11-alex.bennee@linaro.org \
--to=alex.bennee@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).