autoconf
[Top][All Lists]
Advanced

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

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


From: Jannick
Subject: autotest/AT_CHECK: ways to pass additional options on to diff?
Date: Tue, 16 Apr 2019 19:55:43 +0200

Hi everybody,

I am wondering if there is an elegant way to pass additional diff options on
to AT_CHECK in a testsuite - ideally on the level of .ac, .am, .at files or
alike?

In autotest/general.m4, the variable at_diff carries the diff command and is
defined as 'diff' or 'diff -u' (cf.
http://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autotest/general.m4#n
1047):

# Use `diff -u' when possible.
if at_diff=`diff -u "$at_devnull" "$at_devnull" 2>&1` && test -z "$at_diff"
then
  at_diff='diff -u'
else
  at_diff=diff
fi

configure translates this code snip into the script testsuite where - and
this is really evil hackery I solemnly confess and I would like to avoid - I
changed the definition of the variable at_diff.  In my cases the diff
options are the same for all tests in each of the relevant projects.

I am aware that the test output could be restructured, but this question
focuses at autoconf, autotest, AT_CHECK and friends. Using a customized
version of autotest/general.m4 would not be optimal, since the project
should automatically benefit from updates of autoconf/automake out of the
box.


Any help on this would be great!

Many thanks,
J.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]