DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
fddetdataformats_binding_tests Namespace Reference

Functions

int run_script (Path script_dir, str script_name)
int main ()

Function Documentation

◆ main()

int main ( )

Definition at line 19 of file fddetdataformats_binding_tests.py.

19def 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
int main(int argc, char *argv[])

◆ run_script()

int run_script ( Path script_dir,
str script_name )

Definition at line 8 of file fddetdataformats_binding_tests.py.

8def 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