From 06f442c384621eb319093feed7a628d16023163a Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Tue, 30 Jan 2018 10:41:46 +0000 Subject: 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 --- lldb/packages/Python/lldbsuite/test/lldbtest.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lldb/packages/Python/lldbsuite/test') 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") -- cgit v1.2.3