Skip to content

Commit 10e53fe

Browse files
committed
Python: Check plotting script for linux
1 parent 40f40a2 commit 10e53fe

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Utilities/Python/scripts/make_smv_images.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
import os
66
import subprocess
77
import shutil
8+
import platform
9+
10+
os_name = platform.system()
11+
12+
if os_name == "Linux":
13+
if shutil.which("xvfb-run") is None:
14+
raise FileNotFoundError("xvfb-run is not installed. Please install xvfb package.")
815

916
outdir = '../../Verification/'
1017
original_dir = os.getcwd()
@@ -18,6 +25,9 @@
1825

1926
for i in range(len(folder)):
2027
os.chdir(outdir + folder[i])
21-
subprocess.run([smokeview_path,'-runscript',case[i]])
28+
if os_name == "Linux":
29+
subprocess.run(['xvfb-run',smokeview_path,'-runscript',case[i]])
30+
else:
31+
subprocess.run([smokeview_path,'-runscript',case[i]])
2232
os.chdir(original_dir)
2333

0 commit comments

Comments
 (0)