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

Barry Smith bsmith at mcs.anl.gov
Tue Jan 17 17:19:40 CST 2017


   I don't see any difference in the spacing between the two cases? We definitely don't want white space or lack of white space to matter in the definitions, that is too hard to manage.


> On Jan 17, 2017, at 5:04 PM, Scott Kruger <kruger at txcorp.com> wrote:
> 
> 
> 
> It has to do with the spacing.  Looking at src/sys/examples/test/ex1.c
> 
> This works:
> /*TEST
> 
>   This test does foo
>   test:
>      filter: egrep "(PETSC ERROR)" | egrep "(main|CreateError|Error Created)" | cut -f1,2,3,4,5,6 -d" "
> 
> 
> TEST*/
> 
> which I can see by doing this:
> ------------------------------------------------
> gabrielle 81: ../../../../config/testparse.py -t ex1.c -v 1
> 
> 
> ex1.c
>   runex1
>      filter: egrep "(PETSC ERROR)" | egrep "(main|CreateError|Error Created)" | cut -f1,2,3,4,5,6 -d" "
> ------------------------------------------------
> 
> but this does not:
> 
> /*TEST
> 
>  This test does foo
>   test:
>      filter: egrep "(PETSC ERROR)" | egrep "(main|CreateError|Error Created)" | cut -f1,2,3,4,5,6 -d" "
> 
> 
> TEST*/
> 
> I would suggest that using # as a comment delimiter would be the best approach to enabling comments.
> 
> Scott
> 
> 
> On 1/17/17 3:53 PM, Matthew Knepley wrote:
>> On Tue, Jan 17, 2017 at 4:31 PM, Satish Balay <balay at mcs.anl.gov
>> <mailto:balay at mcs.anl.gov>> wrote:
>> 
>>    On Tue, 17 Jan 2017, Matthew Knepley wrote:
>> 
>>    > Also, how do I put comments inside these blocks to tell me what the test is
>>    > about?
>> 
>>    Looks like everything other than the define format is ignored..
>> 
>> 
>> It does not look that way to me:
>> 
>> /usr/bin/python ./config/gmakegentest.py --petsc-arch=arch-c-exodus-master
>> Traceback (most recent call last):
>>  File "./config/gmakegentest.py", line 733, in <module>
>>    main(petsc_arch=opts.petsc_arch, output=opts.output,
>> verbose=opts.verbose, single_ex=opts.single_executable)
>>  File "./config/gmakegentest.py", line 718, in main
>> 
>> dataDict=pEx.walktree(os.path.join(pEx.petsc_dir,'src'),action="genPetscTests")
>>  File "./config/gmakegentest.py", line 613, in walktree
>>    eval("self."+action+"(root,dirs,files,dataDict)")
>>  File "<string>", line 1, in <module>
>>  File "./config/gmakegentest.py", line 593, in genPetscTests
>>    dataDict[root].update(testparse.parseTestFile(fullex))
>>  File "/PETSc3/petsc/petsc-dev/config/testparse.py", line 175, in
>> parseTestFile
>>    testDict[basename]=parseTests(testString,srcfile)
>>  File "/PETSc3/petsc/petsc-dev/config/testparse.py", line 140, in
>> parseTests
>>    testname,subdict=parseTest(test,srcfile)
>>  File "/PETSc3/petsc/petsc-dev/config/testparse.py", line 102, in parseTest
>>    val=line.split(":")[1].strip()
>> IndexError: list index out of range
>> 
>> 
>>   Matt
>> 
>> 
>> 
>>    Satish
>> 
>> 
>> 
>> 
>> --
>> 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




More information about the petsc-dev mailing list