[petsc-dev] Globsearch fails for me when running tests

Jed Brown jed at jedbrown.org
Wed Mar 25 18:36:15 CDT 2020


The other strategy would be globsearch calls Python calls make to get the list on stdout, which it filters and returns on its stdout.

An alternative would be to use $(guile ...) to do all the processing,
but that will only work when Make is built with Guile support.  Check

make -f gmakefile print VAR=.FEATURES | grep guile

to see if you have support.  Mine has it, but Ubuntu's make package doesn't, for example.

Scott Kruger <kruger at txcorp.com> writes:

> Ugh -- this is ugly.
>
> Can't we just tell users to either use the '%' syntax or recompile their 
> linux kernel?
>
> Just kidding.  I'll take a look.
>
> Scott
>
>
> On 3/25/20 3:48 PM, Jed Brown wrote:
>> Scott, you can't pass '$(alltesttargets)' on the command line like this.
>> 
>>    TESTTARGETS := $(shell $(PYTHON) -c"import sys,fnmatch,itertools; m=[fnmatch.filter(sys.argv[2].split(),p) for p in sys.argv[1].split()]; print(' '.join(list(itertools.chain.from_iterable(m))))" '$(globsearch)' '$(alltesttargets)')
>> 
>> For this feature, probably put them in an argsfile
>> 
>>    $(file >$(TESTDIR)/globsearch.args,$(alltesttargets))
>> 
>> and make your Python read from that file.  I don't know a way to pass it
>> on stdin.
>> 
>> Scott Kruger <kruger at txcorp.com> writes:
>> 
>>> What platform?
>>>
>>> On 3/25/20 3:20 PM, Stefano Zampini wrote:
>>>> This was working before..
>>>>
>>>> [szampini at localhost petsc]$ make -f gmakefile.test test globsearch='dm*'
>>>> make: execvp: /usr/bin/sh: Argument list too long
>>>> Using MAKEFLAGS: -- globsearch=dm*
>>>> # No tests run
>>>> # No tests run
>>>> # No tests run
>>>>
>>>> [szampini at localhost petsc]$ git branch
>>>> * knepley/feature-dm-remove-hybrid
>>>>
>>>> [szampini at localhost petsc]$ make -v
>>>> GNU Make 4.2.1
>>>> Built for x86_64-redhat-linux-gnu
>>>> Copyright (C) 1988-2016 Free Software Foundation, Inc.
>>>> License GPLv3+: GNU GPL version 3 or later
>>>> <http://gnu.org/licenses/gpl.html>
>>>> This is free software: you are free to change and redistribute it.
>>>> There is NO WARRANTY, to the extent permitted by law.
>>>>
>>>
>>> -- 
>>> Tech-X Corporation               kruger at txcorp.com
>>> 5621 Arapahoe Ave, Suite A       Phone: (720) 974-1841
>>> Boulder, CO 80303                Fax:   (303) 448-7756
>
> -- 
> Tech-X Corporation               kruger at txcorp.com
> 5621 Arapahoe Ave, Suite A       Phone: (720) 974-1841
> Boulder, CO 80303                Fax:   (303) 448-7756


More information about the petsc-dev mailing list