[petsc-users] Using PETSc Testing System
Jacob Faibussowitsch
jacob.fai at gmail.com
Mon Mar 27 09:14:36 CDT 2023
Our testing framework was pretty much tailor-made for the PETSc src tree and as such has many hard-coded paths and decisions. I’m going to go out on a limb and say you probably won’t get this to work...
That being said, one of the “base” paths that the testing harness uses to initially find tests is the `TESTSRCDIR` variable in `${PETSC_DIR}/gmakefile.test`. It is currently defined as
```
# TESTSRCDIR is always relative to gmakefile.test
# This must be before includes
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
TESTSRCDIR := $(dir $(mkfile_path))src
```
You should start by changing this to
```
# TESTSRCDIR is always relative to gmakefile.test
# This must be before includes
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
TESTSRCDIR ?= $(dir $(mkfile_path))src
```
That way you could run your tests via
```
$ make test TESTSRCDIR=/path/to/your/src/dir
```
I am sure there are many other modifications you will need to make.
Best regards,
Jacob Faibussowitsch
(Jacob Fai - booss - oh - vitch)
> On Mar 27, 2023, at 06:14, Daniele Prada <daniele.prada85 at gmail.com> wrote:
>
> Hello everyone,
>
> I would like to use the PETSc Testing System for testing a package that I am developing.
>
> I have read the PETSc developer documentation and have written some tests using the PETSc Test Description Language. I am going through the files in ${PETSC_DIR}/config but I am not able to make the testing system look into the directory tree of my project.
>
> Any suggestions?
>
> Thanks in advance
> Daniele
More information about the petsc-users
mailing list