Linux test case fixes
- missing includes in cpp test programs
- mismatched dwarf/dsym test cases
- make "com.apple.main-thread" expected string conditional on darwin platform

llvm-svn: 168452
diff --git a/lldb/test/expression_command/call-function/TestCallStdStringFunction.py b/lldb/test/expression_command/call-function/TestCallStdStringFunction.py
index 05d1c79..3582ced 100644
--- a/lldb/test/expression_command/call-function/TestCallStdStringFunction.py
+++ b/lldb/test/expression_command/call-function/TestCallStdStringFunction.py
@@ -28,7 +28,7 @@
     @dwarf_test
     def test_with_dwarf(self):
         """Test calling std::String member function."""
-        self.buildDsym()
+        self.buildDwarf()
         self.call_function()
 
     def call_function(self):
diff --git a/lldb/test/functionalities/command_script/main.cpp b/lldb/test/functionalities/command_script/main.cpp
index 3b245c9..0b24cb7 100644
--- a/lldb/test/functionalities/command_script/main.cpp
+++ b/lldb/test/functionalities/command_script/main.cpp
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 
 #include <cstdlib>
+#include <cstring>
 #include <string>
 #include <fstream>
 #include <iostream>
diff --git a/lldb/test/lang/cpp/stl/main.cpp b/lldb/test/lang/cpp/stl/main.cpp
index 1ef7d72..cfdb7b2 100644
--- a/lldb/test/lang/cpp/stl/main.cpp
+++ b/lldb/test/lang/cpp/stl/main.cpp
@@ -6,6 +6,7 @@
 // License. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
+#include <cstdio>
 #include <iostream>
 #include <string>
 #include <map>
diff --git a/lldb/test/logging/TestLogging.py b/lldb/test/logging/TestLogging.py
index d12cbce..93f65e9 100644
--- a/lldb/test/logging/TestLogging.py
+++ b/lldb/test/logging/TestLogging.py
@@ -43,26 +43,30 @@
         self.runCmd ("bp l")
 
         expected_log_lines = [
-            "com.apple.main-thread Processing command: command alias bp breakpoint\n",
-            "com.apple.main-thread HandleCommand, cmd_obj : 'command alias'\n",
-            "com.apple.main-thread HandleCommand, revised_command_line: 'command alias bp breakpoint'\n",
-            "com.apple.main-thread HandleCommand, wants_raw_input:'True'\n",
-            "com.apple.main-thread HandleCommand, command line after removing command name(s): 'bp breakpoint'\n",
-            "com.apple.main-thread HandleCommand, command succeeded\n",
-            "com.apple.main-thread Processing command: bp set -n main\n",
-            "com.apple.main-thread HandleCommand, cmd_obj : 'breakpoint set'\n",
-            "com.apple.main-thread HandleCommand, revised_command_line: 'breakpoint set -n main'\n",
-            "com.apple.main-thread HandleCommand, wants_raw_input:'False'\n",
-            "com.apple.main-thread HandleCommand, command line after removing command name(s): '-n main'\n",
-            "com.apple.main-thread HandleCommand, command succeeded\n",
-            "com.apple.main-thread Processing command: bp l\n",
-            "com.apple.main-thread HandleCommand, cmd_obj : 'breakpoint list'\n",
-            "com.apple.main-thread HandleCommand, revised_command_line: 'breakpoint l'\n",
-            "com.apple.main-thread HandleCommand, wants_raw_input:'False'\n",
-            "com.apple.main-thread HandleCommand, command line after removing command name(s): ''\n",
-            "com.apple.main-thread HandleCommand, command succeeded\n",
+            "Processing command: command alias bp breakpoint\n",
+            "HandleCommand, cmd_obj : 'command alias'\n",
+            "HandleCommand, revised_command_line: 'command alias bp breakpoint'\n",
+            "HandleCommand, wants_raw_input:'True'\n",
+            "HandleCommand, command line after removing command name(s): 'bp breakpoint'\n",
+            "HandleCommand, command succeeded\n",
+            "Processing command: bp set -n main\n",
+            "HandleCommand, cmd_obj : 'breakpoint set'\n",
+            "HandleCommand, revised_command_line: 'breakpoint set -n main'\n",
+            "HandleCommand, wants_raw_input:'False'\n",
+            "HandleCommand, command line after removing command name(s): '-n main'\n",
+            "HandleCommand, command succeeded\n",
+            "Processing command: bp l\n",
+            "HandleCommand, cmd_obj : 'breakpoint list'\n",
+            "HandleCommand, revised_command_line: 'breakpoint l'\n",
+            "HandleCommand, wants_raw_input:'False'\n",
+            "HandleCommand, command line after removing command name(s): ''\n",
+            "HandleCommand, command succeeded\n",
             ]
 
+        # com.apple.main-thread identifier appears on darwin only
+        if sys.platform.startswith("darwin"):
+            expected_log_lines = ['com.apple.main-thread ' + x for x in expected_log_lines]
+
         self.assertTrue (os.path.isfile (log_file))
 
         idx = 0