I'm doing this because I plan on implementing ComputeClangDirectory on windows
so that GetClangResourceDir will work. Additionally, I made
test_paths make sure that the directory member of the returned FileSpec is not
none. This will fail on windows since ComputeClangDirectory isn't implemented
yet.
Details
Diff Detail
- Build Status
Buildable 28685 Build 28684: arc lint + arc unit
Event Timeline
packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py | ||
---|---|---|
20 | Doesn't that mean that we no longer test any of the paths on windows? E.g. if someone breaks lldb.ePathTypeLLDBShlibDir we will not see this test failing on Windows. I would prefer of extracting the ClangDir test into it's own method that we mark as failing. |
packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py | ||
---|---|---|
20 | Technically it is being tested but it is expected to fail. That being said, I don't mind extracting the ClangDir test into its own method while I work on implementing it, but I don't think it needs its own test. Maybe after I implement GetClangResourceDir on windows I can merge the tests? :P |
packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py | ||
---|---|---|
20 | That sounds fine, though I have to say that these tests don't really test much. There is a test for the MacOS functionality here in unittests/Expression/ClangParserTest.cpp, which is much more detailed. It would be great if you could add a windows version there too. |
packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py | ||
---|---|---|
20 | I originally added this test there, but testing things there as-is is presents a disadvantage: The unittests don't link against liblldb but the individual lldb libraries, so the methods that figure out where the Clang Resource Dir (and pretty much any other directory for that matter) will report something like this: That being said, the way MacOS is being tested is much nicer. I could do a small refactor so the non-MacOS posix implementation is closer to the MacOS implementation and add a Linux test (and eventually a windows test) to unittests/Expression/ClangParserTest.cpp as well. What do you think? |
packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py | ||
---|---|---|
20 | Sounds like a plan. |
Looks fine to me, but maybe @aprantl could give this a quick look, as he's the one (IIRC) who introduced this function.
Looks mostly good!
source/Plugins/ExpressionParser/Clang/ClangHost.cpp | ||
---|---|---|
45 | While you are at it, could you rename this DefaultComputeClangResourceDirectory? |
{Default,}ComputeClangDirectory -> {Default,}ComputeClangResourceDir
Added a comment explaining exactly how DefaultComputeClangResourceDir works
This introduced a build break on Windows (which happened to coincide with another build break).
http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/2317
Doesn't that mean that we no longer test any of the paths on windows? E.g. if someone breaks lldb.ePathTypeLLDBShlibDir we will not see this test failing on Windows. I would prefer of extracting the ClangDir test into it's own method that we mark as failing.