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

Tobin Isaac tisaac at uchicago.edu
Tue Jan 24 00:23:38 CST 2017


How does tab completion work?  I've tried `make -f gmakefile sys<Tab>` in zsh and bash but got nothing.

Thanks to everyone who worked on this, I just have two other questions/requests:

  - What’s the best way to update the test definitions after fiddling with /*TEST*/ blocks?  It would be nice if gmakegentests.py would run automatically when sources are newer than their tests.

  - Is there a technical reason suffixes can only be specified at the top level?  It would help with concision if subtest suffixes could append to their parent suffixes.

Cheers,
  Toby

From: Jed Brown<mailto:jed at jedbrown.org>
Sent: ‎Tuesday‎, ‎17‎ ‎January‎, ‎2017 ‎20‎:‎55
To: Matthew Knepley<mailto:knepley at gmail.com>, Barry Smith<mailto:bsmith at mcs.anl.gov>
Cc: petsc-dev<mailto:petsc-dev at mcs.anl.gov>

Matthew Knepley <knepley at gmail.com> writes:
> Gripes:
>
>   1) How do I run an individual test run?

  make -f gmakefile sys_tutorials-runex5

(tab completion works) or use a search that matches only that run.

> I use
>
>   make -f gmakefile test searchin=plex
>
> to run plex tests, and I think
>
>   make -f gmakefile test searchin=plex*ex1

Due to make syntax, % is the internal string matcher.

> will work. However, how do I select ex1_2?

  make -f gmakefile test search=plex%ex1_2

>   2) How do I replace the output which exists with the output of the
> current test run?
>
> This is amazingly useful after changes.

I have this script ~/bin/diffupdate:
#!/bin/sh

args=
if [ "$1" = "-u" ]; then
    args="-u"
    shift
fi
new="$2"
ref="$1"

diff $args "$ref" "$new"
ret=$?
echo "Updating $new --> $ref"
mv "$new" "$ref"
exit $ret


Then I run

  make -f gmakefile test search=plex% DIFF=diffupdate

It prints the diff and replaces the reference file (first argument) with
the second.

>   3) How do I give extra arguments with the make interface, rather than
> test_harness?

That is, run some modification of the test and still do the diff, but
don't change the reference output?  I have used PETSC_OPTIONS for that.

  make .... PETSC_OPTIONS=-more_magic

> Once I have all the functionality of my Python stuff,  I will throw it away.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20170124/3f8b994f/attachment.html>


More information about the petsc-dev mailing list