<div dir="ltr">Oh I'm all for reusing as much of the existing mechanism as possible.  Was just stating how the CMake worked as a discussion point.  Another possibility would be to just have the Xcode project build one executable that pulls in sources recursively from the entire subtree.  Is this as easy in Xcode as just adding all sources from a subfolder to a single target?<br><div><br></div><div>One day far off in the future it would be nice if all of LLDB's tests were ported to lit (even if that meant extending lit to make it do what we needed it to do), so I can definitely see some value in hooking lit up to the Xcode build so it does everything the CMake build does.  I'll have to look into exactly what steps the CMake and/or autoconf build are taking, but I suspect it's going to involve running CMake from a script, so not very desirable.  I'm still learning a lot of this stuff though, so there may be a better way.  Either way, I'll have to look into it a little bit.</div><div><br></div><div>In the meantime, if running unit tests from Xcode is not part of anyone's usual workflow, can I remove it for now?</div></div><br><div class="gmail_quote">On Thu, Mar 12, 2015 at 4:01 PM <<a href="mailto:jingham@apple.com">jingham@apple.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm not sure if this is what you meant, but I don't see a lot of value in making an Xcode project that has targets for each of the gtest binaries, and then tries to run the tests.  Seems to me it would be better if the gtest project just invokes whatever mechanism the cmake build would do to run the tests.  That's just another set of things to keep in sync.<br>
<br>
It is sufficient to have a target that just does whatever steps cmake/lit do to build the gtests & run them, if that is possible.  I guess if you can't do this without running cmake in the lldb top-level directory that would be a problem.  But it still seems better to me to wire that up, than to have to add tests to both Xcode & cmake.<br>
<br>
Jim<br>
<br>
<br>
<br>
<br>
<br>
> On Mar 12, 2015, at 3:46 PM, Zachary Turner <<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>> wrote:<br>
><br>
> So I'm guessing the scheme runs do-gtest.py.  I'd like to delete that file as well as all the Makefiles in the directory if possible.  It seems like these files should be built using the normal Xcode build system the same way the rest of LLDB is built.<br>
><br>
> The way the CMake does it is that each test folder generates a new executable.  So right now it will build HostTests.exe, ProcessLinuxTests.exe, and UtilityTests.exe.  And then CMake will invoke lit (the LLVM test runner) to run each of the executables one by one and print the output.<br>
><br>
> I'm not sure if that's easy or feasible to do in the Xcode build.  I kind of don't want to leave this do-gtest.py and Makefiles in the build though, because the more of this stuff we have the more maintenance it is, and things tend to rot.<br>
><br>
><br>
> On Thu, Mar 12, 2015 at 3:23 PM <<a href="mailto:jingham@apple.com" target="_blank">jingham@apple.com</a>> wrote:<br>
> Xcode has "projects" and then "workspaces" and "schemes".  Workspaces aggregate projects.  Schemes exist in both workspaces and projects and are the way to say "do something with some of the stuff referred to by this project/workspace."  So the way to do this formally is to have the gtest scheme build & run the tests from the gtest project.<br>
><br>
> The lldb.xcworkspace file does reference the gtest xcode project, and it has a scheme for the gtest.<br>
><br>
> Not sure what the scheme does yet, I'll look in a few minutes if nobody beats me to it, I'm in the middle of things right now.<br>
><br>
> Jim<br>
><br>
><br>
><br>
> > On Mar 12, 2015, at 2:41 PM, Zachary Turner <<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>> wrote:<br>
> ><br>
> > In lldb/gtest there is a gtest.xcodeproj folder with what I guess is an Xcode project.  If I understand the way Xcode works, the way to use this is by opening this in another instance of Xcode separate from your normal LLDB project, and then building it.  Is this right?<br>
> ><br>
> > I have a patch that moves some files around, and if nobody is using this Xcode project, I would like to delete it.  Then, after I get the tests up and running in the CMake build, we can add it to the "real" Xcode project as a separate target similar to how you currently run the LLDB Test suite.<br>
> ><br>
> > Any objections to deleting the Xcode project?<br>
><br>
<br>
</blockquote></div>