[PATCH 3/3] test-lib.sh: support -x option for shell-tracing

2014-10-10 Thread Jeff King
Usually running a test under -v makes it clear which command is failing. However, sometimes it can be useful to also see a complete trace of the shell commands being run in the test. You can do so without any support from the test suite by running sh -x t-foo.sh. However, this produces quite a

Re: [PATCH 3/3] test-lib.sh: support -x option for shell-tracing

2014-10-10 Thread Jeff King
On Fri, Oct 10, 2014 at 02:13:55AM -0400, Jeff King wrote: Having finally figured out how to drop the set +x from the output, I have noticed that I kind of liked the test_eval_ret=$? part of the trace (which is now gone, too), because it pretty explicitly tells you that the last traced

Re: [PATCH 3/3] test-lib.sh: support -x option for shell-tracing

2014-10-10 Thread Jeff King
On Fri, Oct 10, 2014 at 02:13:55AM -0400, Jeff King wrote: + -x) + test_eval_start_='set -x' [...] + eval $test_eval_start_ $* +} Hmph. I had originally intended to make this set -x; with a semicolon, to keep it split from $*. But I forgot to, and much to my surprise,