diff mbox series

[RISU,v5,12/13] new: record_traces.sh helper script

Message ID 20170619104655.31104-13-alex.bennee@linaro.org
State Superseded
Headers show
Series RISU record/replay patches | expand

Commit Message

Alex Bennée June 19, 2017, 10:46 a.m. UTC
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>


---
v5
  - author, license and usage header
v3
  - allow overriding of RISU binary
---
 record_traces.sh | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100755 record_traces.sh

-- 
2.13.0

Comments

Peter Maydell June 20, 2017, 2:12 p.m. UTC | #1
On 19 June 2017 at 11:46, Alex Bennée <alex.bennee@linaro.org> wrote:
> 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>

>

> ---

> v5

>   - author, license and usage header

> v3

>   - allow overriding of RISU binary

> ---

>  record_traces.sh | 32 ++++++++++++++++++++++++++++++++

>  1 file changed, 32 insertions(+)

>  create mode 100755 record_traces.sh


Another one for contrib/, I think.

thanks
-- PMM
Alex Bennée June 20, 2017, 2:57 p.m. UTC | #2
Peter Maydell <peter.maydell@linaro.org> writes:

> On 19 June 2017 at 11:46, Alex Bennée <alex.bennee@linaro.org> wrote:

>> 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>

>>

>> ---

>> v5

>>   - author, license and usage header

>> v3

>>   - allow overriding of RISU binary

>> ---

>>  record_traces.sh | 32 ++++++++++++++++++++++++++++++++

>>  1 file changed, 32 insertions(+)

>>  create mode 100755 record_traces.sh

>

> Another one for contrib/, I think.


OK will do.

>

> thanks

> -- PMM



--
Alex Bennée
diff mbox series

Patch

diff --git a/record_traces.sh b/record_traces.sh
new file mode 100755
index 0000000..1234a61
--- /dev/null
+++ b/record_traces.sh
@@ -0,0 +1,32 @@ 
+#!/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