On Wed, 24 May 2023 at 18:38, Richard Henderson
<richard.hender...@linaro.org> wrote:
>
> We currently print FAIL for the failure of a succ_* test, but don't
> return a failure exit code.  Instead, convert the script to emit
> Test Anything Protocol, which gives visibility into each subtest
> as well as not relying on exit codes.
>
> Suggested-by: Paolo Bonzini <pbonz...@redhat.com>
> Signed-off-by: Richard Henderson <richard.hender...@linaro.org>
> ---
>  tests/decode/check.sh | 36 ++++++++++++++++++++++++++----------
>  tests/meson.build     |  1 +
>  2 files changed, 27 insertions(+), 10 deletions(-)
>
> diff --git a/tests/decode/check.sh b/tests/decode/check.sh
> index 95445a0115..a3d879a099 100755
> --- a/tests/decode/check.sh
> +++ b/tests/decode/check.sh
> @@ -4,21 +4,37 @@
>
>  PYTHON=$1
>  DECODETREE=$2
> -E=0
> +E_FILES=`echo err_*.decode`
> +S_FILES=`echo succ_*.decode`

If you run shellcheck on this script it produces some
style complaints. Notably:

 * $(...) is better than `...`
 * j=$(($j + 1))  is better than j=`expr $j + 1`

At least some of its "missing quoting" complaints are
also legitimate, notably on $PYTHON and $DECODETREE.

thanks
-- PMM

Reply via email to