xref: /petsc/config/example_template.py (revision 2d776b4963042cdf8a412ba09e923aa51facd799)
1
2header="""#!/usr/bin/env bash
3# This script was created by gmakegentest.py
4
5@COMMENTS@
6
7# PATH for DLLs on windows
8PATH="$PATH":@PETSC_LIB_DIR@
9exec='@EXEC@'
10testname='@TESTNAME@'
11label='@LABEL@'
12runfiles='@LOCALRUNFILES@'
13wPETSC_DIR='@WPETSC_DIR@'
14@PKG_NAME@_dir='@PKG_DIR@'
15@PKG_NAME@_arch='@PKG_ARCH@'
16# Must be consistent with gmakefile.test
17testlogtapfile=@TESTROOT@/test_${@PKG_NAME@_arch}_tap.log
18testlogerrfile=@TESTROOT@/test_${@PKG_NAME@_arch}_err.log
19config_dir='@CONFIG_DIR@'
20filter='@FILTER@'
21filter_output='@FILTER_OUTPUT@'
22petsc_bindir='@PETSC_BINDIR@'
23@DATAFILESPATH_LINE@
24# -petsc_ci has be a command line argument because if it is from the evironment it will be listed by PetscOptionsMonitor()
25args='-petsc_ci @ARGS@'
26diff_args='@DIFF_ARGS@'
27timeoutfactor=@TIMEOUTFACTOR@
28export PETSC_OPTIONS="${PETSC_OPTIONS} -check_pointer_intensity 0 -error_output_stdout -malloc_dump @PETSC_TEST_OPTIONS@"
29
30mpiexec=${PETSCMPIEXEC:-"@MPIEXEC@"}
31diffexec=${PETSCDIFF:-"${petsc_bindir}/petscdiff"}
32
33. "${config_dir}/petsc_harness.sh"
34
35# The diff flags come from script arguments
36diff_exe="${diffexec} ${diff_flags} ${diff_args}"
37mpiexec="${mpiexec} ${mpiexec_flags}"
38"""
39
40footer='petsc_testend "@TESTROOT@" '
41
42todoline='petsc_report_tapoutput "" "${label}" "TODO @TODOCOMMENT@"'
43skipline='petsc_report_tapoutput "" "${label}" "SKIP @SKIPCOMMENT@"'
44mpitest='petsc_testrun "${mpiexec} -n ${insize} ${exec} ${args} @SUBARGS@" @REDIRECT_FILE@ ${testname}.err "${label}@LABEL_SUFFIX@" @ERROR@'
45difftest='petsc_testrun "${diff_exe} @OUTPUT_FILE@ @REDIRECT_FILE@" diff-${testname}.out diff-${testname}.out diff-${label}@LABEL_SUFFIX@ ""'
46commandtest='petsc_testrun "@COMMAND@" @REDIRECT_FILE@ ${testname}.err cmd-${label}@LABEL_SUFFIX@ @ERROR@'
47