@ 261102.1

160117.3 · c514368f98da1c9d1d59f6026061f81c22317eb7

Make it possible to run tests with set -x

One can now run:

make TRACE_TESTS=1 check

to get detailed output

reading declarations

tests/jqtest

@@ -1,5 +1,5 @@ #!/bin/sh -. "${0%/*}/setup"+. "${0%/*}/setup" "$@"  $VALGRIND $Q $JQ -L "$mods" --run-tests $JQTESTDIR/jq.test

tests/mantest

@@ -1,6 +1,6 @@ #!/bin/sh -. "${0%/*}/setup"+. "${0%/*}/setup" "$@"  # We set PAGER because there's a mantest for `env` that uses it. (cd $JQBASEDIR/docs && rake mantests) |

tests/onigtest

@@ -1,5 +1,5 @@ #!/bin/sh -. "${0%/*}/setup"+. "${0%/*}/setup" "$@"  $VALGRIND $Q $JQ -L "$mods" --run-tests $JQTESTDIR/onig.test

tests/optionaltest

@@ -1,5 +1,5 @@ #!/bin/sh -. "${0%/*}/setup"+. "${0%/*}/setup" "$@"  $VALGRIND $Q $JQ -L "$mods" --run-tests $JQTESTDIR/optional.test

tests/setup

@@ -2,6 +2,10 @@  # This is meant to be included by each test's shell script driver. +if [ -n "$TRACE_TESTS" ]; then+    set -x+fi+ set -eu  JQTESTDIR=$(cd "$(dirname "$0")" && pwd)

tests/shtest

@@ -1,6 +1,6 @@ #!/bin/sh -. "${0%/*}/setup"+. "${0%/*}/setup" "$@"  PATH=$JQBASEDIR:$PATH $JQBASEDIR/tests/jq-f-test.sh > /dev/null