summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xclang/utils/creduce-clang-crash.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/utils/creduce-clang-crash.py b/clang/utils/creduce-clang-crash.py
index e886bf72e5a..b69d6efc248 100755
--- a/clang/utils/creduce-clang-crash.py
+++ b/clang/utils/creduce-clang-crash.py
@@ -30,6 +30,7 @@ def verbose_print(*args, **kwargs):
print(*args, **kwargs)
def check_file(fname):
+ fname = os.path.normpath(fname)
if not os.path.isfile(fname):
sys.exit("ERROR: %s does not exist" % (fname))
return fname
@@ -40,6 +41,8 @@ def check_cmd(cmd_name, cmd_dir, cmd_path=None):
or absolute path to cmd_dir/cmd_name.
"""
if cmd_path:
+ # Make the path absolute so the creduce test can be run from any directory.
+ cmd_path = os.path.abspath(cmd_path)
cmd = find_executable(cmd_path)
if cmd:
return cmd
OpenPOWER on IntegriCloud