Make it easier to see what's going on by tracing the test case
authorEnrico Granata <egranata@apple.com>
Tue, 3 Feb 2015 02:46:36 +0000 (02:46 +0000)
committerEnrico Granata <egranata@apple.com>
Tue, 3 Feb 2015 02:46:36 +0000 (02:46 +0000)
llvm-svn: 227936

lldb/test/lldbpexpect.py

index aa1e220..88bd3f8 100644 (file)
@@ -18,7 +18,8 @@ class PExpectTest(TestBase):
 
     def launch(self, timeout=None):
         if timeout is None: timeout = 30
-        self.child = pexpect.spawn('%s %s' % (self.lldbHere, self.launchArgs()))
+        logfile = sys.stdout if self.TraceOn() else None
+        self.child = pexpect.spawn('%s %s' % (self.lldbHere, self.launchArgs()), logfile=logfile)
         self.child.timeout = timeout
         self.timeout = timeout