diff options
author | Vedant Kumar <vsk@apple.com> | 2018-10-16 18:13:42 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2018-10-16 18:13:42 +0000 |
commit | 2493707818de1fe3b364748eb2750606adf9e5f6 (patch) | |
tree | 56db4029237084403cc15b2997796523212ebd7d /lldb/packages/Python/lldbsuite/test | |
parent | 696569d757be2bc0cccb302432173edde40b98d0 (diff) | |
download | bcm5719-llvm-2493707818de1fe3b364748eb2750606adf9e5f6.tar.gz bcm5719-llvm-2493707818de1fe3b364748eb2750606adf9e5f6.zip |
Use a relaxed substring check for function names in a test
The TestTailCallFrameSBAPI.py test checks that function names in a
backtrace are equal to an expected value.
Use a relaxed substring check because function dislpay names are
platform-dependent. E.g we see "void sink(void)" on Windows, but "sink()" on
Darwin. This seems like a bug -- just work around it for now.
llvm-svn: 344634
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/TestTailCallFrameSBAPI.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/TestTailCallFrameSBAPI.py b/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/TestTailCallFrameSBAPI.py index be3d97282f5..517d8012621 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/TestTailCallFrameSBAPI.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/TestTailCallFrameSBAPI.py @@ -57,9 +57,14 @@ class TestTailCallFrameSBAPI(TestBase): # frame #2: ... a.out`func2() at main.cpp:18:62 [opt] # frame #3: ... a.out`func1() at main.cpp:18:85 [opt] [artificial] # frame #4: ... a.out`main at main.cpp:23:3 [opt] - names = ["sink()", "func3()", "func2()", "func1()", "main"] + names = ["sink", "func3", "func2", "func1", "main"] artificiality = [False, True, False, True, False] for idx, (name, is_artificial) in enumerate(zip(names, artificiality)): frame = thread.GetFrameAtIndex(idx) - self.assertEqual(frame.GetDisplayFunctionName(), name) + + # Use a relaxed substring check because function dislpay names are + # platform-dependent. E.g we see "void sink(void)" on Windows, but + # "sink()" on Darwin. This seems like a bug -- just work around it + # for now. + self.assertTrue(name in frame.GetDisplayFunctionName()) self.assertEqual(frame.IsArtificial(), is_artificial) |