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
This commit is contained in:
Daniel Malea 2012-11-21 20:12:12 +00:00
parent 0df99bd2e4
commit b90c36868e
4 changed files with 25 additions and 19 deletions

View File

@ -28,7 +28,7 @@ class ExprCommandCallFunctionTestCase(TestBase):
@dwarf_test
def test_with_dwarf(self):
"""Test calling std::String member function."""
self.buildDsym()
self.buildDwarf()
self.call_function()
def call_function(self):

View File

@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
#include <cstdlib>
#include <cstring>
#include <string>
#include <fstream>
#include <iostream>

View File

@ -6,6 +6,7 @@
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include <cstdio>
#include <iostream>
#include <string>
#include <map>

View File

@ -43,26 +43,30 @@ class LogTestCase(TestBase):
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