diff mbox

[v1,5/8] contrib/run_risu.sh: allow appending of QEMU_FLAGS

Message ID 20180223154613.2096-6-alex.bennee@linaro.org (mailing list archive)
State New, archived
Headers show

Commit Message

Alex Bennée Feb. 23, 2018, 3:46 p.m. UTC
Useful if you want to disable a feature for your run. For example:

  set -x QEMU_FLAGS "-cpu fp16=off"

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 contrib/run_risu.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Peter Maydell Feb. 23, 2018, 6:12 p.m. UTC | #1
On 23 February 2018 at 15:46, Alex Bennée <alex.bennee@linaro.org> wrote:
> Useful if you want to disable a feature for your run. For example:
>
>   set -x QEMU_FLAGS "-cpu fp16=off"
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  contrib/run_risu.sh | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/contrib/run_risu.sh b/contrib/run_risu.sh
> index 439cd36..63649dd 100755
> --- a/contrib/run_risu.sh
> +++ b/contrib/run_risu.sh
> @@ -13,6 +13,7 @@
>  #
>  # Usage:
>  #   (optional) export QEMU=/path/to/qemu
> +#   (optional) export QEMU_FLAGS="-cpu any,fp16=off"
>  #   (optional) export RISU=/path/to/risu
>  #   ./run_risu.sh  ./testcases.aarch64/*.bin
>
> @@ -29,9 +30,10 @@ fi
>
>  for f in $@; do
>      t="$f.trace"
> -    echo "Running $f against $t"
> +    CMD="${QEMU} ${QEMU_FLAGS} ${RISU} $f -t $t"
> +    echo "Running: ${CMD}"
>      if [ -e $t ]; then
> -        ${QEMU} ${RISU} $f -t $t
> +        ${CMD}

Well, you used to be able to do this by setting
QEMU="path/to/qemu -cpu whatever", but now you can't :-)

thanks
-- PMM
diff mbox

Patch

diff --git a/contrib/run_risu.sh b/contrib/run_risu.sh
index 439cd36..63649dd 100755
--- a/contrib/run_risu.sh
+++ b/contrib/run_risu.sh
@@ -13,6 +13,7 @@ 
 #
 # Usage:
 #   (optional) export QEMU=/path/to/qemu
+#   (optional) export QEMU_FLAGS="-cpu any,fp16=off"
 #   (optional) export RISU=/path/to/risu
 #   ./run_risu.sh  ./testcases.aarch64/*.bin
 
@@ -29,9 +30,10 @@  fi
 
 for f in $@; do
     t="$f.trace"
-    echo "Running $f against $t"
+    CMD="${QEMU} ${QEMU_FLAGS} ${RISU} $f -t $t"
+    echo "Running: ${CMD}"
     if [ -e $t ]; then
-        ${QEMU} ${RISU} $f -t $t
+        ${CMD}
         if [ $? == 0 ]; then
             passed=( "${passed[@]}" $f )
         else