<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jan 17, 2017 at 7:33 PM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="gmail-">On Tue, Jan 17, 2017 at 6:27 PM, Scott Kruger <span dir="ltr"><<a href="mailto:kruger@txcorp.com" target="_blank">kruger@txcorp.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
I think this is more YAML compliant as you can do this:<br></blockquote><div><br></div></span><div>We need another parser fix:</div><div><br></div><div><div> test:</div><div> suffix: 2</div><div> args: -dim 2 -dm_view ::ascii_latex</div></div></div></div></div></blockquote><div><br></div><div>This works for me:</div><div><br></div><div><div>@@ -98,8 +98,9 @@ def parseTest(testStr,srcfile):</div><div> subdict={}</div><div> for line in striptest.split("\n"):</div><div> if not line.strip(): continue</div><div> var=line.split(":")[0].strip()<br></div><div>- val=line.split(":")[1].strip()</div><div>+ val=line.split(":", 1)[1].strip()</div><div> # Start by seeing if we are in a subtest</div><div> if line.startswith(" "):</div><div> subdict[subtestname][var]=val</div></div><div><br></div><div>However, none of my localrunfiles are working. I have them defined this way</div><div><br></div><div><div> test:</div><div> suffix: cgns_0</div><div> requires: cgns</div><div> args: -filename tut21.cgns -interpolate 1 -dm_view</div><div> localrunfiles: ../../../../../../share/petsc/datafiles/meshes/tut21.cgns</div></div><div><br></div><div>which works when gmakegentest.py is run, but not when executing the script</div><div><br></div><div><div>arch-c-exodus-master/tests/src/dm/impls/plex/examples/tests/runex1_cgns_0.sh -v</div><div>cp: ../../../../../../share/petsc/datafiles/meshes/tut21.cgns: No such file or directory</div></div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div> Matt</div><div><div class="gmail-h5"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
args: -foo # Foo test<br>
<br>
<br>
--- a/config/testparse.py<br>
+++ b/config/testparse.py<br>
@@ -59,6 +59,7 @@ def _stripIndent(block,srcfile):<br>
ext=os.path.splitext(srcfile)<wbr>[1]<br>
for lline in block.split("\n"):<br>
line=lline[1:] if lline.startswith("!") else lline<br>
+ line=line.split('#')[0]<br>
if not line.strip(): continue<br>
stripstr=" "<br>
nspace=len(line)-len(line.lst<wbr>rip(stripstr))<br>
@@ -70,6 +71,7 @@ def _stripIndent(block,srcfile):<br>
newTestStr="\n"<br>
for lline in block.split("\n"):<br>
line=lline[1:] if lline.startswith("!") else lline<br>
+ line=line.split('#')[0]<br>
if not line.strip(): continue<br>
newline=line[nspace:]<br>
newTestStr=newTestStr+newline<wbr>.rstrip()+"\n"<span class="gmail-m_5909512692637693486gmail-"><br>
<br>
On 1/17/17 5:11 PM, Matthew Knepley wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-m_5909512692637693486gmail-">
On Tue, Jan 17, 2017 at 6:08 PM, Barry Smith <<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a><br></span><span class="gmail-m_5909512692637693486gmail-">
<mailto:<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>>> wrote:<br>
<br>
<br>
Comments would be a new feature so belong in a new branch, so<br>
create a branch off of master, call it say<br>
scott/test-harness-comments then after you tested it (by adding at<br>
least one comment to a current example) and then make a pull request<br>
and we can get it into master very quickly.<br>
<br>
<br>
This works<br>
<br>
--- a/config/testparse.py<br>
+++ b/config/testparse.py<br>
@@ -98,6 +98,7 @@ def parseTest(testStr,srcfile):<br>
subdict={}<br>
for line in striptest.split("\n"):<br>
if not line.strip(): continue<br>
+ if len(line.split(":")) < 2: continue<br>
var=line.split(":")[0].strip(<wbr>)<br>
val=line.split(":")[1].strip(<wbr>)<br>
# Start by seeing if we are in a subtest<br>
<br>
Matt<br>
<br>
<br>
<br>
Barry<br>
<br>
> On Jan 17, 2017, at 5:29 PM, Scott Kruger <<a href="mailto:kruger@txcorp.com" target="_blank">kruger@txcorp.com</a><br></span><span class="gmail-m_5909512692637693486gmail-">
<mailto:<a href="mailto:kruger@txcorp.com" target="_blank">kruger@txcorp.com</a>>> wrote:<br>
><br>
><br>
><br>
><br>
> The "This" is not at the same indentation level as the "test:"<br>
><br>
> According the YAML standard, comments begin with #.<br>
> I did not implement comments.<br>
><br>
> Where do you want the fix pushed?<br>
><br>
> Scott<br>
><br>
><br>
> On 1/17/17 4:19 PM, Barry Smith wrote:<br>
>><br>
>> I don't see any difference in the spacing between the two<br>
cases? We definitely don't want white space or lack of white space<br>
to matter in the definitions, that is too hard to manage.<br>
>><br>
>><br>
>>> On Jan 17, 2017, at 5:04 PM, Scott Kruger <<a href="mailto:kruger@txcorp.com" target="_blank">kruger@txcorp.com</a><br></span><div><div class="gmail-m_5909512692637693486gmail-h5">
<mailto:<a href="mailto:kruger@txcorp.com" target="_blank">kruger@txcorp.com</a>>> wrote:<br>
>>><br>
>>><br>
>>><br>
>>> It has to do with the spacing. Looking at<br>
src/sys/examples/test/ex1.c<br>
>>><br>
>>> This works:<br>
>>> /*TEST<br>
>>><br>
>>> This test does foo<br>
>>> test:<br>
>>> filter: egrep "(PETSC ERROR)" | egrep<br>
"(main|CreateError|Error Created)" | cut -f1,2,3,4,5,6 -d" "<br>
>>><br>
>>><br>
>>> TEST*/<br>
>>><br>
>>> which I can see by doing this:<br>
>>> ------------------------------<wbr>------------------<br>
>>> gabrielle 81: ../../../../config/testparse.p<wbr>y -t ex1.c -v 1<br>
>>><br>
>>><br>
>>> ex1.c<br>
>>> runex1<br>
>>> filter: egrep "(PETSC ERROR)" | egrep<br>
"(main|CreateError|Error Created)" | cut -f1,2,3,4,5,6 -d" "<br>
>>> ------------------------------<wbr>------------------<br>
>>><br>
>>> but this does not:<br>
>>><br>
>>> /*TEST<br>
>>><br>
>>> This test does foo<br>
>>> test:<br>
>>> filter: egrep "(PETSC ERROR)" | egrep<br>
"(main|CreateError|Error Created)" | cut -f1,2,3,4,5,6 -d" "<br>
>>><br>
>>><br>
>>> TEST*/<br>
>>><br>
>>> I would suggest that using # as a comment delimiter would be the<br>
best approach to enabling comments.<br>
>>><br>
>>> Scott<br>
>>><br>
>>><br>
>>> On 1/17/17 3:53 PM, Matthew Knepley wrote:<br>
>>>> On Tue, Jan 17, 2017 at 4:31 PM, Satish Balay<br>
<<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a> <mailto:<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>><br></div></div><div><div class="gmail-m_5909512692637693486gmail-h5">
>>>> <mailto:<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a> <mailto:<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>>>> wrote:<br>
>>>><br>
>>>> On Tue, 17 Jan 2017, Matthew Knepley wrote:<br>
>>>><br>
>>>> > Also, how do I put comments inside these blocks to tell me<br>
what the test is<br>
>>>> > about?<br>
>>>><br>
>>>> Looks like everything other than the define format is ignored..<br>
>>>><br>
>>>><br>
>>>> It does not look that way to me:<br>
>>>><br>
>>>> /usr/bin/python ./config/gmakegentest.py<br>
--petsc-arch=arch-c-exodus-mas<wbr>ter<br>
>>>> Traceback (most recent call last):<br>
>>>> File "./config/gmakegentest.py", line 733, in <module><br>
>>>> main(petsc_arch=opts.petsc_ar<wbr>ch, output=opts.output,<br>
>>>> verbose=opts.verbose, single_ex=opts.single_executab<wbr>le)<br>
>>>> File "./config/gmakegentest.py", line 718, in main<br>
>>>><br>
>>>><br>
dataDict=pEx.walktree(os.path.<wbr>join(pEx.petsc_dir,'src'),acti<wbr>on="genPetscTests")<br>
>>>> File "./config/gmakegentest.py", line 613, in walktree<br>
>>>> eval("self."+action+"(root,di<wbr>rs,files,dataDict)")<br>
>>>> File "<string>", line 1, in <module><br>
>>>> File "./config/gmakegentest.py", line 593, in genPetscTests<br>
>>>> dataDict[root].update(testpar<wbr>se.parseTestFile(fullex))<br>
>>>> File "/PETSc3/petsc/petsc-dev/confi<wbr>g/testparse.py", line 175, in<br>
>>>> parseTestFile<br>
>>>> testDict[basename]=parseTests<wbr>(testString,srcfile)<br>
>>>> File "/PETSc3/petsc/petsc-dev/confi<wbr>g/testparse.py", line 140, in<br>
>>>> parseTests<br>
>>>> testname,subdict=parseTest(te<wbr>st,srcfile)<br>
>>>> File "/PETSc3/petsc/petsc-dev/confi<wbr>g/testparse.py", line 102,<br>
in parseTest<br>
>>>> val=line.split(":")[1].strip(<wbr>)<br>
>>>> IndexError: list index out of range<br>
>>>><br>
>>>><br>
>>>> Matt<br>
>>>><br>
>>>><br>
>>>><br>
>>>> Satish<br>
>>>><br>
>>>><br>
>>>><br>
>>>><br>
>>>> --<br>
>>>> What most experimenters take for granted before they begin their<br>
>>>> experiments is infinitely more interesting than any results to<br>
which<br>
>>>> their experiments lead.<br>
>>>> -- Norbert Wiener<br>
>>><br>
>>> --<br>
>>> Tech-X Corporation <a href="mailto:kruger@txcorp.com" target="_blank">kruger@txcorp.com</a><br></div></div>
<mailto:<a href="mailto:kruger@txcorp.com" target="_blank">kruger@txcorp.com</a>><span class="gmail-m_5909512692637693486gmail-"><br>
>>> 5621 Arapahoe Ave, Suite A Phone: <a href="tel:%28720%29%20974-1841" value="+17209741841" target="_blank">(720) 974-1841</a><br></span>
<tel:%28720%29%20974-1841><span class="gmail-m_5909512692637693486gmail-"><br>
>>> Boulder, CO 80303 Fax: <a href="tel:%28303%29%20448-7756" value="+13034487756" target="_blank">(303) 448-7756</a><br></span>
<tel:%28303%29%20448-7756><br>
>><br>
><br>
> --<br>
> Tech-X Corporation <a href="mailto:kruger@txcorp.com" target="_blank">kruger@txcorp.com</a><br>
<mailto:<a href="mailto:kruger@txcorp.com" target="_blank">kruger@txcorp.com</a>><span class="gmail-m_5909512692637693486gmail-"><br>
> 5621 Arapahoe Ave, Suite A Phone: <a href="tel:%28720%29%20974-1841" value="+17209741841" target="_blank">(720) 974-1841</a><br></span>
<tel:%28720%29%20974-1841><span class="gmail-m_5909512692637693486gmail-"><br>
> Boulder, CO 80303 Fax: <a href="tel:%28303%29%20448-7756" value="+13034487756" target="_blank">(303) 448-7756</a><br></span>
<tel:%28303%29%20448-7756><span class="gmail-m_5909512692637693486gmail-"><br>
<br>
<br>
<br>
<br>
--<br>
What most experimenters take for granted before they begin their<br>
experiments is infinitely more interesting than any results to which<br>
their experiments lead.<br>
-- Norbert Wiener<br>
</span></blockquote><div class="gmail-m_5909512692637693486gmail-HOEnZb"><div class="gmail-m_5909512692637693486gmail-h5">
<br>
-- <br>
Tech-X Corporation <a href="mailto:kruger@txcorp.com" target="_blank">kruger@txcorp.com</a><br>
5621 Arapahoe Ave, Suite A Phone: <a href="tel:%28720%29%20974-1841" value="+17209741841" target="_blank">(720) 974-1841</a><br>
Boulder, CO 80303 Fax: <a href="tel:%28303%29%20448-7756" value="+13034487756" target="_blank">(303) 448-7756</a><br>
</div></div></blockquote></div></div></div><div><div class="gmail-h5"><br><br clear="all"><div><br></div>-- <br><div class="gmail-m_5909512692637693486gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div></div>