Scott Kruger kruger at txcorp.com
Mon Oct 25 14:18:48 CDT 2021

Adding this as a feature would add some ugly code logic for something
that only affects 2 tests out of the thousands that we have.  

Instead, MR !4500 enables one to filter out that test.  


make -f gmakefile test s='snes_tutorials-ex19_' i='\!*logviewmemory' VALGRIND=1

does every ex19 test *except* for the problematic test.

I might be able to figure out a better way of hard-coding runtime
behavior per test, but I think for now this offers a general-purpose

If you still don't like that, you could just create a local modification
to `config/gmakegentest.py`:
    if self.petsc_arch.find('valgrind') >= 0:


This means that the `logviewmemory` test would never be run, but that
might be OK for your needs.


On 2021-10-25 09:22, Pierre Jolivet did write:
> Hello,
> I think I’m asking too much of test harness, but is there a way to automatically deactivate a test when running with VALGRIND=1 without having to play around with PETSC_RUNNING_ON_VALGRIND in the code?
> I see the variable PETSCTEST_VALGRIND, but it seems rather static and set depending on PETSC_ARCH.
> So even if there is src/snes/tutorials/ex19.c:     requires: defined(PETSC_USE_LOG) !defined(PETSCTEST_VALGRIND), 
> Running make -f gmakefile test s='snes*logviewmemory' VALGRIND=1 on my machine (without valgrind in the PETSC_ARCH) gets the test going.
> Thanks,
> Pierre

Scott Kruger
Tech-X Corporation               kruger at txcorp.com
5621 Arapahoe Ave, Suite A       Phone: (720) 466-3196
Boulder, CO 80303                Fax:   (303) 448-7756

More information about the petsc-dev mailing list