aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2017-06-21 16:42:43 +0100
committerPeter Maydell <peter.maydell@linaro.org>2017-06-29 12:12:02 +0100
commit993043f7ce4a7fa7d7f0dc61ffdce8156de0645b (patch)
treedb690d94d8bcecfe28f4874ba4ee13a6f119f629
parent411eea9bf6a1263d476944edfacd2ea2fc2ea4d5 (diff)
new: record_traces.sh helper script
A simple script to run through a bunch of binaries and generate their trace files. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 20170621154244.28309-10-alex.bennee@linaro.org Reviewed-by: Peter Maydell <peter.maydell@linaro.org> [PMM: fixed checkpatch nit] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rwxr-xr-xcontrib/record_traces.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/contrib/record_traces.sh b/contrib/record_traces.sh
new file mode 100755
index 0000000..5c30b3e
--- /dev/null
+++ b/contrib/record_traces.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+#
+# A risu helper script to batch process a bunch of binaries
+# and record their outputs.
+#
+# 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 <alex.bennee@linaro.org> - initial implementation
+#
+# Usage:
+# export RISU=/path/to/risu
+# ./record_traces.sh ./testcases.aarch64/*.bin
+#
+
+set -e
+
+if test -z "$RISU"; then
+ script_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)
+ RISU=${script_dir}/risu
+fi
+
+for f in $@; do
+ echo "Running risu against $f"
+ t="$f.trace"
+ ${RISU} --master $f -t $t
+ echo "Checking trace file OK"
+ ${RISU} $f -t $t
+done