diff options
author | Pavel Labath <labath@google.com> | 2018-01-30 10:41:46 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2018-01-30 10:41:46 +0000 |
commit | 06f442c384621eb319093feed7a628d16023163a (patch) | |
tree | 7d89d2023f4a9588266ceae4c680ebd0c02f8f59 /lldb/packages/Python/lldbsuite | |
parent | af379085ef38ba3c6c7315f7064c1faeeb4a73e6 (diff) | |
download | bcm5719-llvm-06f442c384621eb319093feed7a628d16023163a.tar.gz bcm5719-llvm-06f442c384621eb319093feed7a628d16023163a.zip |
Fix TestGDBRemoteClient on windows
The logic was incorrect because on windows, we need to look for
yaml2obj.EXE. I implement the search in terms of
distutils.spawn.find_executable, which should handle the platform
differences for us.
llvm-svn: 323744
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/lldbtest.py | 5 |
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") |