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
diff --git a/test/lldbtest.py b/test/lldbtest.py
index cba495b..bd72e6c 100644
--- a/test/lldbtest.py
+++ b/test/lldbtest.py
@@ -278,6 +278,7 @@
         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 @@
 
     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 @@
         if cmd is None:
             cmd = popenargs[0]
         raise CalledProcessError(retcode, cmd)
-    return output
+    return (output, error)
 
 def getsource_if_available(obj):
     """