From 75bfd2dc47c11f5ea576ee21c84b3ae26279b820 Mon Sep 17 00:00:00 2001 From: Sascha Willems Date: Thu, 3 Jul 2025 08:57:54 +0200 Subject: [PATCH] Make validation script work with non-windows platforms Fies #1215 --- examples/validate_all.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/examples/validate_all.py b/examples/validate_all.py index 215a8768..aaf3daa7 100644 --- a/examples/validate_all.py +++ b/examples/validate_all.py @@ -3,16 +3,21 @@ # Runs all samples in benchmark mode and stores all validation messages into a single text file -# Note: Need to be copied to where the binary files have been compiled +# Note: Needs to be copied to where the binary files have been compiled (e.g. build/windows/bin/debug) import glob import subprocess import os +import platform if os.path.exists("validation_output.txt"): os.remove("validation_output.txt") -for sample in glob.glob("*.exe"): - # Skip headless samples, as they require manual keypress +if platform.system() == 'Linux' or platform.system() == 'Darwin': + binaries = "./*" +else: + binaries = "*.exe" +for sample in glob.glob(binaries): + # Skip headless samples, as they require a manual keypress if "headless" in sample: continue subprocess.call("%s -v -vl -b -bfs %s" % (sample, 50), shell=True) \ No newline at end of file