[petsc-dev] Introducing new "test harness" to PETSc

Matthew Knepley knepley at gmail.com
Wed Jan 18 14:10:48 CST 2017


On Wed, Jan 18, 2017 at 2:05 PM, Scott Kruger <kruger at txcorp.com> wrote:

>
>
>> This does not work
>>
>> knepley/fix-configure-pragmatic *+$:/PETSc3/petsc/petsc-dev$ make -f
>> gmakefile test search=plex%ex1_2
>> make -f gmakefile test search=plex%ex1_2
>> # No tests run
>>
>
>
> If you replace test with "echo_test" as a target it will echo all of the
> targets.  This is useful for debugging.
>
> make -f gmakefile echo_test search=plex%
>
> and then make sure you see it.
>
> Then do an echo_test to see the match.
>
> Here is an example with the current version:
> --------------------------------------------------
> > make -f gmakefile echo_test search=sys%
> sys_tests-runex19 sys_tests-runex10 sys_tests-runex11 sys_tests-runex12
> sys_tests-runex14 sys_tests-runex31 sys_tests-runex31_2 sys_tests-runex20_2
> sys_tests-runex20_3 sys_tutorials-runex9_2 ...
>
> > make -f gmakefile echo_test search=sys%ex9_2
> sys_tutorials-runex9_2
>

Okay, the problem seems to be that you can only use one % in the pattern

knepley/fix-configure-pragmatic *+$:/PETSc3/petsc/petsc-dev$ make -f
gmakefile echo_test search=dm%
make -f gmakefile echo_test search=dm%
dm_impls_plex_tests-runex1_2 dm_impls_plex_tests-runex1_3
dm_impls_plex_tests-runex1_0 dm_impls_plex_tests-runex1_1
dm_impls_plex_tests-runex1_6 dm_impls_plex_tests-runex1_7
dm_impls_plex_tests-runex1_4 dm_impls_plex_tests-runex1_5
dm_impls_plex_tests-runex1_8 dm_impls_plex_tests-runex1_9
dm_impls_plex_tests-runex1_cgns_1 dm_impls_plex_tests-runex1_cgns_0
dm_impls_plex_tests-runex1_refine_overlap_1
dm_impls_plex_tests-runex1_refine_overlap_0
dm_impls_plex_tests-runex1_med_1 dm_impls_plex_tests-runex1_med_0
dm_impls_plex_tests-runex1_med_3 dm_impls_plex_tests-runex1_med_2
dm_impls_plex_tests-runex1_gmsh_3 dm_impls_plex_tests-runex1_gmsh_2
dm_impls_plex_tests-runex1_gmsh_1 dm_impls_plex_tests-runex1_gmsh_0
dm_impls_plex_tests-runex1_gmsh_6 dm_impls_plex_tests-runex1_gmsh_5
dm_impls_plex_tests-runex1_gmsh_4 dm_impls_plex_tests-runex1_fluent_2
dm_impls_plex_tests-runex1_fluent_3 dm_impls_plex_tests-runex1_fluent_0
dm_impls_plex_tests-runex1_fluent_1
dm_impls_plex_tests-runex1_part_simple_1
dm_impls_plex_tests-runex1_part_simple_0

knepley/fix-configure-pragmatic *+$:/PETSc3/petsc/petsc-dev$ make -f
gmakefile echo_test search=dm%plex%
make -f gmakefile echo_test search=dm%plex%

I do not think this is going to be flexible enough.

   Matt


> --------------------------------------------------
>
>
>
>>     >   3) How do I give extra arguments with the make interface, rather
>> than
>>     > test_harness?
>>
>>     That is, run some modification of the test and still do the diff, but
>>     don't change the reference output?  I have used PETSC_OPTIONS for
>> that.
>>
>>       make .... PETSC_OPTIONS=-more_magic
>>
>
> I'm not sure I 100% understand what is being asked (perhaps it's my cold
> medicine), but I think TESTFLAGS does what you want; e.g.,
>
> --------------------------------------------------
> > make -f gmakefile test search=sys%ex9_2 TESTFLAGS="-h"
>         TEST sys_tutorials-runex9_2
> Usage: arch-osx-xsdk-opt/tests/src/sys/examples/tutorials/runex9_2.sh
> [options]
>
> OPTIONS
>   -a <args> ......... Override default arguments
>   -c <cleanup> ...... Cleanup (remove generated files)
>   -e <args> ......... Add extra arguments to default
>   -h ................ help: print this message
>   -n <integer> ...... Override the number of processors to use
>   -o <output file> .. Override default output file to diff with
>   -t <testname> ..... Override test name
>   -v ................ Verbose: Print commands
> # No tests run
> --------------------------------------------------
>
>
>>     > Once I have all the functionality of my Python stuff,  I will
>>     throw it away.
>>
>>
>>
>>
>> --
>> What most experimenters take for granted before they begin their
>> experiments is infinitely more interesting than any results to which
>> their experiments lead.
>> -- Norbert Wiener
>>
>
> --
> Tech-X Corporation               kruger at txcorp.com
> 5621 Arapahoe Ave, Suite A       Phone: (720) 974-1841
> Boulder, CO 80303                Fax:   (303) 448-7756
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20170118/376aa1ef/attachment.html>


More information about the petsc-dev mailing list