<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jan 17, 2017 at 8:54 PM, Jed Brown <span dir="ltr"><<a href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</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"><span class="gmail-">Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> writes:<br>
> Gripes:<br>
><br>
>   1) How do I run an individual test run?<br>
<br>
</span>  make -f gmakefile sys_tutorials-runex5<br>
<br>
(tab completion works) or use a search that matches only that run.<br>
<span class="gmail-"><br>
> I use<br>
><br>
>   make -f gmakefile test searchin=plex<br>
><br>
> to run plex tests, and I think<br>
><br>
>   make -f gmakefile test searchin=plex*ex1<br>
<br>
</span>Due to make syntax, % is the internal string matcher.<br>
<span class="gmail-"><br>
> will work. However, how do I select ex1_2?<br>
<br>
</span>  make -f gmakefile test search=plex%ex1_2</blockquote><div><br></div><div>This does not work</div><div><br></div><div><div>knepley/fix-configure-pragmatic *+$:/PETSc3/petsc/petsc-dev$ make -f gmakefile test search=plex%ex1_2</div><div>make -f gmakefile test search=plex%ex1_2</div><div># No tests run</div></div><div><br></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"><span class="gmail-"><br>
>   2) How do I replace the output which exists with the output of the<br>
> current test run?<br>
><br>
> This is amazingly useful after changes.<br>
<br>
</span>I have this script ~/bin/diffupdate:<br>
#!/bin/sh<br>
<br>
args=<br>
if [ "$1" = "-u" ]; then<br>
    args="-u"<br>
    shift<br>
fi<br>
new="$2"<br>
ref="$1"<br>
<br>
diff $args "$ref" "$new"<br>
ret=$?<br>
echo "Updating $new --> $ref"<br>
mv "$new" "$ref"<br>
exit $ret<br>
<br>
<br>
Then I run<br>
<br>
  make -f gmakefile test search=plex% DIFF=diffupdate<br>
<br>
It prints the diff and replaces the reference file (first argument) with<br>
the second.<br>
<span class="gmail-"><br>
>   3) How do I give extra arguments with the make interface, rather than<br>
> test_harness?<br>
<br>
</span>That is, run some modification of the test and still do the diff, but<br>
don't change the reference output?  I have used PETSC_OPTIONS for that.<br>
<br>
  make .... PETSC_OPTIONS=-more_magic<br>
<div class="gmail-HOEnZb"><div class="gmail-h5"><br>
> Once I have all the functionality of my Python stuff,  I will throw it away.<br>
<br>
</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>