Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
srcs
icaruscode
test
fcl
testFHiCLfiles_icarus.sh
Go to the documentation of this file.
1
#!/usr/bin/env bash
2
3
SCRIPTDIR
=
"$(dirname "
$0
")"
4
5
#
6
# platform compatibility test
7
#
8
if
[[
"${BASH_VERSINFO[0]}"
-lt 4 ]]; then
9
echo
"This test script requires BASH 4.0 or newer."
>&2
10
exit
#
the
test
is declared
a
success
11
fi
12
13
#
14
# find the actual test script
15
# currently located alongside this file
16
#
17
declare -
r
TestScriptName
=
'testFHiCLfiles.sh'
18
declare TestScript
19
TestScript=
"$(which "
$TestScriptName
" 2> /dev/null)"
20
[[ $? != 0 ]] && TestScript=
"${SCRIPTDIR}/${TestScriptName}"
21
[[ -
r
"$TestScript"
]] || TestScript=
"./${TestScriptName}"
22
23
if
[[ ! -
r
"$TestScript"
]]; then
24
echo
"FATAL: test script '${TestScriptName}' not found!"
>&2
25
exit
2
26
fi
27
28
#
29
# decide what to test
30
#
31
declare -
a
TestDirs
32
33
if
[[ -
n
"$ICARUSCODE_DIR"
]]; then
34
DistributedFHiCLdir
=
"${ICARUSCODE_DIR}/job"
35
if
[[ -d
"$DistributedFHiCLdir"
]]; then
36
echo
"Will test the distributed job configuration directory '${DistributedFHiCLdir}'"
37
TestDirs+=(
"$DistributedFHiCLdir"
)
38
fi
39
fi
40
41
if
[[ -
n
"$MRB_BUILDDIR"
]]; then
42
InstalledFHiCLdir=
"${MRB_BUILDDIR}/icaruscode/job"
43
if
[[ -d
"$InstalledFHiCLdir"
]]; then
44
echo
"Will test the installed job configuration directory in MRB build area ('${InstalledFHiCLdir}')"
45
TestDirs+=(
"$InstalledFHiCLdir"
)
46
fi
47
fi
48
49
if
[[ -
n
"$MRB_SOURCE"
]]; then
50
SourceFHiCLdir=
"${MRB_SOURCE}/icaruscode/fcl"
51
if
[[ -d
"$SourceFHiCLdir"
]]; then
52
echo
"Will test the job configuration directory in MRB source area ('${SourceFHiCLdir}')"
53
TestDirs+=(
"$SourceFHiCLdir"
)
54
fi
55
fi
56
57
if
[[
"${#TestDirs[@]}]"
== 0 ]]; then
58
echo
"FATAL: no suitable FHiCL directory found to be tested!"
>&2
59
exit
1
60
fi
61
62
#
63
# run the test
64
#
65
"$SHELL"
"$TestScript"
"$@"
"${TestDirs[@]}"
66
exit
exit
Definition:
generate_icarus_geometry_splitwire.pl:430
the
#define the
a
process_name gaushit a
Definition:
decode_signalprocess_icarus.fcl:37
SCRIPTDIR
SCRIPTDIR
Definition:
testFHiCLfiles_icarus.sh:3
fi
then shift fi
Definition:
condor_hadd_sam.sh:174
test
BEGIN_PROLOG hitmakerfive clustermakerfour pfparticlemakerthree showermakertwo END_PROLOG hitmakerfive clustermakerfour pfparticlemakerthree sequence::inline_paths sequence::inline_paths sequence::inline_paths showermakers test
Definition:
assnschainutils_test.fcl:19
TestScriptName
then echo This test script requires BASH or newer &exit fi declare r TestScriptName
Definition:
testFHiCLfiles_icarus.sh:17
r
esac echo uname r
Definition:
condor_lar_pubs.sh:698
DistributedFHiCLdir
then DistributedFHiCLdir
Definition:
testFHiCLfiles_icarus.sh:34
channelDBConverter.n
int n
Definition:
channelDBConverter.py:249
Generated by
1.8.5