Bottom line: lldbutil.is_exe() does not think “foo” is an exe on windows when “foo.exe” is.
print(“***compiler is:”, self.getCompiler(), file=sys.stderr)
***compiler is: C:\lldb\8.0\llvm\tools\lldb\packages\Python\lldbsuite\test\lang\c\typedef
self.getCompiler() is returning the test directory.
So, _decorateTest’s line:
skip_for_compiler = _match_decorator_property(compiler, self.getCompiler()) and self.expectedCompilerVersion(compiler_version)
is trying to match with the test directory.
On Linux I get this:
***compiler is: /prj/dsp/qdsp6/release/internal/branch-8.0/linux64/toolset-4199/Tools/bin/clang-3.9
The path to the compiler (hexagon-clang is a symlink to clang-3.9).
Builder_base.getCompiler is:
def getCompiler():
“”“Returns the compiler in effect the test suite is running with.”“”
compiler = os.environ.get(“CC”, “clang”)
compiler = lldbutil.which(compiler)
return os.path.realpath(compiler)
os.environ.get returns r:/internal/branch-8.0/windows/latest/Tools/bin/hexagon-clang, but lldbutil.which returns None.
def which(program):
“”“Returns the full path to a program; None otherwise.”“”
fpath, fname = os.path.split(program)
if fpath:
if is_exe(program):
return program
else:
for path in os.environ[“PATH”].split(os.pathsep):
exe_file = os.path.join(path, program)
if is_exe(exe_file):
return exe_file
return None
The problem is the compiler – I specified hexagon-clang, not hexagon-clang.exe, so is_exe returns false.
def is_exe(fpath):
“”“Returns True if fpath is an executable.”“”
return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
My run line:
c:\lldb\8.0\35\Debug\libexec\python_d dotest.py -A v60 -C r:/internal/branch-8.0/windows/latest/Tools/bin/hexagon-clang --executable c:\lldb\8.0\35\Debug\bin\lldb.exe -t -v -p Testtypedef.py
Changing it to hexagon-clang.exe solved the problem.