[pkg-bacula-devel] autopkgtest: A choice to be made
sven at svenhartge.de
Sun Nov 25 16:06:31 GMT 2018
On 25.11.18 16:26, Sven Hartge wrote:
> On 25.11.18 15:38, Sven Hartge wrote:
>> On 24.11.18 19:25, Carsten Leonhardt wrote:
>>> there may be a way to redirect messages correctly, but straightforward
>>> and easy to understand would be to use echo (maybe a function
>>> "exec_verbose" that first prints the command line and then executes
>> The solution is this here:
>> trap 'echo "$BASH_COMMAND"' DEBUG
>> I am testing a variant of this in my personal git space and will
>> implement it in the autopkgtest branch once it proves to be working.
> Yes, this works very nice and gives us the best of both worlds: a bit
> more verbosity while running the tests and also the ability to fail on
> output to STDERR, which would have caught my error before releasing a
> new package.
> I've updated the autopkgtest branch accordingly.
I found an even better solution, using BASH_XTRACEFD to redirect the
xtrace output to STDOUT. But it only works on "set -x" and not "set -v".
Plus: This will properly expand all variables.
Con: The output is a bit more noisy.
But I think the benefits outweigh the negatives here.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: OpenPGP digital signature
More information about the pkg-bacula-devel