https://gitlab.com/petsc/petsc/-/merge_requests/3525
Your complaint about the test harness verbosity when running restricted
set of tests is also fixed in this one as well (and this one is so nice
I should have done this quite awhile ago).
Scott
On 12/29/20 8:32 PM, Barry Smith wrote:
Scott,
I spent way to much time puzzling over why
[bsmith@p1 petsc]$ make -f gmakefile.test test search='src*ts*tests*ex26*'
Using MAKEFLAGS: -- search=src*ts*tests*ex26*
# No tests run
# No tests run
# No tests run
When I ran with help I noticed some seemingly slight inconsistency. It
says for a directory you include the src but for a specific example
you do not include src?
Would it be possible to add support to the test harness so if one puts
in the src* for a specific example it still works? For silly people
like me who type the full directory path, and keeping typing it over
and over again even though it does not work. And to support not
putting in the src/ for directories?
Thanks
Barry
Tests can be generated by searching with multiple methods
For general searching (using config/query_test.py):
make -f gmakefile.test test search='sys*ex2*'
or the shortcut using s
make -f gmakefile.test test s='sys*ex2*'
You can also use the full path to a file directory
make -f gmakefile.test test s='src/sys/tests/'
To search for fields from the original test definitions:
make -f gmakefile.test test query='requires'
queryval='*MPI_PROCESS_SHARED_MEMORY*'
or the shortcut using q and qv
make -f gmakefile.test test q='requires'
qv='*MPI_PROCESS_SHARED_MEMORY*'
To filter results from other searches, use searchin
make -f gmakefile.test test s='src/sys/tests/' searchin='*options*'
To re-run the last tests which failed:
make -f gmakefile.test test test-fail='1'
To see which targets match a given pattern (useful for doing a
specific target):
make -f gmakefile.test print-test search=sys*
To build an executable, give full path to location:
make -f "gmakefile.test" ${PETSC_ARCH}/tests/sys/tests/ex1
or make the test with NO_RM=1
Above is from: help-make help-targets help-test
[bsmith@p1 petsc]$ make -f gmakefile.test test search='src*ts*tests*ex26*'
Using MAKEFLAGS: -- search=src*ts*tests*ex26*
# No tests run
# No tests run
# No tests run
[bsmith@p1 petsc]$ make -f gmakefile.test printtest
search='src*ts*tests*ex26*'
make: *** No rule to make target 'printtest'. Stop.
[bsmith@p1 petsc]$ make -f gmakefile.test print_test
search='src*ts*tests*ex26*'
make: *** No rule to make target 'print_test'. Stop.
[bsmith@p1 petsc]$ make -f gmakefile.test print-test
search='src*ts*tests*ex26*'
[bsmith@p1 petsc]$ gmake -f gmakefile.test print-test
search='src*ts*tests*ex26*'
[bsmith@p1 petsc]$ gmake -f gmakefile.test test
search='src*ts*tests*ex26*'
Using MAKEFLAGS: -- search=src*ts*tests*ex26*
# No tests run
# No tests run
# No tests run
[bsmith@p1 petsc]$ ls src/ts/tests/ex26
ex26 ex26.c
[bsmith@p1 petsc]$ ls src/ts/tests/ex26
ex26 ex26.c
[bsmith@p1 petsc]$ gmake -f gmakefile.test test search='ts*tests*ex26*'
Using MAKEFLAGS: -- search=ts*tests*ex26*
CC arch-ci-linux-cuda-double/tests/ts/tests/ex26.o
CLINKER arch-ci-linux-cuda-double/tests/ts/tests/ex26
--
Tech-X Corporation kru...@txcorp.com
5621 Arapahoe Ave, Suite A Phone: (720) 466-3196
Boulder, CO 80303 Fax: (303) 448-7756