[Lldb-commits] [lldb] r323744 - Fix TestGDBRemoteClient on windows

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Tue Jan 30 02:41:46 PST 2018


Author: labath
Date: Tue Jan 30 02:41:46 2018
New Revision: 323744

URL: http://llvm.org/viewvc/llvm-project?rev=323744&view=rev
Log:
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.

Modified:
    lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py?rev=323744&r1=323743&r2=323744&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Tue Jan 30 02:41:46 2018
@@ -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")
 




More information about the lldb-commits mailing list