DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
fddetdataformats
scripts
fddetdataformats_binding_tests.py
Go to the documentation of this file.
1
#!/usr/bin/env python3
2
3
import
subprocess
4
import
sys
5
from
pathlib
import
Path
6
7
8
def
run_script
(script_dir: Path, script_name: str) -> int:
9
script_path = script_dir / script_name
10
if
not
script_path.exists():
11
print(f
"MISSING: {script_name}"
)
12
return
1
13
14
print(f
"\n=== Running {script_name} ==="
)
15
result = subprocess.run([sys.executable, str(script_path)], check=
False
)
16
return
result.returncode
17
18
19
def
main
() -> int:
20
script_dir = Path(__file__).resolve().parent
21
22
scripts = [
23
"TDEEth_binding_test.py"
,
24
"DAPHNE_binding_test.py"
,
25
"DAPHNEStream_binding_test.py"
,
26
"DAPHNEEth_binding_test.py"
,
27
"DAPHNEEthStream_binding_test.py"
,
28
"WIBEth_binding_test.py"
,
29
]
30
31
failures = 0
32
for
script
in
scripts:
33
failures += 1
if
run_script
(script_dir, script) != 0
else
0
34
35
print(
"\n=== Summary ==="
)
36
if
failures == 0:
37
print(
"All fddetdataformats binding tests passed"
)
38
else
:
39
print(f
"{failures} binding test script(s) failed"
)
40
41
return
failures
42
43
44
if
__name__ ==
"__main__"
:
45
sys.exit(
main
())
fddetdataformats_binding_tests.main
int main()
Definition
fddetdataformats_binding_tests.py:19
fddetdataformats_binding_tests.run_script
int run_script(Path script_dir, str script_name)
Definition
fddetdataformats_binding_tests.py:8
Generated on
for DUNE-DAQ by
1.17.0