diff options
author | Johnny Chen <johnny.chen@apple.com> | 2011-03-23 20:28:59 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2011-03-23 20:28:59 +0000 |
commit | 0bfa859ea49d27efd89d5f152b8371b39919d92d (patch) | |
tree | bed954a5ef36125410539a87bd64e9abff116d56 /test/lldbtest.py | |
parent | d1fbbb4cc0f3d4c99ba0614ea99c2df533ee9a0f (diff) | |
download | lldb-0bfa859ea49d27efd89d5f152b8371b39919d92d.tar.gz |
Turns out that the test failure wrt:
rdar://problem/9173060 lldb hangs while running unique-types
disappears if running with clang version >= 3. Modify the TestUniqueTypes.py
to detect if we are running with clang version < 3 and, if true, skip the test.
Update the lldbtest.system() function to return a tuple of (stdoutdata, stderrdata)
since we need the stderr data from "clang -v" command. Modify existing clients of
lldbtest.system() to now use, for example:
# First, capture the golden output emitted by the oracle, i.e., the
# series of printf statements.
- go = system("./a.out", sender=self)
+ go = system("./a.out", sender=self)[0]
# This golden list contains a list of (variable, value) pairs extracted
# from the golden output.
gl = []
And add two utility functions to lldbutil.py.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128162 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/lldbtest.py')
-rw-r--r-- | test/lldbtest.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/lldbtest.py b/test/lldbtest.py index cba495b2a..bd72e6c19 100644 --- a/test/lldbtest.py +++ b/test/lldbtest.py @@ -278,6 +278,7 @@ class recording(StringIO.StringIO): self.close() # From 2.7's subprocess.check_output() convenience function. +# Return a tuple (stdoutdata, stderrdata). def system(*popenargs, **kwargs): r"""Run command with arguments and return its output as a byte string. @@ -304,7 +305,7 @@ def system(*popenargs, **kwargs): if 'stdout' in kwargs: raise ValueError('stdout argument not allowed, it will be overridden.') - process = Popen(stdout=PIPE, *popenargs, **kwargs) + process = Popen(stdout=PIPE, stderr=PIPE, *popenargs, **kwargs) output, error = process.communicate() retcode = process.poll() @@ -325,7 +326,7 @@ def system(*popenargs, **kwargs): if cmd is None: cmd = popenargs[0] raise CalledProcessError(retcode, cmd) - return output + return (output, error) def getsource_if_available(obj): """ |