[petsc-dev] git status to test list

Barry Smith bsmith at petsc.dev
Mon Jul 6 12:00:36 CDT 2020


I couldn't see how Jed can avoid doing the filename hacking since alltesttargets are the hacked filenames but probably I am missing something. 

  Anyways this patch works for me based on Jed's email.

  Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: since.patch
Type: application/octet-stream
Size: 934 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20200706/5b331ab7/attachment.obj>
-------------- next part --------------


> On Jul 6, 2020, at 9:40 AM, Jed Brown <jed at jedbrown.org> wrote:
> 
> It'd be possible to hack the file names, but I'd rather not duplicate that logic.
> 
> My inclination would be to filter similar to argsearch, which requires
> adding the source files to testfiles.  Then you could use
> 
>  make test since=@
> 
> ifdef since
>  gitchanged := $(shell git diff --name-only $(since) src/)
> endif
> 
> Pierre Jolivet <pierre.jolivet at enseeiht.fr> writes:
> 
>> Hello,
>> To git/regexp enthusiasts and/or test harness people: is there some script/command lying around to convert a list of modified examples (according to git) into a list understandable by the test system?
>> Thanks for your help,
>> Pierre
>> 
>> PS: here is such a list
>> $ git status -uno
>> On branch master
>> Your branch is up to date with 'origin/master'.
>> 
>> Changes not staged for commit:
>>  (use "git add <file>..." to update what will be committed)
>>  (use "git checkout -- <file>..." to discard changes in working directory)
>> 
>> 	modified:   config/BuildSystem/config/types.py
>> 	modified:   include/petscsys.h
>> 	modified:   src/dm/label/tutorials/ex1f90.F90
>> 	modified:   src/ksp/ksp/tests/ex16f.F90
>> 	modified:   src/ksp/ksp/tutorials/ex5f.F90
>> 	modified:   src/ksp/ksp/tutorials/ex75f.F90
>> 	modified:   src/ksp/ksp/tutorials/ex76f.F90
>> 	modified:   src/ksp/ksp/tutorials/ex77f.F90
>> 	modified:   src/ksp/ksp/tutorials/ex7f.F90
>> 	modified:   src/mat/tests/ex196f90.F90
>> 	modified:   src/sys/tests/ex13f.F90
>> 	modified:   src/sys/tests/ex47f.F90
>> 	modified:   src/sys/tutorials/ex17f.F90
>> 	modified:   src/sys/tutorials/ex2f.F90
>> 	modified:   src/vec/vec/tutorials/ex11f90.F90
>> 	modified:   src/vec/vec/tutorials/ex18f.F90
>> 	modified:   src/vec/vec/tutorials/ex1f.F90
>> 
>> no changes added to commit (use "git add" and/or "git commit -a")



More information about the petsc-dev mailing list