Skip to content
Snippets Groups Projects
Commit ea049199 authored by Yngve Levinsen's avatar Yngve Levinsen
Browse files

better check for binary in tracewin script

parent 9e970776
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,7 @@ from __future__ import print_function ...@@ -3,6 +3,7 @@ from __future__ import print_function
import argparse import argparse
import os import os
import shutil
import subprocess import subprocess
# This script simply runs TraceWin CLI version. # This script simply runs TraceWin CLI version.
...@@ -53,7 +54,14 @@ parser.add_argument('-s', '--seed', dest='seed', ...@@ -53,7 +54,14 @@ parser.add_argument('-s', '--seed', dest='seed',
args = parser.parse_args() args = parser.parse_args()
# A list to be filled depending on arguments given... # A list to be filled depending on arguments given...
cmd = ["TraceWin64_noX11", "'"+args.project+"'", "hide_esc"] binary = None
for c in ["TraceWin64_noX11", "TraceWin_cli"]:
if shutil.which(c):
binary = c
break
if binary is None:
raise ValueError("Could not find the TraceWin binary")
cmd = [binary, f"'{args.project}'", "hide_esc"]
# Check that project path exist: # Check that project path exist:
if not os.path.isfile(args.project): if not os.path.isfile(args.project):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment