coreutils
[Top][All Lists]
Advanced

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

Re: sc_tests_list_consistency failure when adding tests [was: df --outpu


From: Jim Meyering
Subject: Re: sc_tests_list_consistency failure when adding tests [was: df --output]
Date: Fri, 21 Sep 2012 12:36:10 +0200

Bernhard Voelker wrote:
> On 09/21/2012 12:15 PM, Jim Meyering wrote:
>> Bernhard Voelker wrote:
>>> Apropos: the syntax-check failed yesterday, when I tried to
>>> add the new test, because the test was not yet in the git history,
>>> but sc_tests_list_consistency seemed to check on that.
>>>
>>> So I committed despite of that error, and a subsequent syntax-check
>>> passed. Is this normal behavior? I didn't experience such before the
>>> non-recursive work. And this is the first test to be added
>>> since then ... (but maybe it was just too late at night for me).
>>
>> For reference, here's the rule:
>>
>> # Ensure that all version-controlled test cases are listed in $(all_tests).
>> sc_tests_list_consistency:
>>      @bs="\\";                                                       \
>>      test_extensions_rx=`echo $(TEST_EXTENSIONS)                     \
>>        | sed -e "s/ /|/g" -e "s/$$bs./$$bs$$bs./g"`;                 \
>>      {                                                               \
>>        for t in $(all_tests); do echo $$t; done;                     \
>>        cd $(top_srcdir);                                             \
>>        $(SHELL) build-aux/vc-list-files tests                        \
>>          | grep -v '^tests/init\.sh$$'                               \
>>          | $(EGREP) "$$test_extensions_rx\$$";                       \
>>      } | sort | uniq -u | grep . && exit 1; :
>>
>>
>> If you merely "git add" your new test script, that should be enough,
>> since that test compares the list of VC'd files under tests/
>> and the list of test file names.
>>
>> In other words, afaik, there is no problem.
>
> Right, but don't we need to add new tests to
> tests/local.mk (all_tests) anymore?

Not sure I understand the question, but I've just confirmed two things:

  if you git-add *and commit* (contrary to what I said above you do need
    to commit locally) a new tests/somewhere/*.sh (or .pl) file, but forget
    to list it in all_tests, then "make sc_tests_list_consistency" will
    point out the failure.

  if you add a new name to all_tests in tests/local.mk but forget to
    git-add and commit the corresponding file, that same test will
    point out the failure.



reply via email to

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