Skip to content

Commit a36a35c

Browse files
committed
Added script to validate all samples
Validation messages are stored into a single file
1 parent d344946 commit a36a35c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

examples/validate_all.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright (C) 2025 by Sascha Willems - www.saschawillems.de
2+
# This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
3+
4+
# Runs all samples in benchmark mode and stores all validation messages into a single text file
5+
6+
# Note: Need to be copied to where the binary files have been compiled
7+
8+
import glob
9+
import subprocess
10+
import os
11+
12+
if os.path.exists("validation_output.txt"):
13+
os.remove("validation_output.txt")
14+
i = 0
15+
for sample in glob.glob("*.exe"):
16+
# Skip headless samples, as they require manual keypress
17+
if "headless" in sample:
18+
continue
19+
subprocess.call("%s -v -vl -b -bfs %s" % (sample, 50), shell=True)

0 commit comments

Comments
 (0)