summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
-rw-r--r--lldb/packages/Python/lldbsuite/test/lldbtest.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py
index 392aca60864..4256e86d6fe 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbtest.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py
@@ -50,6 +50,7 @@ import sys
import time
import traceback
import types
+import distutils.spawn
# Third-party modules
import unittest2
@@ -1617,8 +1618,8 @@ class Base(unittest2.TestCase):
"""
# Tries to find yaml2obj at the same folder as clang
clang_dir = os.path.dirname(self.findBuiltClang())
- path = os.path.join(clang_dir, "yaml2obj")
- if os.path.exists(path):
+ path = distutils.spawn.find_executable("yaml2obj", clang_dir)
+ if path is not None:
return path
raise Exception("yaml2obj executable not found")
OpenPOWER on IntegriCloud