bug#35762: (No Subject)
: >"$log_file" "$@" >>"$log_file" 2>&1 I committed this change to test-driver, so it'll (finally) be in the next release. (Sorry for the long-delayed response.) (I was tempted to make the script exit unsuccessfully if either of the commands failed (e.g., add || exit 1 or some such), but I was too scared.) Thanks for the report, Karl
bug#35762: (No Subject)
On 2019-05-16, howaboutsyne...@protonmail.com wrote: > On Thursday, May 16, 2019 8:12 PM, Eric Blake wrote: [...] >> : >"$log_file" > Very cool! Thank you very much! I'll use that in my local automake > rebuild. Where can I find more information about ":" ? it seems kinda > tough to search for. The relevant standards are a good place to start: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#colon Cheers, Nick
bug#35762: (No Subject)
Sent with ProtonMail Secure Email. ‐‐‐ Original Message ‐‐‐ On Thursday, May 16, 2019 8:12 PM, Eric Blake wrote: > On 5/16/19 12:40 PM, howaboutsyne...@protonmail.com wrote: > > > A possible fix, or mitigation, based on the answer by John Bollinger[1] > > follows. I have tested this to work[2] even though it requires changes[2] > > in the program that created the test(s) executables and that program is > > 'check' - A unit testing framework for C [3]. > > [1] https://stackoverflow.com/a/56168216/11509478 > > [2] https://github.com/libcheck/check/issues/188#issuecomment-493161758 > > [3] https://github.com/libcheck/check > > --- /tmp/test-driver 2018-09-18 15:06:54.0 +0200 > > +++ /usr/share/automake-1.16/test-driver 2019-05-16 17:58:09.690988983 +0200 > > @@ -104,7 +104,8 @@ trap "st=141; $do_exit" 13 > > trap "st=143; $do_exit" 15 > > > > Test script is run here. > > > > = > > > > -"$@" >$log_file 2>&1 > > +echo -n "" >"$log_file" > > 'echo -n' is non-portable, but since all you are doing is using it to > create an empty file, it's simpler to just: > > : >"$log_file" Very cool! Thank you very much! I'll use that in my local automake rebuild. Where can I find more information about ":" ? it seems kinda tough to search for. PS: Sorry for any dups, I previously pressed Reply instead of Reply All. My mistake:) > > > +"$@" >>"$log_file" 2>&1 > > estatus=$? > > if test $enable_hard_errors = no && test $estatus -eq 99; then > > (the above patch is also attached) > > Cheers. > > -- > > Eric Blake, Principal Software Engineer > Red Hat, Inc. +1-919-301-3226 > Virtualization: qemu.org | libvirt.org publickey - howaboutsynergy@protonmail.com - 0x947B9B34.asc Description: application/pgp-keys signature.asc Description: OpenPGP digital signature
bug#35762: (No Subject)
On 5/16/19 12:40 PM, howaboutsyne...@protonmail.com wrote: > A possible fix, or mitigation, based on the answer by John Bollinger[1] > follows. I have tested this to work[2] even though it requires changes[2] in > the program that created the test(s) executables and that program is 'check' > - A unit testing framework for C [3]. > > [1] https://stackoverflow.com/a/56168216/11509478 > [2] https://github.com/libcheck/check/issues/188#issuecomment-493161758 > [3] https://github.com/libcheck/check > > --- /tmp/test-driver 2018-09-18 15:06:54.0 +0200 > +++ /usr/share/automake-1.16/test-driver 2019-05-16 17:58:09.690988983 > +0200 > @@ -104,7 +104,8 @@ trap "st=141; $do_exit" 13 > trap "st=143; $do_exit" 15 > > # Test script is run here. > -"$@" >$log_file 2>&1 > +echo -n "" >"$log_file" 'echo -n' is non-portable, but since all you are doing is using it to create an empty file, it's simpler to just: : >"$log_file" > +"$@" >>"$log_file" 2>&1 > estatus=$? > > if test $enable_hard_errors = no && test $estatus -eq 99; then > > > (the above patch is also attached) > > Cheers. > -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org signature.asc Description: OpenPGP digital signature
bug#35762: (No Subject)
A possible fix, or mitigation, based on the answer by John Bollinger[1] follows. I have tested this to work[2] even though it requires changes[2] in the program that created the test(s) executables and that program is 'check' - A unit testing framework for C [3]. [1] https://stackoverflow.com/a/56168216/11509478 [2] https://github.com/libcheck/check/issues/188#issuecomment-493161758 [3] https://github.com/libcheck/check --- /tmp/test-driver2018-09-18 15:06:54.0 +0200 +++ /usr/share/automake-1.16/test-driver2019-05-16 17:58:09.690988983 +0200 @@ -104,7 +104,8 @@ trap "st=141; $do_exit" 13 trap "st=143; $do_exit" 15 # Test script is run here. -"$@" >$log_file 2>&1 +echo -n "" >"$log_file" +"$@" >>"$log_file" 2>&1 estatus=$? if test $enable_hard_errors = no && test $estatus -eq 99; then (the above patch is also attached) Cheers.--- /tmp/test-driver 2018-09-18 15:06:54.0 +0200 +++ /usr/share/automake-1.16/test-driver 2019-05-16 17:58:09.690988983 +0200 @@ -104,7 +104,8 @@ trap "st=141; $do_exit" 13 trap "st=143; $do_exit" 15 # Test script is run here. -"$@" >$log_file 2>&1 +echo -n "" >"$log_file" +"$@" >>"$log_file" 2>&1 estatus=$? if test $enable_hard_errors = no && test $estatus -eq 99; then publickey - howaboutsynergy@protonmail.com - 0x947B9B34.asc Description: application/pgp-keys signature.asc Description: OpenPGP digital signature