diff mbox

[RISU,v4,09/10] new: record_traces.sh helper script

Message ID 20170602160848.4913-10-alex.bennee@linaro.org
State New
Headers show

Commit Message

Alex Bennée June 2, 2017, 4:08 p.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>

---
v3
  - allow overriding of RISU binary
---
 record_traces.sh | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100755 record_traces.sh

Comments

Peter Maydell June 6, 2017, 1:47 p.m. UTC | #1
On 2 June 2017 at 17:08, 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>
>
> ---
> v3
>   - allow overriding of RISU binary
> ---
>  record_traces.sh | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
>  create mode 100755 record_traces.sh
>
> diff --git a/record_traces.sh b/record_traces.sh
> new file mode 100755
> index 0000000..78ce47f
> --- /dev/null
> +++ b/record_traces.sh
> @@ -0,0 +1,20 @@
> +#!/bin/sh
> +#
> +# Record traces
> +#
> +# A risu helper script to batch process a bunch of binaries and record their outputs
> +#

Can we have a license statement, copyright line and a
usage summary, please? (Ditto patch 10). I'm not sure if
these scripts are intended for testing purposes or as
something that risu users might want to use -- if the
latter then also documenting them in README would be
a good idea.

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

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

> On 2 June 2017 at 17:08, 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>
>>
>> ---
>> v3
>>   - allow overriding of RISU binary
>> ---
>>  record_traces.sh | 20 ++++++++++++++++++++
>>  1 file changed, 20 insertions(+)
>>  create mode 100755 record_traces.sh
>>
>> diff --git a/record_traces.sh b/record_traces.sh
>> new file mode 100755
>> index 0000000..78ce47f
>> --- /dev/null
>> +++ b/record_traces.sh
>> @@ -0,0 +1,20 @@
>> +#!/bin/sh
>> +#
>> +# Record traces
>> +#
>> +# A risu helper script to batch process a bunch of binaries and record their outputs
>> +#
>
> Can we have a license statement, copyright line and a
> usage summary, please? (Ditto patch 10). I'm not sure if
> these scripts are intended for testing purposes or as
> something that risu users might want to use -- if the
> latter then also documenting them in README would be
> a good idea.

They are more useful scripts I used for bulk generating stuff. Maybe I
should move them into contrib?

I'll update the usage and copyright lines.

>
>> +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
>> --
>> 2.13.0
>
> thanks
> -- PMM


--
Alex Bennée
diff mbox

Patch

diff --git a/record_traces.sh b/record_traces.sh
new file mode 100755
index 0000000..78ce47f
--- /dev/null
+++ b/record_traces.sh
@@ -0,0 +1,20 @@ 
+#!/bin/sh
+#
+# Record traces
+#
+# A risu helper script to batch process a bunch of binaries and record their outputs
+#
+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