Skip to content

Commit 75bfd2d

Browse files
committed
Make validation script work with non-windows platforms
Fies SaschaWillems#1215
1 parent d790348 commit 75bfd2d

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

examples/validate_all.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,21 @@
33

44
# Runs all samples in benchmark mode and stores all validation messages into a single text file
55

6-
# Note: Need to be copied to where the binary files have been compiled
6+
# Note: Needs to be copied to where the binary files have been compiled (e.g. build/windows/bin/debug)
77

88
import glob
99
import subprocess
1010
import os
11+
import platform
1112

1213
if os.path.exists("validation_output.txt"):
1314
os.remove("validation_output.txt")
14-
for sample in glob.glob("*.exe"):
15-
# Skip headless samples, as they require manual keypress
15+
if platform.system() == 'Linux' or platform.system() == 'Darwin':
16+
binaries = "./*"
17+
else:
18+
binaries = "*.exe"
19+
for sample in glob.glob(binaries):
20+
# Skip headless samples, as they require a manual keypress
1621
if "headless" in sample:
1722
continue
1823
subprocess.call("%s -v -vl -b -bfs %s" % (sample, 50), shell=True)

0 commit comments

Comments
 (0)