source [file join [file dirname [file normalize [info script]]] tclbuildtest.tcl]

package require tclbuildtest

# Basic PETSc tests
::tclbuildtest::sandbox {
    foreach b {{} static} {
        foreach p {single double} {
            foreach s {real complex} {
                foreach x {{} openmp} {
                    test [list c $x $p $s $b] {
                        run [build [require petsc-[xyz]] ksp/ex1.c]
                    }
                    test [list fortran $x $p $s $b] {
                        run [build [require petsc-[xyz]] -ffree-line-length-256 ksp/ex1f.F90]
                    }
                }
                test [list c mpi $p $s $b] {
                    run [build [require petsc-[xyz]] ksp/ex2.c]
                }
                test [list fortran mpi $p $s $b] {
                    run [build [require petsc-[xyz]] ksp/ex2f.F90]
                }
            }
        }
    }
}