On Thu, Jul 26, 2012 at 11:32 AM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote">On Thu, Jul 26, 2012 at 11:08 AM, Satish Balay <span dir="ltr"><<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>I think python is fine - as long as the run targets still remain in<br>
the makefile.<br>
<br>
Are you saying each 'run' target in the makefile will be tagged - and<br>
the python script will parse this tag?</div></blockquote></div><br><div>I meant getting them out of the makefile so we can declare the test in Python. An example syntax would be</div><div><br></div><div>test.py:</div><div>
from Petsc.Test import InModule, Exec, Test, Main</div><div><br></div><div>with Exec(sources='ex19.c'): # ex19 inferred from name, could specify explicitly</div><div> Test('fas', np=8, args='-snes_type fas -snes_monitor_draw', requires='X')</div>
<div><br></div><div>if __name__ == '__main__': Main()</div><div><br></div><div>The Test() declaration would register itself as being associated with ex19.c. We can add keywords to create batches. The output file is inferred from the test name, so here we would compare with output/ex19_fas.out. This should allow</div>
<div><br></div><div>./test.py build ex19</div><div><br></div><div>./test.py check ex19_fas</div><div><br></div><div>./test.py check ex19_\* # run all the ex19 tests</div><div><br></div><div>./test.py check -n 16 --if '(X || Fortran) && !Complex'<br>
<br></div><div>The last line would mean to run all tests requiring X or Fortran, but not complex, using up to 16 MPI processes total.</div><div><br></div><div>We could preserve "make runex19_fas" in the transition period, but I'd like to be able to do everything from test.py.</div>
</blockquote></div><br>builder already does all of this, and more stuff for code generation.<div><br></div><div> Matt<br clear="all"><div><br></div>-- <br>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<br>
</div>