RE: autotest/AT_CHECK: ways to pass additional options on to diff?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Nick,

On Thu, 25 Apr 2019 23:37:47 +0200, Jannick wrote:
> On Thu, 25 Apr 2019 17:10:11 -0400, Nick Bowler wrote:
> > > simply offer
> > > autotest a customized script called 'diff' - surprise surprise - the
> > > testsuite script finds **first** on PATH.
> >
> > Yes, that sounds workable.  You can fairly easily generate such a
> > wrapper script in configure, too, if for portability you need to test
> > whether diff supports some particular option.

Just for the record after some time of diving into things and thinking about
it: here a nice and sweet solution - without anything like diff wrappers or
evil hackery in the autotest scripts - which imply changes the diff command
in the shell environment:

set -a
diff_cmd="$(command -v diff)"
function diff () { "$diff_cmd" --strip-trailing-cr $@ ; }
set +a
make check
unset -f diff # clean-up

Thanks,
J.


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf




[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux