[Lldb-commits] [PATCH] D42281: Compile the LLDB tests out-of-tree

Adrian Prantl via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 26 14:30:51 PST 2018


aprantl added inline comments.


================
Comment at: packages/Python/lldbsuite/test/api/check_public_api_headers/TestPublicAPIHeaders.py:46
         self.line_to_break = line_number(
-            self.source, '// Set breakpoint here.')
+            self.getBuildArtifact(self.source), '// Set breakpoint here.')
 
----------------
jingham wrote:
> Why do you have to call getBuildArtifact on the main source file?
Because this test uses a generated source file, so it's in the build directory. I added a comment.


================
Comment at: packages/Python/lldbsuite/test/dotest.py:1196
+        try: os.makedirs(configuration.test_build_dir, 448)
+        except: pass
+    else:
----------------
davide wrote:
> should we actually print some warning here? (e.g. directory `blah/` already exists?)
This the top-level build directory. In a cmake build it is expected to exist, but on the command line when running only a single test, you might want to pass a something like /tmp/mytest there.


================
Comment at: packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/TestBreakpointSetRestart.py:35-37
             self.BREAKPOINT_TEXT, lldb.SBFileSpec(
                 os.path.join(
+                    self.getSourceDir(), 'main.cpp')))
----------------
jingham wrote:
> This is beginning to show up a bunch.  Maybe TestBase should have:
> 
>   def getSourceFileSpec( filename):
>     fileSpec = lldb.SBFileSpec()
>     fileSpec.SetDirectory(self.getSourceDir())
>     fileSpec.SetFilename(filename)
>     return fileSpec
It is redundant. LLDB finds the file just fine with a relative FileSpec. I removed it.


https://reviews.llvm.org/D42281





More information about the lldb-commits mailing list