qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RISU PATCH 9/9] new: run_risu.sh script


From: Alex Bennée
Subject: [Qemu-devel] [RISU PATCH 9/9] new: run_risu.sh script
Date: Fri, 2 Dec 2016 15:59:35 +0000

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>
---
 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=( "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.10.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]