File: example_template.py

package info (click to toggle)
petsc 3.24.1%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 524,016 kB
  • sloc: ansic: 762,842; cpp: 52,564; python: 39,546; f90: 17,688; javascript: 3,493; makefile: 3,212; sh: 1,512; xml: 619; objc: 445; java: 13; csh: 1
file content (50 lines) | stat: -rwxr-xr-x 1,845 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50

header="""#!/usr/bin/env bash
# This script was created by gmakegentest.py

@COMMENTS@

@ENV@

# PATH for DLLs on windows
PATH="$PATH":@PETSC_LIB_DIR@
executable='@EXECUTABLE@'
testname='@TESTNAME@'
label='@LABEL@'
runfiles='@LOCALRUNFILES@'
wPETSC_DIR='@WPETSC_DIR@'
@PKG_NAME@_dir='@PKG_DIR@'
@PKG_NAME@_arch='@PKG_ARCH@'
# Must be consistent with gmakefile.test
testlogtapfile=@TESTROOT@/test_${@PKG_NAME@_arch}_tap.log
testlogerrfile=@TESTROOT@/test_${@PKG_NAME@_arch}_err.log
config_dir='@CONFIG_DIR@'
filter='@FILTER@'
filter_output='@FILTER_OUTPUT@'
petsc_bindir='@PETSC_BINDIR@'
@DATAFILESPATH_LINE@
# -petsc_ci must be a command line argument because if it is from the environment it will be listed by PetscOptionsMonitor()
args='-petsc_ci @ARGS@'
diff_args='@DIFF_ARGS@'
timeoutfactor=@TIMEOUTFACTOR@
export PETSC_OPTIONS="${PETSC_OPTIONS} -check_pointer_intensity 0 -error_output_stdout -malloc_dump @PETSC_TEST_OPTIONS@"

mpiexec=${PETSCMPIEXEC:-"@MPIEXEC@"}
diffexec=${PETSCDIFF:-"${petsc_bindir}/petscdiff"}
mpiexec_tail='@MPIEXEC_TAIL@'

. "${config_dir}/petsc_harness.sh"

# The diff flags come from script arguments
diff_exe="${diffexec} ${diff_flags} ${diff_args}"
mpiexec="${mpiexec} ${mpiexec_flags}"
"""

footer='petsc_testend "@TESTROOT@" '

preclean='@RM@ @TEMPORARIES@'
todoline='petsc_report_tapoutput "" "${label}" "TODO @TODOCOMMENT@"'
skipline='petsc_report_tapoutput "" "${label}" "SKIP @SKIPCOMMENT@"'
mpitest='petsc_testrun "${mpiexec} -n ${insize} ${mpiexec_tail} ${executable} ${args} @SUBARGS@" @REDIRECT_FILE@ ${testname}.err "${label}@LABEL_SUFFIX@" @ERROR@'
difftest='petsc_testrun "${diff_exe} @OUTPUT_FILE@ @REDIRECT_FILE@" diff-${testname}.out diff-${testname}.out diff-${label}@LABEL_SUFFIX@ ""'
commandtest='petsc_testrun "@COMMAND@" @REDIRECT_FILE@ ${testname}.err cmd-${label}@LABEL_SUFFIX@ @ERROR@'