diff options
author | Pavel Labath <labath@google.com> | 2016-04-14 15:52:53 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2016-04-14 15:52:53 +0000 |
commit | e6961d0306d0631bb9218d2c88a8ca657259eb35 (patch) | |
tree | baa4c88fd40233a7e7717e6a6388d52407a581e5 /lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py | |
parent | f677cd539f0a71cd4b2ae9a990167ec6a98713ef (diff) | |
download | bcm5719-llvm-e6961d0306d0631bb9218d2c88a8ca657259eb35.tar.gz bcm5719-llvm-e6961d0306d0631bb9218d2c88a8ca657259eb35.zip |
[test] Relax stderr expectations on targets with chatty output
Summary:
On some android targets, a binary can produce additional garbage (e.g. warning messages from the
dynamic linker) on the standard error, which confuses some tests. This relaxes the stderr
expectations for targets known for their chattyness.
Reviewers: tfiala, ovyalov
Subscribers: tberghammer, danalbert, srhines, lldb-commits
Differential Revision: http://reviews.llvm.org/D19114
llvm-svn: 266326
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py index d84a6a8cadd..c01cc7a1725 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py @@ -232,7 +232,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase): self.add_verified_launch_packets(launch_args) self.test_sequence.add_log_lines( ["read packet: $vCont;c#a8", - {"type":"output_match", "regex":r"^hello, world\r\n$" }, + {"type":"output_match", "regex": self.maybe_strict_output_regex(r"hello, world\r\n")}, "send packet: $W00#00"], True) @@ -868,7 +868,8 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase): "read packet: $c#63", # Match output line that prints the memory address of the message buffer within the inferior. # Note we require launch-only testing so we can get inferior otuput. - { "type":"output_match", "regex":r"^data address: 0x([0-9a-fA-F]+)\r\n$", "capture":{ 1:"message_address"} }, + { "type":"output_match", "regex":self.maybe_strict_output_regex(r"data address: 0x([0-9a-fA-F]+)\r\n"), + "capture":{ 1:"message_address"} }, # Now stop the inferior. "read packet: {}".format(chr(3)), # And wait for the stop notification. @@ -950,7 +951,8 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase): "read packet: $c#63", # Match output line that prints the memory address of the message buffer within the inferior. # Note we require launch-only testing so we can get inferior otuput. - { "type":"output_match", "regex":r"^code address: 0x([0-9a-fA-F]+)\r\n$", "capture":{ 1:"code_address"} }, + { "type":"output_match", "regex":self.maybe_strict_output_regex(r"code address: 0x([0-9a-fA-F]+)\r\n"), + "capture":{ 1:"code_address"} }, # Now stop the inferior. "read packet: {}".format(chr(3)), # And wait for the stop notification. @@ -1011,7 +1013,8 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase): "read packet: $c#63", # Match output line that prints the memory address of the message buffer within the inferior. # Note we require launch-only testing so we can get inferior otuput. - { "type":"output_match", "regex":r"^stack address: 0x([0-9a-fA-F]+)\r\n$", "capture":{ 1:"stack_address"} }, + { "type":"output_match", "regex":self.maybe_strict_output_regex(r"stack address: 0x([0-9a-fA-F]+)\r\n"), + "capture":{ 1:"stack_address"} }, # Now stop the inferior. "read packet: {}".format(chr(3)), # And wait for the stop notification. @@ -1072,7 +1075,8 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase): "read packet: $c#63", # Match output line that prints the memory address of the message buffer within the inferior. # Note we require launch-only testing so we can get inferior otuput. - { "type":"output_match", "regex":r"^heap address: 0x([0-9a-fA-F]+)\r\n$", "capture":{ 1:"heap_address"} }, + { "type":"output_match", "regex":self.maybe_strict_output_regex(r"heap address: 0x([0-9a-fA-F]+)\r\n"), + "capture":{ 1:"heap_address"} }, # Now stop the inferior. "read packet: {}".format(chr(3)), # And wait for the stop notification. @@ -1135,7 +1139,8 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase): "read packet: $c#63", # Match output line that prints the memory address of the function call entry point. # Note we require launch-only testing so we can get inferior otuput. - { "type":"output_match", "regex":r"^code address: 0x([0-9a-fA-F]+)\r\n$", "capture":{ 1:"function_address"} }, + { "type":"output_match", "regex":self.maybe_strict_output_regex(r"code address: 0x([0-9a-fA-F]+)\r\n"), + "capture":{ 1:"function_address"} }, # Now stop the inferior. "read packet: {}".format(chr(3)), # And wait for the stop notification. @@ -1279,7 +1284,8 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase): "read packet: $c#63", # Match output line that prints the memory address of the message buffer within the inferior. # Note we require launch-only testing so we can get inferior otuput. - { "type":"output_match", "regex":r"^data address: 0x([0-9a-fA-F]+)\r\n$", "capture":{ 1:"message_address"} }, + { "type":"output_match", "regex":self.maybe_strict_output_regex(r"data address: 0x([0-9a-fA-F]+)\r\n"), + "capture":{ 1:"message_address"} }, # Now stop the inferior. "read packet: {}".format(chr(3)), # And wait for the stop notification. |