Hello Akim,

* Akim Demaille wrote on Mon, Mar 30, 2009 at 09:18:06PM CEST:
> Le 20 mars 09 à 00:24, Ralf Wildenhues a écrit :
>
>> Retaining the "TESTS=foo*.test" thing without GNU make-specific  
>> measures is tricky.  It requires to shell-expand $(TESTS), before we
>> even start using either of $(TESTS) or $(TEST_LOGS).  IIUC that means
>> we have to introduce yet another restart of 'make'.  :-/
>> Do you see another way?
>
> Actually I'm not even sure this is the right approach: after all there  
> is nothing that requires the contents of TESTS to be actual files, is  
> there?

Well, not in principle at least.  But the current rules to generate the
log files assumes it.  It even assumes they are not symlinks.

>  Maybe they are just .PHONY and just the name is the test, or the 
> files are generated, in which case globbing will not work.

Again, this is TODO work.

> Maybe it should not be file globbing, but some kind of filtering (maybe 
> case/esac-based) on the whole list of available TESTS.  I like to be able 
> to run "make check TESTS='*foo*'" and have all the tests that have "foo" 
> in it, whatever the directory it's in.  File-based globbing won't do.
>
> But I agree I see no means to avoid another invocation of make :(

The problem is that adding recursion is no panacea.  The ugly
non-portable variable override rears its head there.

I'm leaving it out of 1.11b, and instead listing a couple of examples to
do the globbing in shell.  You could easily define a custom target to do
similar as
  set x generated-tests*.test; shift
  cd $srcdir && set x "$@" source-tests*.test && shift && cd -
  make check TESTS="$*"

Cheers,
Ralf


Reply via email to